/* ==========================================================
   ERIK NYLUND PORTFOLIO TEMPLATE
   ========================================================== */

:root {
  --black: #000000;
  --paper: #353b3f;
  --white: #ffffff;
  --yellow: #fff200;
  --line: #96915b;
  --text: #96915b;
  --content-width: 1100px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 155px;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--paper);
  font-size: 13px;
  line-height: 1.35;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

img,
video,
svg {
  max-width: 100%;
}

.content-width {
  width: min(var(--content-width), calc(100% - 40px));
  margin-inline: auto;
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  min-height: 132px;
  background: var(--black);
  color: var(--white);
}

.header-inner {
  width: min(var(--content-width), calc(100% - 40px));
  height: 132px;
  margin: 0 auto;
  padding-top: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.topmenu-image-link {
  display: block;
  width: 560px;
  max-width: 48%;
}

.topmenu-image-link img {
  display: block;
  width: 100%;
  height: auto;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 19px;
}

.desktop-nav > a:hover,
.mobile-nav > a:hover {
  opacity: .65;
}

.header-symbols {
  display: flex;
  gap: 8px;
  align-items: center;
}

.symbol-button {
  display: block;
  width: 18px;
  height: 18px;
}

.symbol-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.symbol-button:hover {
  opacity: .7;
}

.menu-toggle,
.mobile-nav {
  display: none;
}

/* INTRO */

.hero-area {
  position: relative;
  overflow: visible;
}

.hero-background-image {
  position: absolute;
  bottom: 250px;
  /* top: -200px; */
  left: 0;
  width: 2000px;
  height: auto;
  pointer-events: none;
  z-index: 0;
}

.intro {
  position: relative;
  z-index: 1;
  padding-top: 360px;
  padding-bottom: 36px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 0;
  margin-bottom: 22px;
}

.filter-button {
  appearance: none;
  border: 1px solid #96915b;
  background: #353b3f;
  color: var(--text);
  border-radius: 999px;
  padding: 17px 26px;
  cursor: pointer;
  line-height: 1;
  transition:
    background .15s ease,
    color .15s ease,
    border-color .15s ease;
}

.filter-button:hover {
  border-color: var(--white);
  box-shadow: inset 0 0 0 1px var(--white);
}

.filter-button:active {
  color: var(--white);
  background: var(--white);
  border-color: var(--white);
}

.intro-copy {
  max-width: 1100px;
  margin: 0;
}

/* PORTFOLIO SECTIONS */

.portfolio-section {
  margin-bottom: 34px;
}

.section-heading {
  border-top: 3px solid var(--line);
  border-bottom: 3px solid var(--line);
  margin-bottom: 8px;
  padding: 8px 0 8px;
}

.subsection-heading {
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
  padding: 1px 0 1px;
}

.section-heading h2 {
  margin: 0;
  line-height: 1;
  font-weight: 400;
}

.section-heading p {
  margin: 4px 0 0;
}

.subheading {
  margin: 26px 0 8px;
  font-weight: 400;
}

.work-grid {
  display: grid;
  gap: 22px;
}

.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}


/* Two independent image columns.
   A-images stack in the left column; B-images stack in the right column. */
.image-column-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.image-column {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.compact-gap {
  row-gap: 18px;
}

.work-item {
  min-width: 0;
  margin: 0;
}

.media-frame {
  width: 100%;
  height: auto;
  background: var(--white);
  overflow: visible;
  position: relative;
}

.media-frame.lightboxable > img {
  transition: opacity 0.25s ease;
}

.media-frame.lightboxable:hover > img {
  opacity: 0.6;
}

.media-wide {
  height: auto;
}

.featured {
  margin-bottom: 24px;
}

.media-frame img,
.media-frame video,
.media-frame svg,
.media-frame iframe,
.media-frame object {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border: 0;
}

.svg-frame {
  aspect-ratio: auto;
  height: auto;
  overflow: visible;
  background: transparent;
}

.interactive-svg {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
}

.video-thumbnail {
  cursor: pointer;
  object-fit: cover;
}

.lightboxable {
  cursor: pointer;
}

.work-item figcaption {
  margin-top: 5px;
  line-height: 1.25;
}

.stack {
  display: grid;
  gap: 24px;
}


/* Paired portfolio image structure:
   imageA(number) = left column
   imageB(number) = right column */
.paired-image-grid {
  align-items: start;
}

.paired-image-grid .media-frame {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
}

.paired-image-grid .media-frame img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* FOOTER */

.site-footer {
  position: relative;
  min-height: 250px;
  margin-top: 52px;
  overflow: hidden;
  background: var(--yellow);
  color: var(--black);
  padding: 28px 0 36px;
}

.footer-background-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 40px;
  font-size: 11px;
}

.footer-contact {
  min-height: 148px;
  padding: 20px;
  background: var(--white);
}

/* DESKTOP-ONLY LIGHTBOX */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 7vh 7vw;
  background: rgba(0, 0, 0, .80);
}

.lightbox.is-open {
  display: flex;
}

.lightbox-content {
  width: min(1200px, 92vw);
  max-height: 85vh;

  background: transparent;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
}

.lightbox-content img {
  display: block;

  width: 100%;
  height: auto;

  max-width: 1200px;
  max-height: 85vh;

  object-fit: contain;
}

