html {
  height: 100%;
}

body {
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: relative;
  background-color: white;
  height: 100% !important;
  max-height: 100% !important;
  top: 0;
  size: 100% !important;
  width: 100% !important;
  padding: 0;
  margin: 0;
  font-family: "Libre Baskerville";
  overflow: hidden;
}
@media screen and (max-width: 43.75rem) {
  body {
    height: auto !important;
    max-height: none !important;
    overflow: visible;
  }
}

.container {
  margin: auto;
  width: 90%;
  max-width: 90%;
  margin-top: 5rem;
  height: calc(100vh - 5rem);
}
@media screen and (max-width: 43.75rem) {
  .container {
    width: 95% !important;
    height: auto;
    margin-bottom: 4rem;
    margin-top: 0;
  }
}

a {
  text-decoration: none;
  color: #074C71;
}

.portfolio-shell {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 5rem;
  align-items: start;
  height: 100%;
}
@media screen and (max-width: 43.75rem) {
  .portfolio-shell {
    display: block;
    height: auto;
  }
}

.portfolio-sidebar-area {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  height: max-content;
}
@media screen and (max-width: 43.75rem) {
  .portfolio-sidebar-area {
    position: fixed;
    top: 0;
    left: 5%;
    width: 95%;
    height: 6rem;
    padding-top: 2rem;
    box-sizing: border-box;
    z-index: 10;
    background: #fff;
  }
}

.portfolio-header {
  margin-bottom: 2rem;
}

.portfolio-sidebar {
  padding-top: 1rem;
}
@media screen and (max-width: 43.75rem) {
  .portfolio-sidebar {
    width: 100%;
    position: static;
    padding-top: 0;
  }
}
.portfolio-sidebar .burger-toggle {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.25rem 0;
  background: none;
  border: 0;
  cursor: pointer;
}
@media screen and (max-width: 43.75rem) {
  .portfolio-sidebar .burger-toggle {
    display: flex;
    position: absolute;
    top: 2.4rem;
    right: 2rem;
  }
}
.portfolio-sidebar .burger-toggle span {
  display: block;
  width: 1.5rem;
  height: 0.18rem;
  background: #aaa;
}
.portfolio-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
@media screen and (max-width: 43.75rem) {
  .portfolio-sidebar nav {
    display: none;
    margin-top: 0.75rem;
  }
}
@media screen and (max-width: 43.75rem) {
  .portfolio-sidebar.is-open nav {
    display: flex;
    background: #fff;
    margin-top: -3rem;
    padding: 2rem 1.5rem 3rem 0;
  }
}
.portfolio-sidebar a {
  font-family: "Libre Baskerville";
  display: block;
  padding: 0.9rem;
  color: #999;
  font-size: 1.2rem;
  font-weight: 400;
  transition: all 0.2s ease;
}
.portfolio-sidebar a:hover, .portfolio-sidebar a.active {
  color: #074C71;
  background: #EDF3FA;
  border-radius: 0.5rem;
  font-weight: 700;
}

.portfolio-main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  height: 100vh;
  margin-top: -5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media screen and (max-width: 43.75rem) {
  .portfolio-main {
    height: auto;
    margin-top: 0;
    overflow-y: visible;
    padding-right: 0;
    padding-top: 6rem;
  }
}

