/* Studio world (studio.html): Michael's art. Black room, violet light, his pencil notes. */

body.studio {
	--ground: #0a0810;
	--ground-deep: #07060b;
	--panel: #120e1c;
	--ink: #eee8ff;
	--ink-dim: rgba(238, 232, 255, 0.66);
	--accent: #8b5cff;
	--accent-hot: #b892ff;
	--line: rgba(184, 146, 255, 0.22);
	--glow: #c6ff3d;
	--pink: #ff4fd8;
}

.studio #header h1 span small { font-family: "Big Shoulders Display", sans-serif; font-weight: 800; letter-spacing: 0.04em; color: var(--accent-hot); margin-left: 0.35em; font-size: 1.1em; }
.studio #header nav ul li a.pill { background: #f08a24; color: #1b1b1d; }
.studio #header nav ul li a.pill:hover { background: #ffc861; }
.studio input[type="submit"], .studio .button:not(.style2) { color: #fff !important; }

.studio .box, .studio .box.style2 { border-top-color: var(--accent); }

/* ---------- Hero ---------- */

.studio #intro { background-image: url("images/overlay.png"), url("../../images/graded/s-horse-rainbow-wings.jpg"); background-position: top left, center 30%; }
body.uv.studio #intro { background-image: url("images/overlay.png"), url("../../images/graded/s-horse-uv-zebra.jpg"); background-position: top left, center center; }

.studio #intro h2.neon {
	font-size: clamp(5rem, 15vw, 13rem);
	line-height: 0.85;
	color: #fbf8ff;
	text-shadow: 0 0 10px rgba(184, 146, 255, 0.9), 0 0 40px rgba(139, 92, 255, 0.7), 0 0 90px rgba(255, 79, 216, 0.35);
	margin-bottom: 0.15em;
}
.studio #intro p { font-size: 1.25em; color: #fff; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8); }
.studio #intro p cite { display: inline; font-size: 0.8em; color: rgba(255, 255, 255, 0.75); }

/* ---------- Portfolio overview: a contact sheet of his albums ---------- */

.portfolio {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	grid-template-rows: repeat(2, 15em);
	grid-template-areas:
		"horse horse spider cube mars"
		"horse horse fire flowers flowers";
	gap: 6px;
	text-align: left;
}

.tile { position: relative; overflow: hidden; display: block; color: #fff; text-decoration: none; border: 0; background: #000; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s ease, filter 0.4s ease; filter: saturate(1.05) brightness(0.88); }
.tile:hover img, .tile:focus-visible img { transform: scale(1.04); filter: saturate(1.15) brightness(1); }
.tile:after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 3, 10, 0.85) 0%, rgba(5, 3, 10, 0) 55%); }
.tile .t { position: absolute; z-index: 1; left: 0.9em; right: 0.9em; bottom: 0.8em; }
.tile .name { display: block; font-family: "Big Shoulders Display", sans-serif; font-weight: 800; font-size: 1.55em; line-height: 1; }
.tile .count { display: block; font-size: 0.8em; color: rgba(255, 255, 255, 0.7); margin-top: 0.25em; }
.tile.horse { grid-area: horse; }
.tile.horse .name { font-size: 2.6em; }
.tile.spider { grid-area: spider; } .tile.cube { grid-area: cube; } .tile.mars { grid-area: mars; }
.tile.fire { grid-area: fire; } .tile.flowers { grid-area: flowers; }
.tile.fire img { object-position: 50% 30%; }

@media screen and (max-width: 980px) {
	.portfolio { grid-template-columns: repeat(2, 1fr); grid-template-rows: 22em repeat(3, 12em); grid-template-areas: "horse horse" "spider cube" "mars fire" "flowers flowers"; }
}

.studio .main.style3 .content.wide { width: 72em; max-width: calc(100% - 3em); }

/* ---------- The sketch is the menu for the horse ---------- */

