/* ============================================================
   GALLERY front-end styles (namespaced .arg-). Themeable via
   CSS variables set on the root and lightbox by gallery.js:
   --arg-bg --arg-accent --arg-font --arg-gap --arg-sep
   --arg-hover --arg-mcols --arg-cursor --arg-loupe-size
   ============================================================ */

.arg-root,
.arg-root * {
	box-sizing: border-box;
}

.arg-root {
	position: relative;
	width: 100%;
	font-family: var(--arg-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif);
}

/* ---------- Back button (shared) ---------- */
.arg-back {
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	cursor: pointer;
	color: var(--arg-accent, #000);
	padding: 0;
	transition: transform 0.2s ease;
}

.arg-back svg {
	width: 26px;
	height: 26px;
}

/* ============================================================
   DESKTOP — strips
   ============================================================ */
.arg-desktop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 9990;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: var(--arg-bg, #fff);
}

/* Inline mode: sit in the page flow and scroll with it. */
.arg-desktop.arg-inline {
	position: relative;
	top: auto;
	left: auto;
	width: 100%;
	height: auto;
	z-index: 1;
}

.arg-desktop .arg-back {
	position: absolute;
	top: 34px;
	left: 32px;
	width: 44px;
	height: 44px;
	z-index: 5;
}

.arg-desktop .arg-back:hover {
	transform: translateX(-3px);
}

.arg-wrapper {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
}

.arg-main {
	position: relative;
	width: 100%;
	flex: 1;
	background: var(--arg-bg, #fff);
	overflow: hidden;
	display: flex;
}

/* Desktop squares (contact sheet) */
.arg-squares {
	display: grid;
	grid-template-columns: repeat(var(--arg-cols, 8), var(--arg-cell, 120px));
	grid-auto-rows: var(--arg-cell, 120px);
	gap: var(--arg-gap, 3px);
	width: 100%;
	height: 100%;
	justify-content: center;
	align-content: center;
}

.arg-square {
	position: relative;
	width: var(--arg-cell, 120px);
	height: var(--arg-cell, 120px);
	overflow: hidden;
	cursor: pointer;
	background: #f2f2f2;
	opacity: 0;
	transition: opacity 0.4s ease;
}

.arg-square.loaded {
	opacity: 1;
}

.arg-square img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform 0.3s ease;
}

.arg-square-zoom .arg-square:hover img {
	transform: scale(1.04);
}

.arg-strip {
	position: relative;
	height: 100%;
	flex: 1;
	overflow: hidden;
	cursor: pointer;
	transition: flex 0.3s ease, opacity 0.4s ease;
	background: var(--arg-bg, #fff);
	border-right: var(--arg-gap, 3px) solid var(--arg-sep, #fff);
	opacity: 0;
}

.arg-strip.loaded {
	opacity: 1;
}

.arg-strip:last-child {
	border-right: none;
}

.arg-strip:hover {
	flex: var(--arg-hover, 1.35);
}

.arg-strip img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	pointer-events: none;
}

/* ============================================================
   MOBILE — grid
   ============================================================ */
.arg-mobile {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.arg-mobile .arg-topbar {
	position: sticky;
	top: 0;
	z-index: 6;
	display: flex;
	align-items: center;
	padding: 5px 10px;
	background: var(--arg-bg, #fff);
}

.arg-mobile .arg-back {
	width: 40px;
	height: 40px;
}

.arg-mobile .arg-back:active {
	opacity: 0.5;
}

.arg-grid {
	display: grid;
	grid-template-columns: repeat(var(--arg-mcols, 3), 1fr);
	gap: var(--arg-gap, 2px);
	width: 100%;
	padding: 0;
}

.arg-grid-item {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	cursor: pointer;
	background: #f2f2f2;
}

.arg-grid-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	opacity: 0;
	transition: opacity 0.4s ease;
}

.arg-grid-item img.loaded {
	opacity: 1;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.arg-lightbox,
.arg-lightbox * {
	box-sizing: border-box;
}

.arg-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: var(--arg-bg, #ffffff);
	z-index: 100000;
	display: none;
	opacity: 0;
	transition: opacity 0.4s ease;
	font-family: var(--arg-font, inherit);
}

.arg-lightbox.active {
	display: flex;
	opacity: 1;
}

.arg-typing::after {
	content: var(--arg-cursor, "\25AE");
	animation: arg-blink 1s infinite;
	margin-left: 2px;
}

@keyframes arg-blink {
	0%, 49% { opacity: 1; }
	50%, 100% { opacity: 0; }
}

/* ---------- Desktop lightbox ---------- */
.arg-lb-desktop .arg-lb-content {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: stretch;
	justify-content: center;
	padding: 40px 0 40px 40px;
}

.arg-lb-desktop .arg-lb-image {
	flex: 0 0 70%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 30px;
	position: relative;
}

.arg-lb-desktop .arg-lb-image img {
	width: auto;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
	cursor: none;
}

.arg-lb-desktop.arg-no-loupe .arg-lb-image img {
	cursor: default;
}

.arg-lb-desktop .arg-lb-info {
	flex: 0 0 30%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 40px 120px 40px 30px;
	overflow: hidden;
}

.arg-lb-desktop .arg-lb-title {
	font-size: 32px;
	font-weight: 700;
	margin-bottom: 12px;
	color: #000;
	overflow: hidden;
}

.arg-lb-desktop .arg-lb-year {
	font-size: 18px;
	margin-bottom: 8px;
	color: #000;
	overflow: hidden;
}

.arg-lb-desktop .arg-lb-medium {
	font-size: 16px;
	font-style: italic;
	margin-bottom: 24px;
	color: #000;
	overflow: hidden;
}

.arg-lb-desktop .arg-lb-desc {
	font-size: 16px;
	line-height: 1.6;
	color: #000;
	overflow: hidden;
}

/* Controls */
.arg-lb-controls {
	position: absolute;
	top: 40px;
	right: 40px;
	display: flex;
	gap: 20px;
	align-items: center;
	z-index: 100001;
}

.arg-magnifier-menu {
	position: relative;
}

.arg-magnifier-icon {
	width: 40px;
	height: 40px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease;
	color: var(--arg-accent, #000);
}

.arg-magnifier-icon svg {
	width: 28px;
	height: 28px;
}

.arg-magnifier-icon:hover {
	transform: scale(1.1);
}

.arg-magnifier-dropdown {
	position: absolute;
	top: 50px;
	right: 0;
	background: #fff;
	border: 2px solid var(--arg-accent, #000);
	min-width: 140px;
	display: none;
	z-index: 100002;
}

.arg-magnifier-dropdown.active {
	display: block;
}

.arg-magnifier-option {
	padding: 10px 15px;
	cursor: pointer;
	font-size: 14px;
	transition: background 0.2s ease;
	border-bottom: 1px solid #e0e0e0;
	color: #000;
}

.arg-magnifier-option:last-child {
	border-bottom: none;
}

.arg-magnifier-option:hover {
	background: #f0f0f0;
}

.arg-magnifier-option.selected {
	background: var(--arg-accent, #000);
	color: #fff;
}

.arg-fullscreen-icon {
	width: 40px;
	height: 40px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease;
	color: var(--arg-accent, #000);
}

.arg-fullscreen-icon svg {
	width: 26px;
	height: 26px;
}

.arg-fullscreen-icon:hover {
	transform: scale(1.1);
}

.arg-fullscreen-icon .arg-fs-exit {
	display: none;
}

.arg-fullscreen-icon.is-fullscreen .arg-fs-enter {
	display: none;
}

.arg-fullscreen-icon.is-fullscreen .arg-fs-exit {
	display: block;
}

.arg-control-button {
	width: 40px;
	height: 40px;
	cursor: pointer;
	transition: transform 0.2s ease, opacity 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	font-weight: 300;
	line-height: 1;
	color: var(--arg-accent, #000);
	background: transparent;
	border: none;
	padding: 0;
	position: relative;
}

.arg-control-button:hover {
	transform: scale(1.1);
}

.arg-control-button.close::before,
.arg-control-button.close::after {
	content: '';
	position: absolute;
	width: 30px;
	height: 3px;
	background: var(--arg-accent, #000);
}

.arg-control-button.close::before {
	transform: rotate(45deg);
}

.arg-control-button.close::after {
	transform: rotate(-45deg);
}

/* Magnifier loupe + effect canvases */
.arg-magnifier {
	position: absolute;
	width: 200px;
	height: 200px;
	border: 3px solid var(--arg-accent, #000);
	border-radius: 50%;
	pointer-events: none;
	display: none;
	background-repeat: no-repeat;
	background-color: #fff;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
	z-index: 1000;
}

.arg-lb-image.kaleidoscope-active {
	cursor: crosshair;
}

.arg-kaleidoscope-canvas,
.arg-filter-canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	display: none;
	z-index: 999;
}

.arg-lb-image.kaleidoscope-active .arg-kaleidoscope-canvas {
	display: block;
}

.arg-lb-image.filter-active .arg-filter-canvas {
	display: block;
}

/* ---------- Mobile lightbox ---------- */
.arg-lb-mobile {
	flex-direction: column;
}

.arg-lb-mobile .arg-lb-topbar {
	flex: 0 0 auto;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	padding: 16px 18px 8px;
}

.arg-lb-mobile .arg-close-mobile {
	position: relative;
	width: 36px;
	height: 36px;
	cursor: pointer;
	background: transparent;
	border: none;
	padding: 0;
}

.arg-lb-mobile .arg-close-mobile::before,
.arg-lb-mobile .arg-close-mobile::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 26px;
	height: 2.5px;
	background: var(--arg-accent, #000);
}

.arg-lb-mobile .arg-close-mobile::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.arg-lb-mobile .arg-close-mobile::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.arg-lb-mobile .arg-lb-content {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	display: flex;
	flex-direction: column;
	padding: 0 22px 28px;
}

.arg-lb-mobile .arg-lb-image {
	flex: 0 0 auto;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 22px;
}

.arg-lb-mobile .arg-lb-image img {
	max-width: 100%;
	max-height: 58vh;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.arg-lb-mobile .arg-lb-title {
	font-size: 22px;
	font-weight: 700;
	margin-bottom: 10px;
	color: #000;
	min-height: 1.2em;
}

.arg-lb-mobile .arg-lb-year {
	font-size: 15px;
	margin-bottom: 6px;
	color: #000;
	min-height: 1.2em;
}

.arg-lb-mobile .arg-lb-medium {
	font-size: 14px;
	font-style: italic;
	margin-bottom: 18px;
	color: #000;
}

.arg-lb-mobile .arg-lb-desc {
	font-size: 15px;
	line-height: 1.6;
	color: #000;
}

.arg-lb-mobile .arg-lb-nav {
	flex: 0 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 24px calc(14px + env(safe-area-inset-bottom));
	border-top: 1px solid #eee;
}

.arg-lb-mobile .arg-nav-button {
	background: transparent;
	border: none;
	font-size: 30px;
	font-weight: 300;
	line-height: 1;
	color: var(--arg-accent, #000);
	cursor: pointer;
	padding: 6px 14px;
}

.arg-lb-mobile .arg-nav-button:active {
	opacity: 0.5;
}

.arg-lb-mobile .arg-nav-counter {
	font-size: 13px;
	color: #888;
	letter-spacing: 0.5px;
}
