/*
	Burhan Ahmad portfolio.
	Work first: the footage carries the colour, the page stays black and white.
	One family (Archivo), wide and heavy for names and titles, normal width for reading.
*/

:root {
	--bg: #0c0c0b;
	--bg-2: #151513;
	--fg: #f1efe9;
	--muted: #8f8d86;
	--line: rgba(241, 239, 233, 0.12);

	--font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
	--gutter: clamp(1rem, 4vw, 3.5rem);
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* Nav */
.nav {
	position: fixed;
	z-index: 20;
	top: 0;
	left: 0;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.1rem var(--gutter);
	padding-top: calc(1.1rem + env(safe-area-inset-top, 0px));
	font-size: 0.9rem;
	transition: background-color 0.3s;
}
.nav.is-solid { background: rgba(12, 12, 11, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav-name { font-weight: 700; font-stretch: 125%; text-decoration: none; letter-spacing: -0.01em; }
.nav nav { display: flex; gap: 1.6rem; }
.nav nav a { text-decoration: none; color: var(--muted); transition: color 0.2s; }
.nav nav a:hover { color: var(--fg); }
@media (max-width: 520px) {
	.nav nav { gap: 1rem; }
	.nav nav a[href="#about"] { display: none; }
}

/* Intro: the interactive floor */
.floor { position: relative; height: 100vh; height: 100svh; }

.stage {
	position: relative;
	height: 100%;
	overflow: hidden;
	background: #000;
}

#scene, .lite-reel, .stage-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
#scene canvas { display: block; touch-action: pan-y; }
.is-3d #scene { cursor: crosshair; }
.lite-reel { object-fit: cover; display: none; filter: brightness(0.55); }
.is-lite #scene, .is-lite .only-3d { display: none; }
.is-lite .lite-reel { display: block; }

.stage-shade {
	pointer-events: none;
	background:
		linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 14%),
		linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 40%);
}

.intro-copy {
	position: absolute;
	left: var(--gutter);
	bottom: clamp(1.5rem, 7vh, 4.5rem);
	max-width: min(52rem, calc(100% - 2 * var(--gutter)));
	display: grid;
	gap: 1.2rem;
	pointer-events: none;
}
.intro-copy a, .intro-copy button { pointer-events: auto; }

h1 {
	font-size: clamp(3rem, 9.5vw, 9.5rem);
	font-weight: 800;
	font-stretch: 125%;
	line-height: 0.88;
	letter-spacing: -0.035em;
}

.intro-copy p { max-width: 30rem; font-size: 1.15rem; color: rgba(241, 239, 233, 0.82); }

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.btn {
	display: inline-flex;
	align-items: center;
	height: 2.8rem;
	padding: 0 1.3rem;
	border: 1px solid rgba(241, 239, 233, 0.35);
	border-radius: 999px;
	background: rgba(12, 12, 11, 0.4);
	color: var(--fg);
	font: 500 0.95rem/1 var(--font);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { border-color: var(--fg); }
.btn-solid { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn-solid:hover { background: transparent; color: var(--fg); }

.floor-hint {
	position: absolute;
	right: var(--gutter);
	bottom: clamp(1.5rem, 7vh, 4.5rem);
	max-width: 17rem;
	color: var(--muted);
	font-size: 0.85rem;
	text-align: right;
	pointer-events: none;
}

@media (max-width: 760px) {
	.floor-hint { top: 4.6rem; bottom: auto; left: var(--gutter); right: auto; text-align: left; }
	.intro-copy p { font-size: 1rem; }
}

/* Work wall (3D): drag or throw a curved strip of screens */
.wall { padding: 8vh 0 8vh; }
.wall-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem 2rem;
	padding: 0 var(--gutter) 1.2rem;
	margin: 0 var(--gutter);
	padding-inline: 0;
	border-bottom: 1px solid var(--line);
}
.wall-head h2 {
	font-size: clamp(2.2rem, 5vw, 4.2rem);
	font-weight: 800;
	font-stretch: 125%;
	letter-spacing: -0.03em;
	line-height: 0.95;
}
.wall-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.wall-tabs button, .wall-actions button {
	height: 2.4rem;
	padding: 0 1rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: transparent;
	color: var(--muted);
	font: 500 0.88rem/1 var(--font);
	cursor: pointer;
	transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.wall-tabs button:hover, .wall-actions button:hover { color: var(--fg); border-color: rgba(241, 239, 233, 0.4); }
.wall-tabs button.is-on { color: var(--bg); background: var(--fg); border-color: var(--fg); }

.wall-stage { position: relative; height: min(56vh, 42rem); min-height: 20rem; }
#wall-scene { position: absolute; inset: 0; cursor: grab; touch-action: pan-y; }
#wall-scene.is-dragging { cursor: grabbing; }
#wall-scene.is-pointing { cursor: pointer; }
#wall-scene canvas { display: block; }
.wall-hint {
	position: absolute;
	left: 50%;
	bottom: 0.4rem;
	transform: translateX(-50%);
	color: var(--muted);
	font-size: 0.82rem;
	white-space: nowrap;
	pointer-events: none;
	transition: opacity 0.6s;
}
.wall-hint.is-gone { opacity: 0; }

.wall-caption {
	display: grid;
	grid-template-columns: 6rem minmax(0, 1fr) auto;
	gap: 1.5rem 2.5rem;
	align-items: start;
	margin: 1.5rem var(--gutter) 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
	min-height: 11rem;
}
.wall-count { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.95rem; padding-top: 0.45rem; }
.wall-index { color: var(--fg); }
.wall-info { display: grid; gap: 0.45rem; max-width: 40rem; transition: opacity 0.25s, transform 0.25s; }
.wall-info.is-swapping { opacity: 0; transform: translateY(6px); }
.wall-title { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 700; font-stretch: 118%; letter-spacing: -0.02em; line-height: 1.05; }
.wall-meta, .wall-tools { color: var(--muted); font-size: 0.92rem; }
.wall-desc { font-size: 1.08rem; text-wrap: pretty; }
.wall-actions { display: flex; gap: 0.5rem; }
.wall-actions .wall-watch { color: var(--bg); background: var(--fg); border-color: var(--fg); }
.wall-actions .wall-watch:hover { color: var(--fg); background: transparent; }

@media (max-width: 860px) {
	.wall-caption { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
	.wall-stage { height: 42svh; }
}

.is-3d .project-list { display: none; }

/* Work */
main { padding: 0; }
.project-list { padding: 12vh var(--gutter) 0; }

.group { margin-bottom: 14vh; }
.group h2 {
	font-size: clamp(2.2rem, 5vw, 4.2rem);
	font-weight: 800;
	font-stretch: 125%;
	letter-spacing: -0.03em;
	line-height: 0.95;
	padding-bottom: 1.2rem;
	border-bottom: 1px solid var(--line);
}

.project {
	--gap: clamp(1.5rem, 3vw, 3.5rem);
	--text: 22rem;
	display: flex;
	gap: var(--gap);
	align-items: flex-end;
	padding-block: clamp(2.5rem, 7vh, 5rem);
	border-bottom: 1px solid var(--line);
}

.media {
	position: relative;
	flex: none;
	width: min(calc(100% - var(--text) - var(--gap)), var(--w), calc(78vh * var(--ar)));
	aspect-ratio: var(--ar);
	background: var(--bg-2);
	overflow: hidden;
	cursor: pointer;
}
.media video { width: 100%; height: 100%; object-fit: cover; }

.watch {
	position: absolute;
	left: 0.75rem;
	bottom: 0.75rem;
	padding: 0.45rem 0.8rem;
	border: 0;
	border-radius: 999px;
	background: rgba(12, 12, 11, 0.72);
	color: var(--fg);
	font: 500 0.8rem/1 var(--font);
	cursor: pointer;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.2s, transform 0.2s;
}
.media:hover .watch, .watch:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .watch { opacity: 1; transform: none; } }

.text { flex: 0 1 var(--text); min-width: 0; display: grid; gap: 0.6rem; padding-bottom: 0.2rem; }
.text h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); font-weight: 700; font-stretch: 118%; letter-spacing: -0.02em; line-height: 1.05; }
.text .meta { color: var(--muted); font-size: 0.9rem; }
.text p:not(.meta):not(.tools) { text-wrap: pretty; }
.text .tools { color: var(--muted); font-size: 0.85rem; padding-top: 0.4rem; border-top: 1px solid var(--line); margin-top: 0.3rem; }

@media (max-width: 860px) {
	.project { flex-direction: column; align-items: flex-start; }
	.media { width: min(100%, var(--w), calc(70vh * var(--ar))); }
	.text { flex: none; width: 100%; max-width: 34rem; }
}

/* About, contact and footer sit in front of a dim LED panel that lights up
   where the visitor moves, like the walls and floors in the work. */
.backroom {
	position: relative;
	isolation: isolate;
	background: radial-gradient(circle at 11px 11px, rgba(241, 239, 233, 0.055) 1.1px, transparent 1.7px) 0 0 / 22px 22px;
}
.backroom-led { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

/* About */
.about {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: start;
	padding: 6vh var(--gutter) 14vh;
}
.portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.about-text { display: grid; gap: 1.2rem; max-width: 40rem; }
.about h2, .contact h2 {
	font-size: clamp(2.2rem, 5vw, 4.2rem);
	font-weight: 800;
	font-stretch: 125%;
	letter-spacing: -0.03em;
	line-height: 0.95;
}
.about-lede { font-size: 1.3rem; line-height: 1.45; text-wrap: pretty; }
.about-text > p:not(.about-lede):not(.stack) { color: rgba(241, 239, 233, 0.78); }

.roles { list-style: none; margin: 0.8rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.roles li {
	display: grid;
	grid-template-columns: 7.5rem minmax(0, 1fr) minmax(0, 1fr);
	gap: 1rem;
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--line);
	font-size: 0.95rem;
}
.roles li span:first-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.roles li span:last-child { color: var(--muted); }
.stack { color: var(--muted); font-size: 0.92rem; }

@media (max-width: 860px) {
	.about { grid-template-columns: minmax(0, 1fr); }
	.portrait { max-width: 26rem; }
}
@media (max-width: 560px) {
	.roles li { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
}

/* Contact */
.contact {
	display: grid;
	gap: 1.2rem;
	justify-items: start;
	padding: 12vh var(--gutter);
	border-top: 1px solid var(--line);
}
.contact > p { color: var(--muted); }
.mail {
	font-size: clamp(1.8rem, 6vw, 5rem);
	font-weight: 700;
	font-stretch: 125%;
	letter-spacing: -0.03em;
	text-decoration: none;
	overflow-wrap: anywhere;
	background: linear-gradient(currentColor, currentColor) left bottom / 0 2px no-repeat;
	transition: background-size 0.3s;
}
.mail:hover { background-size: 100% 2px; }
.contact ul { display: flex; flex-wrap: wrap; gap: 1.6rem; list-style: none; margin: 0.6rem 0 0; padding: 0; }
.contact ul a { color: var(--muted); text-decoration: none; }
.contact ul a:hover { color: var(--fg); }

.foot {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.5rem var(--gutter) calc(1.5rem + env(safe-area-inset-bottom, 0px));
	color: var(--muted);
	font-size: 0.85rem;
	border-top: 1px solid var(--line);
}
.foot a { color: inherit; }

/* Full video player */
.player {
	width: 100vw;
	height: 100vh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(0, 0, 0, 0.94);
	color: var(--fg);
}
.player[open] { display: grid; place-items: center; }
.player::backdrop { background: rgba(0, 0, 0, 0.8); }
.player video { max-width: 92vw; max-height: 86vh; }
.player-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	padding: 0.5rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: transparent;
	color: var(--fg);
	font: 500 0.85rem/1 var(--font);
	cursor: pointer;
}

/* Load-in */
@media (prefers-reduced-motion: no-preference) {
	.intro-copy > * { animation: rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
	.intro-copy p { animation-delay: 0.12s; }
	.intro-copy .actions { animation-delay: 0.24s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(1rem); } }

.coarse { display: none; }
@media (pointer: coarse) {
	.fine { display: none; }
	.coarse { display: inline; }
}
