main {
	padding: 2rem ;
	display: flex;
	flex-flow: row;
	gap: 2rem;
}
aside {
	margin: 0 8px 0 -8px;
	padding-top: 3rem;
	min-width: 170px;
}
aside li {
	/*padding: .3rem 0;*/
	padding: 6px 10px;
}
aside li.active {
	font-weight: 550;
	border: 1px solid rgb(160, 160, 160);
	border-radius: 6px;
}
aside li,
aside li a {
	font: 400 1rem/1.5rem var(--font);
	text-decoration: none;
}
aside li a:hover {
	text-decoration: underline;
}
aside li.active a:hover {
	text-decoration: none;
}
article {
	width: 100%;
}
article section {
	width: 100%;
}
.title {
	display: flex;
	flex-flow: column;
	gap: 1rem;
	/*margin: 3rem auto 0;*/
	margin: 0;
	padding: 0;
	max-width: 1360px;
}
.breadcrumb {
	display: flex;
	flex-flow: row;
}
.breadcrumb > li:after {
	content: '/';
	margin: 0 .3rem;
}
.breadcrumb > li a {
	color: #000;
  text-transform: capitalize;
}
.viewer-popup .breadcrumb {
	margin: 1rem 0 0 1rem;
}
.viewer-popup .breadcrumb > li,
.viewer-popup .breadcrumb > li a,
.viewer-popup .breadcrumb > li:after {
	color: #000;
}
.collection-page .portfolio-header {
  margin: 0;
  padding: 0 .2rem 1.5rem;
  width: clamp(240px, calc(100% - 3rem), 1360px);
  align-items: last baseline;
}
.collection-page .collection-cards {
  margin: 0;
	padding: .5rem 0 4rem;
  width: clamp(240px, calc(100% - 3rem), 1360px);
	gap: 2rem;
	flex-wrap: wrap;
}
.collection-item {
	position: relative;
	cursor: pointer;
	padding: 4px;
	max-width: 440px;
	width: calc(33% - 1.2rem);
	gap: 1px;
	/*border: 1px solid rgb(100 100 100);*/
}
.collection-item figure {
  aspect-ratio: 4 / 3;
  width: 100%; /* or set max-width for control */
  max-width: 800px; /* optional: limits max size */
  height: auto;
  overflow: hidden;
  border-radius: 4px;
}
.collection-item figure img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* or 'contain' if you prefer */
  display: block;
  transition: transform .6s cubic-bezier(0.4, 0, 0.2, 1);
		will-change: transform;
}
.collection-item:hover figure img {
	transform: scale(1.03) ;
}
.collection-item p {
	margin: 0;
	padding: .5rem .0;
	font: 400 .9rem/1.1rem var(--font);
	color: #000;
}
/*.collection-item.has-case-study::before {
	content: 'case study';
	position: absolute;
	top: 1rem;
	right: 1rem;
	font: 500 .9rem var(--font);
	color: #000;
	z-index: 2;
	padding: 4px 6px;
	background: rgba(255, 255, 255, .8);
	border-radius: .5rem;
}*/
.viewer-popup.hidden {
	display: none;
}
.viewer-popup {
	padding: 1rem;
	position: fixed;
	top: 1rem;
	left: 1rem;
	width: calc(100% - 2rem);
	height: calc(100vh - 2rem);
	border-radius: 1rem;
	background: #fff;
	z-index: 100;
	display: flex;
	flex-flow: column;
	gap: .3rem;
}
/*.viewer-popup::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100vh;
	z-index: 99;
	background: rgba(0,0,0, .1);
}*/
.viewer-popup-close {
	cursor: pointer;
	position: absolute;
	top: 1rem;
	right: 1rem;
	display: block;
	width: 32px;
    height: 32px;
    background: rgb(240 240 242) !important;
    border-radius: 16px;
}
.viewer-popup-close::after, .viewer-popup-close::before {
    content: '';
    position: absolute;
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: #8b8eb5;
}
.viewer-popup-close::before {
	top: calc(50% - 1px);
    left: calc(50% - 8px);
    transform: rotate(-45deg);
}
.viewer-popup-close::after {
	top: calc(50% - 1px);
    left: calc(50% - 8px);
    transform: rotate(45deg);
}
.viewer-popup-title {
	padding: 0 0 1rem 1rem;
	font: 600 2rem var(--font);
	color: #000;
}
.viewer-popup-content {
	/*padding: 1rem;*/
	display: flex;
	align-items: center;
	justify-content: center;
}
.viewer-popup-content figure {
	width: 80%;
	height: 80vh;
}
.viewer-popup-content figure img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: .5rem;
}
.viewer-popup-content figure {
	position: relative;
}
.button-cs {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    padding: 0 1.4rem;
    height: 56px;
    color: #111;
    background: #fff;
    border-radius: 8px;
    font: 500 1rem / 56px var(--font);
}
@media (prefers-color-scheme: dark) {
	.breadcrumb li,
	.breadcrumb li a {
		color: #fff;
	}
	.collection-item p {
		color: #fff;
	}
}