.portfolio-header {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.portfolio-header h1,
.portfolio-header h3 {
  display: block;
  margin: 0;
}

.portfolio-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modular-f-logo {
  display: block;
  height: 2.2rem;
  margin-right: 10px;
  margin-left: 15px;
  flex-shrink: 0;
  position: relative;
  top: -14px;
}
@media screen and (max-width: 43.75rem) {
  .modular-f-logo {
    height: 1.7rem;
    margin-right: 7px;
    margin-left: 0;
  }
}

.portfolio-section {
  display: none;
}
.portfolio-section.active {
  display: block;
}

.work-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media screen and (max-width: 43.75rem) {
  .work-tiles {
    grid-template-columns: 1fr;
  }
}

.work-tile {
  display: block;
  position: relative;
  overflow: hidden;
  border: 0.5px solid #ddd;
  border-radius: 0.5rem;
  background: #fafafa;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.work-tile img {
  display: block;
  width: 100%;
  height: auto;
  box-sizing: border-box;
  transition: 0.3s ease all;
}
.work-tile .work-tile-label {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.6rem;
  line-height: 200%;
  text-shadow: 0 0 1rem black;
  pointer-events: none;
}
.work-tile:hover img, .work-tile:focus-visible img {
  transform: scale(1.015);
  filter: brightness(1.1) blur(4px);
}

.img-w-text {
  display: block;
  position: relative;
  overflow: hidden;
  border: 0.5px solid #ddd;
  border-radius: 0.5rem;
  background: #fafafa;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.img-w-text img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 0;
  box-sizing: border-box;
}
.img-w-text .img-text {
  position: absolute;
  bottom: 0;
  left: 5rem;
  z-index: 1;
  transform: translate(-3rem, -1.5rem);
  color: white;
  font-size: 1rem;
  letter-spacing: 0.2rem;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  line-height: 170%;
  text-shadow: 0 0 1rem black;
  pointer-events: none;
}
.img-w-text .img-text .img-text-sub {
  font-size: 1.2rem;
  font-weight: 400;
  text-transform: none;
  font-style: italic;
  letter-spacing: 0;
}

.column,
.masonry-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.column img,
.masonry-column img {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
  margin-left: auto;
  margin-right: auto;
  height: auto;
  margin-bottom: 8%;
  border: 0.5px solid #ddd;
  border-radius: 0.5rem;
  pointer-events: none;
  break-inside: avoid;
}
.column iframe,
.masonry-column iframe {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
  margin-left: auto;
  margin-right: auto;
  height: auto;
  margin-bottom: 8%;
  border: 0.5px solid #ddd;
  border-radius: 0.5rem;
  break-inside: avoid;
}
.column img.device,
.masonry-column img.device {
  max-width: 92%;
  height: auto;
  margin-bottom: 8%;
  border: 0 solid #fff;
  border-radius: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 0.5rem #ddd);
}

.portfolio-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media screen and (max-width: 43.75rem) {
  .portfolio-grid {
    gap: 1rem;
  }
}

.portfolio-grid {
  margin-bottom: 2rem;
}
.portfolio-grid img {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 1rem;
  break-inside: avoid;
}
.portfolio-grid img.portfolio-wide {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
}
.portfolio-grid iframe.portfolio-wide {
  width: 100%;
  height: auto;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
}

.masonry-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media screen and (max-width: 43.75rem) {
  .masonry-columns {
    display: block;
  }
}

.masonry-column {
  min-width: 0;
}
.masonry-column .img-w-text {
  margin: 0;
}
.masonry-column img {
  margin-bottom: 0;
}
.masonry-column iframe {
  margin-bottom: 0;
}

.masonry-wide {
  display: block;
  width: 100%;
  margin-bottom: 0;
  border: 0.5px solid #ddd;
  border-radius: 0.5rem;
  box-sizing: border-box;
}

.container h1 {
  font-size: 1.7rem;
  line-height: 1.1;
  color: #333;
  text-align: left;
  font-family: "Libre Baskerville";
  text-transform: none;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 2rem;
  display: block;
  position: relative;
  top: 4px;
}
@media screen and (max-width: 43.75rem) {
  .container h1 {
    font-size: 1.7rem;
  }
}
.container h2 {
  display: none;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: normal;
  color: #555;
  font-family: "Libre Baskerville";
  text-align: left;
  letter-spacing: 0.2rem;
  margin-bottom: 1.2rem;
  margin-top: 5rem;
}
@media screen and (max-width: 43.75rem) {
  .container h2 {
    margin-top: 2rem;
    font-size: 1rem;
  }
}
.container hr {
  display: none;
  border: 0.07rem solid #ddd;
  margin-bottom: 2rem;
  max-width: 100%;
}
.container h3 {
  display: none !important;
  font-size: 1rem;
  font-weight: 500;
  color: #074C71;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  display: block;
  text-align: right;
  margin-bottom: 0;
  align-self: flex-end;
}
.container p {
  font-size: 1.5rem;
  font-weight: 400;
  color: #777;
  font-family: "Libre Baskerville";
  display: block;
  text-align: left;
  line-height: 160%;
  margin-bottom: 2rem;
  margin-top: 5rem;
}