.lightbox-content video {
  width: 1200px;
  max-width: 92vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-content img,
.lightbox-content svg,
.lightbox-content iframe,
.lightbox-content object {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-content video {
  display: block;
  width: 100%;
  max-width: 1000px;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  background: #000;
}

/* Video lightboxes are narrower than image lightboxes on desktop. */
.lightbox-content:has(video) {
  width: min(1000px, 92vw);
}

.lightbox-close {
  position: fixed;
  right: 4vw;
  top: 3vh;
  width: 38px;
  height: 38px;
  border: 0;
  background: var(--black);
  color: var(--white);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}


/* ==========================================================
   TEXT TEMPLATES
   Change text sizes here.
   These are now the authoritative font-size rules for these text types.
   ========================================================== */

/* Text in the very top navigation */
.text-top {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  color: #fff200;
}

/* Category buttons */
.text-button {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: #fff200;
}

/* Intro text under buttons:
   "I work with visual communication..." */
.text-intro {
  /* font-family: Arial, Helvetica, sans-serif;*/
  font-family: "Times New Roman", Times, serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  color: #fff9ae;
}

/* Section headlines such as "Infographics" */
.text-section-title {
  /* font-family: Arial, Helvetica, sans-serif;*/
  font-family: "Times New Roman", Times, serif;
  font-size: 60px;
  font-weight: 200;
  line-height: 1;
  letter-spacing: 0;
  color: #fff9ae;
}

.text-section-title-small {
  /* font-family: Arial, Helvetica, sans-serif;*/
  font-family: "Times New Roman", Times, serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  color: #fff9ae;
}

/* Small section text such as "Selected work" */
.text-selected-work {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
}

/* Text directly under images */
.text-image-caption {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
}

.text-image-caption-link {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  color: #fff9ae;
}

/* MOBILE */

@media (max-width: 900px) {
  /* MOBILE TEXT SIZES
     Change these if you want different mobile typography. */
  .text-top {
    font-size: 14px;
    color: #fff200;
  }

  .text-button {
    font-size: 14px;
  }

  .text-intro {
    font-size: 16px;
  }

  .text-section-title {
    font-size: 50px;
  }

  .text-selected-work {
    font-size: 14px;
  }

  .text-image-caption {
    font-size: 14px;
  }

  html {
    scroll-padding-top: 65px;
  }
  body {
    font-size: 12px;
  }


  .content-width {
    width: calc(100% - 28px);
  }

  .site-header {
    min-height: 45px;
  }

  .header-inner {
    width: calc(100% - 28px);
    height: 45px;
    padding-top: 0;
    align-items: center;
  }

  .topmenu-image-link {
    width: 190px;
    max-width: calc(100% - 55px);
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 20px;
    height: 15px;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle span {
    width: 100%;
    height: 2px;
    background: var(--yellow);
    transition: transform .2s ease, opacity .2s ease;
  }

  .menu-toggle.is-open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  .menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  .mobile-nav {
    display: none;
    padding: 14px;
    border-top: 1px solid #222;
    background: var(--black);
    color: var(--white);
    gap: 13px;
  }




  .hero-area {
    position: relative;
    overflow: hidden;   /* clips anything outside */
  }

  .hero-background-image {
    top: -100;
    left: 0;
    width: 1500px;
    max-width: none;
    height: auto;
  }

  .mobile-nav.is-open {
    display: grid;
  }

  .mobile-nav .header-symbols {
    margin-top: 5px;
  }

  .intro {
    padding-top: 190px;
    padding-bottom: 28px;
  }

  .filter-buttons {
    gap: 6px;
    margin-top: 0;
    margin-bottom: 18px;
  }

  .filter-button {
    padding: 7px 13px;
  }

  .portfolio-section {
    margin-bottom: 24px;
  }

  .section-heading {
    padding: 5px 0 4px;
    margin-bottom: 8px;
  }

  .section-heading h2 {
  }

  .two-columns {
    grid-template-columns: 1fr;
  }

  .image-column-grid {
    grid-template-columns: 1fr;
  }

  .image-column {
    gap: 12px;
  }

  .work-grid,
  .stack {
    gap: 12px;
  }
  .media-frame,
  .media-wide {
    height: auto;
    aspect-ratio: auto;
  }

.svg-frame {
    aspect-ratio: auto;
    height: auto;
  }

  .svg-frame .interactive-svg {
    width: 100%;
    height: auto;
  }

  .featured {
    margin-bottom: 12px;
  }

  .subheading {
    margin-top: 19px;
  }

  .work-item figcaption {
  }

  .site-footer {
    min-height: 205px;
    margin-top: 32px;
    padding: 18px 0 26px;
  }

.footer-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 40px;
  align-items: start;
  font-size: 11px;
}

.footer-profile-image {
  display: block;
  width: 50%;
  height: auto;
  justify-self: end;
}

  .footer-contact {
    min-height: 110px;
    padding: 10px;
  }

  /* On mobile, only video thumbnails may open the lightbox. */
  .lightbox {
    padding: 20px 12px;
  }

  .lightbox.is-open {
    display: flex;
  }

  .lightbox-content,
  .lightbox-content:has(video) {
    width: 100%;
    max-width: 100%;
    background: #000;
  }

  .lightbox-content video {
    width: 100%;
    max-width: 100%;
    max-height: 80vh;
  }

  .lightboxable {
    cursor: pointer;
  }

  .lightboxable:has(.video-thumbnail) {
    cursor: pointer;
  }
}


/* Keep backgroundimage.png visible on mobile.
   Desktop keeps top: -150px; mobile uses a smaller upward offset. */
@media (max-width: 600px) {
  .hero-background-image {
    position: absolute;
    top: -200px !important;
    bottom: auto !important;
    left: -100;
    width: 400%;
    max-width: none;
    height: auto;
  }

.hero-area {
  position: relative;
  overflow: hidden;
}
}