.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  flex-direction: column;
  padding: 1rem;
  animation: overlayFadeIn 0.2s ease forwards;
}

.modal-content {
  position: relative;
  background: white;
  max-width: 100%;
  max-height: 100%;
  height: 100vh;
  padding: 1.5rem;
  box-sizing: border-box;
  text-align: center;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-flow: column;
  justify-content: flex-start;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  animation: modalFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 0.06s; /* delays content until overlay starts fading */
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


.modal-content .breadcrumb {
	width: 100%;
}
.modal-content .breadcrumb li,
.modal-content .breadcrumb li a {
	color: #000;
  text-transform: capitalize;
}

.modal-title {
  margin-bottom: 0;
  color: #000;
  width: 100%;
  text-align: left;
  font: 600 2rem var(--font);
}


.modal-close {
	cursor: pointer;
	position: absolute;
	top: 1rem;
	right: 1rem;
	display: block;
	width: 32px;
    height: 32px;
    background: rgb(240 240 242) !important;
    border-radius: 16px;
}
.modal-close::after, .modal-close::before {
    content: '';
    position: absolute;
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: #8b8eb5;
}
.modal-close::before {
	top: calc(50% - 1px);
    left: calc(50% - 8px);
    transform: rotate(-45deg);
}
.modal-close::after {
	top: calc(50% - 1px);
    left: calc(50% - 8px);
    transform: rotate(45deg);
}

.modal-main {
  /*display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-width: 1040px;
  width: 80%;*/
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 1080px;
  height: 80vh;      /* or whatever your modal max-height is */
  overflow: hidden;
  padding: 1rem;
}
.modal-main figure {
	position: relative;
}
.modal-main video,
.modal-main img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  object-fit: contain;     /* Maintain aspect ratio without clipping */
  border-radius: 8px;
  display: block;
}
.modal-figure {
	position: relative;
	max-width: 1040px;
}
.modal-image {
  max-height: 60vh;
  max-width: 100%;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.modal-image.fade-out {
  opacity: 0;
}

.nav {
  margin: 1rem;
  background: rgba(255,255,255,0.8);
  border: none;
  /*font-size: 2rem;*/
  cursor: pointer;
  position: absolute;
  top: calc(50% - 24px);
  transform: translateY(-50%);
  /*padding: 0.5rem 1rem;*/
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  transition: var(--def-transition);
  /*background: rgb(240 240 242);*/
}
.nav:hover {
	background: rgb(240 240 242);
}

.nav::before {
	content: '';
    display: block;
    width: 28px;
    height: 28px;
    position: absolute;
    right: 11px;
	top: 10px;
    --icon: url('../images/arrow-right.svg');
    -webkit-mask-image: var(--icon);
    mask-image: var(--icon);
    -webkit-mask-size: 100%;
    mask-size: 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    background: #000;
    
}

.nav.prev {
  left: 0;
  transform: rotate(180deg);
}

.nav.next {
  right: 0;
}

.modal-thumbnails {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  max-width: 100%;
  overflow-x: auto;
}

.modal-thumb {
  width: 60px;
  height: auto;
  cursor: pointer;
  opacity: 0.6;
  border: 2px solid transparent;
}

.modal-thumb.active,
.modal-thumb:hover {
  opacity: 1;
  border-color: #333;
}

.modal-button-container {
	position: absolute;
    bottom: 2rem;
    right: 1.5rem;
    padding: 4px;
}
.modal-cs-btn {
	position: relative;
	display: block;
    padding: 0 1.4rem;
    height: 56px;
    color: #111;
    background: #fff;
    border-radius: 8px;
    font: 500 1rem / 56px var(--font);
    z-index: 3;
    
}
.modal-button-container .button-outline {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    /*filter: blur(5px);*/
    /*background: #A4A7FF;*/
    z-index: 2;
    border-radius: .7rem;

    background: rgba(255, 255, 255, 0.1); /* Light transparent background */
    /*border-radius: 16px;*/
    /*padding: 2rem;*/
    /*box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);*/
    /*box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.02), 0 5px 8px 0 rgba(0, 0, 0, 0.03), 0 12px 18px 0 rgba(0, 0, 0, 0.04), 0 40px 60px 0 rgba(0, 0, 0, 0.1);*/
    box-shadow:
		0 2.8px 2.2px rgba(0, 0, 0, 0.02),
		0 6.7px 5.3px rgba(0, 0, 0, 0.028),
		0 12.5px 10px rgba(0, 0, 0, 0.035),
		0 22.3px 17.9px rgba(0, 0, 0, 0.042);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
    transition: var(--def-transition);
}
.modal-button-container:hover .button-outline {
	box-shadow:
		0 2.8px 2.2px rgba(0, 0, 0, 0.02),
		0 6.7px 5.3px rgba(0, 0, 0, 0.028),
		0 12.5px 10px rgba(0, 0, 0, 0.035);
}

.image-blur-placeholder {
  filter: blur(12px);
  transition: filter 0.6s ease, opacity 0.3s ease;
  opacity: 0.3;
}

.image-loaded {
  filter: blur(0);
  opacity: 1;
}

@media (prefers-color-scheme: dark) {
	aside a {
		color: var(--text-color);
	}
}

@media screen and (max-width: 1080px) {
  .collection-page {
    display: flex;
    flex-flow: column;
  }
  .collection-page aside {
    padding: 0;
  }
  .collection-page aside ul {
    display: flex;
    flex-flow: row;
    flex-wrap: wrap;
  }
}
@media screen and (max-width: 960px) {
  .collection-page .portfolio-header,
  .collection-page .collection-cards {
    width: 100%;
  }
  .collection-page .collection-cards {
    gap: 1rem;
  }
  .collection-page .collection-cards .collection-item {
    width: calc(33% - 0.6rem);
  }
}
@media screen and (max-width: 640px) {
  .modal-content .breadcrumb {
    display: none;
  }
  .collection-page .portfolio-header .toggle {
    display: none;
  }
  .collection-page .collection-cards .collection-item {
    width: calc(50% - 0.6rem);
  }
  .collection-page .modal-overlay {
    padding: 0;
  }
  .collection-page .modal-overlay .modal-content {
    border-radius: 0;
  }
  .collection-page .modal-content .nav.prev,
  .collection-page .modal-content .nav.next {
    display: none;
  }
  .collection-page .modal-main {
    padding: 0;
  }
  .collection-page .modal-main figure {
    position: initial;
  }
  .collection-page .modal-thumbnails {
    display: none;
  }
  .collection-page .modal-button-container {
    position: absolute;
    bottom: 2rem;
    right: 0;
    padding: 4px;
    width: 90%;
    translate: -50%;
    left: 50%;
    z-index: 3;
  }
  .modal-button-container .button-outline {
    box-shadow: none;
    border: 2px solid rgba(169, 169, 169, 0.4);
  }
}
@media screen and (max-width: 480px) {
  .collection-page .collection-cards .collection-item {
    width: 100%;
  }
}