* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --grid-item-size: 300px;
  --grid-columns: 3;
  --grid-gap: 1.5rem;
  --content-padding: 2rem;
  --max-width: calc(
    var(--grid-item-size) * var(--grid-columns) + var(--grid-gap) * 2 +
      var(--content-padding)
  );
  --max-width-inner: calc(
    var(--grid-item-size) * var(--grid-columns) + var(--grid-gap) * 2
  );
}

@media (min-width: 1400px) {
  :root {
    --grid-item-size: 400px;
  }
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f0ebe3;
  position: relative;
  display: flex;
  justify-content: center;
  overflow-y: scroll;
  overflow-x: hidden;
}

.body-wrapper {
  max-width: var(--max-width);
  width: 100%;
  background: #fffefc;
  position: relative;
  min-height: 100vh;
}

.body-wrapper::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: var(--max-width);
  width: 100%;
  height: 100vh;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

/*
@media (min-width: calc(300px * 3 + 1.5rem * 2 + 2rem + 1px)) {
  .body-wrapper {
    border-left: 1px dashed #474747;
    border-right: 1px dashed #474747;
  }
}
*/
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  opacity: 0.55;
  pointer-events: none;
  z-index: -2;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: var(--max-width);
  width: 100%;
  height: 3.5rem;
  background: #fffefc;
  display: flex;
  align-items: center;
  padding: 1rem;
  z-index: 100;
  will-change: auto;
}
/*
@media (min-width: calc(300px * 3 + 1.5rem * 2 + 2rem + 1px)) {
  .top-nav {
    border-left: 1px dashed #474747;
    border-right: 1px dashed #474747;
  }
}
*/

.top-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  opacity: 0.2;
  pointer-events: none;
  z-index: -1;
}

.top-nav-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: var(--max-width-inner);
}

.title-name {
  font-size: 1rem;
  display: inline;
}

.nav-links {
  margin-left: auto;
  font-size: 1rem;
}

.nav-links a {
  color: black;
  text-decoration: none;
}

.nav-links a:hover {
  text-decoration: underline;
}

.about-link {
  position: fixed;
  right: 2rem;
}

.content-area {
  margin-top: 3.5rem;
  position: relative;
  padding-left: 1rem;
  padding-bottom: 5rem;
  z-index: 1;
}

.sticky-header {
  position: sticky;
  top: 3.5rem;
  height: 2rem;
  background: #fffefc;
  color: rgb(0, 0, 0);
  padding: 0.5rem 0;
  font-size: 1rem;
  font-weight: bold;
  z-index: 20;
  text-align: left;
  scroll-margin-top: 3.5rem;
}

.sticky-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  opacity: 0.2;
  pointer-events: none;
  z-index: -1;
}

.sticky-header::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--max-width-inner);
  max-width: calc(100% - 1rem);
  border-bottom: 1px solid black;
}

/*
.section {
  margin-bottom: 6.5rem;
}
*/

.content {
  padding: 1rem 1.5rem;
  line-height: 1.6;
}

.content-item {
  padding: 1rem 1rem;
  font-size: 1rem;
}

#contact-info {
  font-size: rem;
}

.content-item a {
  font-size: 1rem;
  color: black;
  text-decoration: none;
}

.content-item a:hover {
  text-decoration: underline;
}

.content-item p {
  font-size: 1rem;
}

.section {
  display: block;
}

.section-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 1rem;
}

@media (min-width: 768px) {
  .section-content {
    display: grid;
    grid-template-columns: repeat(
      auto-fill,
      minmax(var(--grid-item-size), 1fr)
    );
    max-width: var(--max-width);
    gap: 0.5rem 1rem;
    padding: 1rem;
  }
}

.content-item.video-content-item {
  width: 100%;
  padding-left: 0rem;
}

.content-item .video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.content-item .video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 10;
  background: #fffefc;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.video-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
}

.video-title {
  margin: 0;
  text-align: left;
}

.client-name {
  font-weight: bold;
}

.contact-me {
  font-size: medium;
}

.info-toggle {
  padding: 0;
  font-size: 0.75rem;
  cursor: pointer;
  background: none;
  border: none;
  color: #666;
}

.info-toggle:hover {
  color: #000;
}

.video-details {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease;
  padding: 0;
  text-align: left;
}

.video-details p {
  font-size: 0.75rem;
}

.video-content-item.expanded .video-details {
  max-height: 200px;
  padding-top: 0.5rem;
}