.sketch-nav { position: relative; max-width: 62em; margin: 0 auto; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.sketch-nav > img { display: block; width: 100%; height: auto; filter: contrast(1.05); transition: filter 0.6s ease; }

.note {
	position: absolute;
	display: block;
	border: 0;
	text-decoration: none;
	color: transparent;
	outline-offset: 4px;
}
/* A pencil circle around his own words: drawn on hover, already there on touch screens */
.note svg { position: absolute; inset: -30% -8%; width: 116%; height: 160%; overflow: visible; }
.note ellipse {
	fill: none;
	stroke: #f08a24;
	stroke-width: 2.4;
	stroke-linecap: round;
	vector-effect: non-scaling-stroke;
	stroke-dasharray: 1000;
	stroke-dashoffset: 1000;
	transition: stroke-dashoffset 0.6s ease;
}
.sketch-nav:hover .note ellipse { stroke-dashoffset: 760; opacity: 0.6; }
.note:hover ellipse, .note:focus-visible ellipse { stroke-dashoffset: 0 !important; opacity: 1 !important; }
@media (hover: none) { .note ellipse { stroke-dashoffset: 0; } }
.note .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

body.uv .sketch-nav > img { filter: invert(0.92) hue-rotate(200deg) contrast(1.2) brightness(0.9); }
body.uv .note ellipse { stroke: var(--glow); filter: drop-shadow(0 0 4px rgba(198, 255, 61, 0.9)); stroke-dashoffset: 0; }

/* ---------- Horse slides: photo + his note, nothing else ---------- */

.h-note {
	font-family: "Caveat", cursive;
	font-weight: 700;
	font-size: 3em;
	line-height: 1.05;
	color: var(--ink);
	margin: 0 0 0.5em 0;
}
.back-to-sketch { font-size: 0.85em; color: var(--ink-dim); text-decoration: none; border-bottom: 1px solid var(--line); }
.back-to-sketch:hover { color: var(--ink); }
.studio .main.style2 .content.box.note-box { width: 26em; }

#h-color { background-image: url("images/overlay.png"), url("../../images/graded/s-horse-uv-zebra.jpg"); }
#h-size { background-image: url("images/overlay.png"), url("../../images/graded/s-horse-raw-wood.jpg"); }
#h-fiber { background-image: url("images/overlay.png"), url("../../images/graded/s-horse-mohawk.jpg"); }
#h-wings { background-image: url("images/overlay.png"), url("../../images/graded/s-horse-pegasus-event.jpg"); }
#h-paint { background-image: url("images/overlay.png"), url("../../images/graded/s-horse-uv-close.jpg"); }

/* ---------- Project slides ---------- */

#spider { background-image: url("images/overlay.png"), url("../../images/graded/s-bike-spider-profile.jpg"); }
body.uv #spider { background-image: url("images/overlay.png"), url("../../images/graded/s-bike-neon-garage.jpg"); }
#cube { background-image: url("images/overlay.png"), url("../../images/graded/s-create-infinity-cube.jpg"); }
#mars { background-image: url("images/overlay.png"), url("../../images/graded/s-mars-rover-neon.jpg"); }
#fire { background-image: url("images/overlay.png"), url("../../images/graded/s-fire-torch.jpg"); }

.studio .box h2 { font-size: 3.6em; }
.studio blockquote { border-left: 3px solid var(--accent); font-style: normal; color: var(--ink); padding-left: 0.9em; }

#flowers .gallery { width: 60em; }

/* ---------- Blacklight on top of the shared rules ---------- */

body.uv.studio { --ink: #f1ebff; --panel: rgba(8, 4, 18, 0.9); }
body.uv.studio h2, body.uv.studio h3 { color: var(--glow); text-shadow: 0 0 6px rgba(198, 255, 61, 0.65), 0 0 26px rgba(198, 255, 61, 0.3); }
body.uv.studio #intro h2.neon { color: #fbffe8; text-shadow: 0 0 10px rgba(198, 255, 61, 0.9), 0 0 40px rgba(198, 255, 61, 0.55), 0 0 90px rgba(139, 92, 255, 0.6); }
body.uv.studio .h-note { color: var(--glow); text-shadow: 0 0 8px rgba(198, 255, 61, 0.7); }
body.uv.studio .box { border-top-color: var(--glow); box-shadow: 0 0 0 1px rgba(198, 255, 61, 0.18), 0 0 60px rgba(123, 60, 255, 0.45); }
body.uv.studio .tile .name { color: var(--glow); text-shadow: 0 0 8px rgba(198, 255, 61, 0.7); }

/* The switch */
.uv-fab {
	position: fixed; z-index: 10001; left: 1.2em; bottom: 1.2em;
	height: 3em !important; line-height: 3em !important; padding: 0 1.3em 0 1em !important;
	border-radius: 2em !important; background: #160f24 !important; color: #fff !important;
	border: 1px solid var(--line) !important; font-weight: 700; letter-spacing: 0.04em;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}
.uv-fab:before {
	content: ""; display: inline-block; vertical-align: middle; width: 1.8em; height: 0.5em; margin: -0.15em 0.65em 0 0;
	border-radius: 1em; background: #3d3450; transition: all 0.2s ease;
}
body.uv .uv-fab { border-color: var(--glow) !important; box-shadow: 0 0 24px rgba(198, 255, 61, 0.4); }
body.uv .uv-fab:before { background: var(--glow); box-shadow: 0 0 10px var(--glow), 0 0 22px rgba(198, 255, 61, 0.6); }

body.uv-flicker .main, body.uv-flicker #header { animation: uv-flicker 0.8s steps(1) both; }
@keyframes uv-flicker { 0% { filter: brightness(0.1); } 12% { filter: brightness(1.25); } 22% { filter: brightness(0.2); } 36% { filter: brightness(1.05); } 46% { filter: brightness(0.35); } 62%, 100% { filter: none; } }

.uv-only { display: none; }
body.uv .uv-only { display: block; }
body.uv .day-only { display: none; }

.uv-torch {
	position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity 0.4s ease;
	background: radial-gradient(circle 220px at var(--x, 50%) var(--y, 50%), rgba(150, 70, 255, 0.28), rgba(90, 30, 200, 0.07) 60%, transparent 76%);
	mix-blend-mode: screen;
}
body.uv .uv-torch { opacity: 1; }

.ink {
	position: absolute; z-index: 3; font-family: "Caveat", cursive; font-weight: 700; font-size: 2.2em;
	color: var(--glow); text-shadow: 0 0 6px rgba(198, 255, 61, 0.9), 0 0 22px rgba(198, 255, 61, 0.5);
	opacity: 0; pointer-events: none; white-space: nowrap; transition: opacity 0.12s linear;
}

@media screen and (max-width: 736px) {
	.uv-fab { left: 0.8em; bottom: 0.8em; }
	.h-note { font-size: 2.3em; }
}
@media (prefers-reduced-motion: reduce) {
	body.uv-flicker .main, body.uv-flicker #header { animation: none; }
	.tile img, .note ellipse { transition: none; }
}

/* ---------- Sketch viewer: the photo opens on top of the sketch ---------- */
.sketch-nav .note { position: absolute; z-index: 2; background: transparent !important; padding: 0 !important; line-height: 1 !important; border-radius: 0 !important; box-shadow: none !important; cursor: pointer; }
.viewer { position: absolute; inset: 0; z-index: 5; background: #07060b; overflow: hidden; }
.viewer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 0.5s ease, transform 0.9s ease; cursor: zoom-out; }
.viewer.in img { opacity: 1; transform: none; }
.viewer:after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7, 6, 11, 0.85) 0%, transparent 40%); pointer-events: none; }
.viewer-note {
	position: absolute; z-index: 2; left: 1.2em; right: 5em; bottom: 0.6em; margin: 0;
	font-family: "Caveat", cursive; font-weight: 700; font-size: clamp(1.8rem, 3.6vw, 3.2rem); line-height: 1.05; color: #fff;
	opacity: 0; transform: translateY(8px); transition: opacity 0.5s ease 0.15s, transform 0.5s ease 0.15s;
}
.viewer.in .viewer-note { opacity: 1; transform: none; }
body.uv .viewer-note { color: var(--glow); text-shadow: 0 0 8px rgba(198, 255, 61, 0.7); }
.v-btn {
	position: absolute; z-index: 3; width: 2.6em !important; height: 2.6em !important; line-height: 2.5em !important; padding: 0 !important;
	border-radius: 50% !important; background: rgba(7, 6, 11, 0.6) !important; color: #fff !important; font-size: 1.2em; font-weight: 400;
	border: 1px solid rgba(255, 255, 255, 0.25) !important;
}
.v-btn:hover { background: rgba(139, 92, 255, 0.6) !important; }
.v-prev { left: 0.8em; top: 50%; transform: translateY(-50%); }
.v-next { right: 0.8em; top: 50%; transform: translateY(-50%); }
.v-close { right: 0.8em; top: 0.8em; }
.sketch-hint { text-align: center; color: var(--ink-dim); margin: 1em 0 0 0; font-size: 0.9em; }
@media (prefers-reduced-motion: reduce) { .viewer img, .viewer-note { transition: none; transform: none; } }

