/* Horizontal film roll styles */
.filmroll-container {
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 0;
}

.filmroll-track {
  display: flex;
  gap: 12px;
  align-items: center;
  will-change: transform;
}

.filmroll-item {
  display: inline-flex;
  flex-direction: column;
  width: clamp(390px, 56vw, 825px); /* ~75% of previous width for slightly smaller tiles */
  flex: 0 0 clamp(390px, 56vw, 825px);
  text-decoration: none;
}

.filmroll-item img {
  width: 100%;
  aspect-ratio: 16 / 9; /* keep proper landscape ratio */
  height: auto; /* scales height from width */
  object-fit: cover;
  border-radius: 8px;
  display: block;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.filmroll-item.dim img {
  filter: grayscale(70%);
  opacity: 0.85;
}

.filmroll-item.center img {
  filter: none;
  opacity: 1;
}

.filmroll-caption {
  font-size: 0.85rem;
  margin-top: 6px;
  text-align: center;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--color-link-hover);
}

.one {
  width: 160px;
  height: 160px;
  position: relative;
}

.two {
  width: 160px;
  height: 160px;
  position: absolute;
  z-index: 2;
  pointer-events: none;
  visibility: hidden;
}

.one img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.two img {
  will-change: opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.two video {
  will-change: auto;
  transform: none;
  backface-visibility: visible;
  color-space: sRGB;
}

.fade {
  transition: opacity .2s ease-in-out;
  -moz-transition: opacity .2s ease-in-out;
  -webkit-transition: opacity .2s ease-in-out;
}

.highlight {
  background-color: var(--color-highlight);
}

.project-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  flex-wrap: wrap;
  transition: all 0.3s ease;
}

.project-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}


.project-item:hover .two {
  opacity: 1;
  visibility: visible;
}

.project-item.focus .two {
  visibility: visible;
}

/* Keyboard / focus state: expand same as hover */
.project-item:focus,
.project-item.focus,
.project-item:focus-within {
  outline: 2px solid rgba(0,0,0,0.08);
}

.project-item.focus .project-content,
.project-item:focus-within .project-content {
  max-height: 500px;
  overflow: visible;
}

.project-item.focus .project-description-full,
.project-item:focus-within .project-description-full {
  display: block;
}

.project-image {
  width: 25%;
  min-width: 160px;
  flex-shrink: 0;
}

/* Optional grey overlay filter on hover when enabled via body.hover-filter */
.hover-filter .project-image .one::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity 200ms ease;
  border-radius: 6px;
}
.hover-filter .project-item:hover .project-image img {
  filter: brightness(1);
}
.hover-filter .project-item:hover .project-image .one::after {
  opacity: 1;
}

.project-content {
  flex: 1;
  min-width: 300px;
  overflow: hidden;
  transition: max-height 0.3s ease;
  max-height: 150px;
}

.project-links {
  margin-top: 8px;
  font-size: 12px;
}

.project-links a {
  margin-right: 15px;
  text-decoration: none;
  font-weight: 500;
}

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

.project-item:hover .project-content {
  max-height: 500px;
  overflow: visible;
}

.project-description-full {
  display: none;
}

.project-item:hover .project-description-full {
  display: block;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
}

.misc-item {
  display: flex;
  gap: 20px;
  padding: 20px;
}

.misc-title {
  width: 25%;
  min-width: 160px;
  text-align: center;
  flex-shrink: 0;
}

.misc-content {
  width: 75%;
  flex: 1;
}

/* Video container - responsive 16:9 aspect ratio */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin: 15px 0;
  border-radius: 8px;
  background: #000;
}

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

.audio-container {
  margin: 15px 0;
  padding: 15px;
  background: #f5f5f5;
  border-radius: 8px;
}

/* Preserve newline characters in project description text (\n -> line breaks) */
.project-description-full p {
  white-space: pre-wrap;
  white-space: -moz-pre-wrap;
  white-space: -pre-wrap;
  white-space: -o-pre-wrap;
  word-wrap: break-word;
}

/* Art item styling */
.art-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  flex-wrap: wrap;
}

.art-image {
  width: 25%;
  min-width: 160px;
  flex-shrink: 0;
}

.art-content {
  flex: 1;
  min-width: 300px;
  overflow: hidden;
}

.art-details {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
  font-size: 0.95em;
}

.art-details p {
  margin: 5px 0;
}

/* Full-width art layout (used by fine-art page) */
.art-item.fullwidth {
  display: block;
  padding: 0 0 30px 0;
}
.art-item.fullwidth .one {
  width: 100%;
  height: auto;
  position: relative;
}
.art-item.fullwidth .two {
  position: absolute;
  inset: 0;
}
.art-item.fullwidth .art-image img,
.art-item.fullwidth .art-image video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.art-item.fullwidth .art-image {
  /* full-bleed with configurable gutters so image doesn't touch viewport edges */
  --page-gutter: 220px; /* adjustable gutter */
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: calc(-50vw + var(--page-gutter));
  margin-right: calc(-50vw + var(--page-gutter));
  width: calc(100vw - (2 * var(--page-gutter)));
  max-width: 100vw;
  box-sizing: border-box;
  padding-left: 0;
  padding-right: 0;
}
.art-item.fullwidth .art-content {
  padding: 12px 0;
}

/* Music item styling */
.music-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  flex-wrap: wrap;
}

.music-content {
  flex: 1;
  min-width: 300px;
  overflow: hidden;
}

.music-details {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
  font-size: 0.95em;
}

.music-details p {
  margin: 5px 0;
}

/* Visually hidden utility */
.sr-only { position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }

/* Carousel component styles */
.carousel-container {
  position: relative;
  background: #f0f0f0;
  border-radius: 12px;
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}
.carousel-slide-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 66.67%;
  background: #000;
}
.carousel-slide-content {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.carousel-slide-content:hover { transform: scale(1.02); }
.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.carousel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0.25));
  color: #fff;
  padding: 10px 14px;
  font-size: 1rem;
  text-align: center;
  z-index: 15;
  pointer-events: none;
}
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 20px;
  z-index: 20;
  border-radius: 4px;
  transition: background 0.2s;
}
.carousel-nav:hover { background: rgba(0,0,0,0.8); }
.carousel-nav-prev { left: 12px; }
.carousel-nav-next { right: 12px; }
.carousel-dots-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: #f0f0f0;
}
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  padding: 0;
}
.carousel-dot.active { background: #2b7a78; }

@media (max-width: 768px) {
  .project-item {
    flex-direction: column;
  }

  .project-image {
    width: 100%;
  }

  .project-content {
    width: 100%;
  }

  .misc-item {
    flex-direction: column;
  }

  .misc-title {
    width: 100%;
    text-align: center;
  }

  .misc-content {
    width: 100%;
  }

  .art-item {
    flex-direction: column;
  }

  .art-image {
    width: 100%;
  }

  /* On small screens, reduce gutter so image has small margins rather than large offsets */
  .art-item.fullwidth .art-image {
    margin-left: calc(-50vw + 12px);
    margin-right: calc(-50vw + 12px);
    width: calc(100vw - 24px);
  }

  .music-item {
    flex-direction: column;
  }
}

/* Leadership item styling */
.leadership-item {
  display: flex;
  padding: 20px;
  margin-bottom: 15px;
  background: white;
  border-left: 4px solid var(--color-link);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.leadership-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.leadership-content {
  flex: 1;
  width: 100%;
}

.leadership-content ul {
  margin: 10px 0;
  padding-left: 20px;
  color: #666;
}

.leadership-content ul li {
  margin: 5px 0;
}