/* What he does, in the project boxes */
.does { list-style: none; padding: 0; margin: 0 0 1.2em 0; }
.does li { padding: 0.4em 0 0.4em 1.1em; border-top: 1px solid var(--line); position: relative; color: var(--ink); line-height: 1.35; }
.does li:before { content: ""; position: absolute; left: 0; top: 0.9em; width: 0.45em; height: 0.45em; background: var(--accent); transform: rotate(45deg); }
body.uv .does li:before { background: var(--glow); box-shadow: 0 0 6px var(--glow); }
.viewer-note { text-align: left; }

/* ---------- Portfolio tiles are buttons now ---------- */
.portfolio .tile { height: auto !important; line-height: 1.2 !important; padding: 0 !important; border-radius: 0 !important; text-align: left; white-space: normal !important; background: #000 !important; cursor: zoom-in; }
.portfolio + .sketch-hint { margin-top: 1.2em; }

/* ---------- Per-piece gallery ---------- */
body.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 10010; background: rgba(5, 3, 10, 0.97); display: grid; grid-template-rows: minmax(0, 1fr) auto auto; color: var(--ink); }
.lb-stage { position: relative; min-height: 0; display: grid; place-items: center; padding: 1.5em 4.5em 0 4.5em; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.35s ease; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.lb-stage img.in { opacity: 1; }
.lb-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 3em !important; height: 3em !important; line-height: 2.9em !important; padding: 0 !important; border-radius: 50% !important; background: rgba(255, 255, 255, 0.06) !important; color: #fff !important; font-size: 1.3em; border: 1px solid rgba(255, 255, 255, 0.18) !important; }
.lb-btn:hover { background: rgba(139, 92, 255, 0.45) !important; }
.lb-prev { left: 0.8em; } .lb-next { right: 0.8em; }
.lightbox.single .lb-btn, .lightbox.single .lb-thumbs { display: none; }
.lb-bar { display: flex; align-items: center; gap: 1.5em; padding: 1em 1.5em 0.6em 1.5em; }
.lb-text { flex: 1; min-width: 0; }
.lb-text h2 { font-size: 2em; margin: 0 0 0.1em 0; }
.lb-text p { margin: 0; color: var(--ink-dim); }
.lb-count { font-variant-numeric: tabular-nums; margin-left: 0.6em; opacity: 0.7; }
.lb-album { color: var(--accent-hot); white-space: nowrap; }
.lb-close { width: 2.6em !important; height: 2.6em !important; line-height: 2.5em !important; padding: 0 !important; border-radius: 50% !important; background: rgba(255, 255, 255, 0.08) !important; color: #fff !important; font-size: 1.1em; flex: none; }
.lb-thumbs { display: flex; gap: 6px; padding: 0.4em 1.5em 1.2em 1.5em; overflow-x: auto; }
.lb-thumbs button { flex: none; width: 6.5em; height: 4.9em !important; padding: 0 !important; border-radius: 0 !important; background: none !important; opacity: 0.45; border: 2px solid transparent !important; transition: opacity 0.2s ease; }
.lb-thumbs button.on, .lb-thumbs button:hover { opacity: 1; border-color: var(--accent) !important; }
.lb-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.uv .lb-text h2 { color: var(--glow); }
@media screen and (max-width: 736px) {
	.lb-stage { padding: 1em 0.5em 0 0.5em; }
	.lb-btn { display: none; }
	.lb-bar { flex-wrap: wrap; gap: 0.5em 1em; padding: 0.8em 1em 0.4em 1em; }
	.lb-text h2 { font-size: 1.5em; }
	.lb-close { position: absolute; top: 0.8em; right: 0.8em; }
}
@media (prefers-reduced-motion: reduce) { .lb-stage img { transition: none; } }
.lightbox { overflow: hidden; }
.lb-stage { overflow: hidden; }
.lb-stage img { max-height: calc(100vh - 12.5em); max-height: calc(100dvh - 12.5em); width: auto; height: auto; }
@media screen and (max-width: 736px) { .lb-stage img { max-height: calc(100dvh - 13em); } }
