/* belalzahran.com - dark rebuild, 2026-11
   Graphite blue-black, warm off-white text, one amber accent.
   Display: Bricolage Grotesque. Text: IBM Plex Sans. No build step. */

:root {
	--bg: #0f1318;
	--raised: #161b22;
	--line: #262d38;
	--text: #ecebe7;
	--muted: #9ba3ae;
	--accent: #f0b35a;
	--accent-ink: #1a1206;

	--display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
	--body: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, sans-serif;

	--page: 72rem;
	--gutter: clamp(1.25rem, 4vw, 2.5rem);
	--radius: 10px;
	color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

img, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
	font-family: var(--display);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin: 0;
	text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
	position: absolute; left: var(--gutter); top: -4rem;
	background: var(--accent); color: var(--accent-ink);
	padding: 0.5rem 0.9rem; border-radius: 6px; font-weight: 600; text-decoration: none; z-index: 10;
}
.skip:focus { top: 0.75rem; color: var(--accent-ink); }

/* ---------- Header ---------- */

.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1.5rem; }
.top__name { font-family: var(--display); font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; text-decoration: none; }
.top__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; font-size: 0.9375rem; }
.top__nav a { text-decoration: none; color: var(--muted); padding-block: 0.25rem; }
.top__nav a:hover, .top__nav a[aria-current="page"] { color: var(--text); }
.top__nav a.top__resume { color: var(--accent); }
@media (max-width: 30rem) { .top__nav { gap: 0.25rem 0.7rem; font-size: 0.8125rem; } }
.top__nav a.top__resume:hover { text-decoration: underline; }

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

.hero { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem); }
.hero h1 {
	font-size: min(14.5vw, 11.25rem);
	font-weight: 700;
	line-height: 0.9;
	letter-spacing: -0.035em;
	white-space: nowrap;
	margin-left: -0.04em;
	text-wrap: nowrap;
}
.hero__grid { display: grid; gap: 2.5rem; margin-top: clamp(2rem, 5vw, 3.5rem); }
.hero__role { font-family: var(--display); font-size: clamp(1.375rem, 2.6vw, 1.875rem); font-weight: 500; letter-spacing: -0.015em; color: var(--accent); margin-bottom: 1rem; }
.hero__intro { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); max-width: 34em; color: var(--text); }
.hero__intro a { white-space: nowrap; }

.links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: 2rem; padding: 0; list-style: none; }
.links a { font-weight: 500; }

.btn {
	display: inline-block; background: var(--accent); color: var(--accent-ink);
	font-weight: 600; text-decoration: none; padding: 0.7rem 1.15rem; border-radius: 8px; line-height: 1.2;
}
.btn:hover { color: var(--accent-ink); background: #f7c57c; }

figure { margin: 0; }
figcaption { color: var(--muted); font-size: 0.875rem; line-height: 1.45; margin-top: 0.7rem; max-width: 60ch; }

.shot { border-radius: var(--radius); border: 1px solid var(--line); background: var(--raised); width: 100%; }


/* ---------- Sections ---------- */

.section { padding-block: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--line); }
.section > h2, .section__head h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.section__head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section__head p { color: var(--muted); max-width: 38em; }
@media (min-width: 56rem) {
	.section__head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 4rem; align-items: end; }
}

/* ---------- Experience ---------- */

.roles { list-style: none; margin: 0; padding: 0; }
.role { display: grid; gap: 0.5rem 2.5rem; padding-block: 2.25rem; border-top: 1px solid var(--line); }
.role:first-child { border-top: 0; padding-top: 0; }
.role:last-child { padding-bottom: 0; }
.role__when { color: var(--muted); font-size: 0.9375rem; font-variant-numeric: tabular-nums; padding-top: 0.45rem; }
.role h3 { font-size: clamp(1.5rem, 2.6vw, 1.875rem); }
.role__co { display: flex; align-items: center; gap: 0.875rem; }
.role__logo { width: 2.75rem; height: 2.75rem; flex: none; border-radius: 0.625rem; object-fit: contain; border: 1px solid var(--line); }
.role h3 a { text-decoration: none; }
.role h3 a:hover { text-decoration: underline; }
.role__title { color: var(--accent); font-weight: 500; margin: 0.35rem 0 1rem; }
.role ul { margin: 0; padding-left: 1.1rem; max-width: 46em; }
.role li { margin-bottom: 0.5rem; padding-left: 0.25rem; }
.role li::marker { color: var(--muted); }
@media (min-width: 48rem) {
	.role { grid-template-columns: 13rem minmax(0, 1fr); }
}

/* ---------- Projects ---------- */

.feature { display: grid; gap: 1.75rem; padding-block: clamp(2rem, 5vw, 3.5rem); border-top: 1px solid var(--line); align-items: center; }
.feature:first-of-type { border-top: 0; padding-top: 0; }
.feature h3 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
.feature h3 a { text-decoration: none; }
.feature__kind { color: var(--muted); font-size: 0.9375rem; margin: 0.5rem 0 1rem; }
.feature__body p { max-width: 34em; }
.feature__more { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1.25rem; font-weight: 500; }
.feature__more a { color: var(--accent); }
.feature__media { position: relative; }
.feature__media > a { display: block; border-radius: var(--radius); }
.feature__media img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: var(--raised); }
.feature__media .crop { aspect-ratio: 16 / 10; object-fit: cover; }
.feature__media .feature__logo { position: absolute; left: -0.75rem; bottom: -0.75rem; width: 3.5rem; height: 3.5rem; border-radius: 12px; border: 3px solid var(--bg); }
@media (min-width: 56rem) {
	.feature { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 4rem; }
	.feature--flip .feature__media { order: 2; }
}

.more { margin-top: clamp(2.5rem, 6vw, 4rem); }
.more h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.more dl { margin: 0; display: grid; gap: 0 3rem; }
.more div { padding-block: 1.25rem; border-bottom: 1px solid var(--line); }
.more dt { font-family: var(--display); font-weight: 600; font-size: 1.1875rem; letter-spacing: -0.01em; margin-bottom: 0.3rem; }
.more dd { margin: 0; color: var(--muted); font-size: 0.9875rem; }
@media (min-width: 48rem) { .more dl { grid-template-columns: 1fr 1fr; } }

/* ---------- Workbench collage ---------- */

.board { columns: 2; column-gap: 0.75rem; }
.tile {
	display: block; break-inside: avoid; margin: 0 0 0.75rem;
	aspect-ratio: var(--w) / var(--h);
	overflow: hidden; border-radius: 6px; border: 1px solid #39424f; background: var(--raised);
}
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 48rem) {
	.board {
		columns: auto; position: relative; aspect-ratio: 1280 / 720; overflow: hidden; isolation: isolate;
		border-radius: var(--radius); border: 1px solid var(--line);
		background: #0b0e12;
	}
	.tile {
		position: absolute; margin: 0; aspect-ratio: auto;
		left: calc(var(--x) / 1280 * 100%);
		top: calc(var(--y) / 720 * 100%);
		width: calc(var(--w) / 1280 * 100%);
		height: calc(var(--h) / 720 * 100%);
		transform: rotate(var(--r, 0deg));
		z-index: var(--z, 1);
		border: 3px solid #e9e7e1; border-radius: 3px;
		box-shadow: 0 10px 28px rgb(0 0 0 / 0.55);
		transition: transform 0.25s ease;
	}
	.tile:hover { transform: rotate(0deg) scale(1.04); z-index: 9; }
}

.board__note { color: var(--muted); font-size: 0.875rem; margin-top: 1rem; }

/* ---------- Skills + education ---------- */

.skills { margin: 0; display: grid; }
.skills div { display: grid; gap: 0.25rem 2.5rem; padding-block: 1.1rem; border-top: 1px solid var(--line); }
.skills div:first-child { border-top: 0; padding-top: 0; }
.skills dt { color: var(--muted); }
.skills dd { margin: 0; max-width: 46em; }
@media (min-width: 48rem) { .skills div { grid-template-columns: 13rem minmax(0, 1fr); } }

.school { display: grid; gap: 0.5rem 2.5rem; }
.school h3 { font-size: clamp(1.5rem, 2.6vw, 1.875rem); }
.school p { color: var(--muted); margin: 0.35rem 0 0; }
@media (min-width: 48rem) { .school { grid-template-columns: 13rem minmax(0, 1fr); } }

/* ---------- Contact + footer ---------- */

.contact h2 { font-size: clamp(2.25rem, 6vw, 4.25rem); letter-spacing: -0.035em; max-width: 14em; }
.contact__list { list-style: none; margin: clamp(2rem, 5vw, 3rem) 0 0; padding: 0; display: grid; }
.contact__list li { border-top: 1px solid var(--line); }
.contact__list li:last-child { border-bottom: 1px solid var(--line); }
.contact__list a { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.15rem 2rem; padding-block: 1.1rem; text-decoration: none; }
.contact__list b { font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 1.625rem); letter-spacing: -0.015em; }
.contact__list span { color: var(--muted); font-size: 0.9875rem; overflow-wrap: anywhere; }
.contact__list a:hover span { color: var(--accent); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 2rem 3rem; color: var(--muted); font-size: 0.875rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }

/* ---------- Project pages ---------- */

.case { padding-block: clamp(1.5rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); }
.case__back { color: var(--muted); font-size: 0.9375rem; text-decoration: none; }
.case h1 { font-size: clamp(2.75rem, 9vw, 6rem); font-weight: 700; letter-spacing: -0.04em; line-height: 0.95; margin-top: 1.25rem; }
.case__lead { font-size: clamp(1.1875rem, 2.2vw, 1.5rem); line-height: 1.45; max-width: 32em; margin-top: 1.5rem; }
.facts { margin: clamp(2rem, 5vw, 3rem) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1.25rem 2.5rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.facts dt { color: var(--muted); font-size: 0.875rem; margin-bottom: 0.15rem; }
.facts dd { margin: 0; }

.prose { max-width: 42rem; }
.prose h2 { font-size: clamp(1.625rem, 3.2vw, 2.125rem); margin: 2.75rem 0 0.9rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.1rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4rem; padding-left: 0.25rem; }
.prose li::marker { color: var(--muted); }
.prose a { color: var(--accent); }

.block { margin-top: clamp(2.5rem, 6vw, 4rem); }
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.gallery img, .gallery video { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: var(--raised); }
.gallery .tall { aspect-ratio: 3 / 4; object-fit: cover; }
.gallery .land { aspect-ratio: 16 / 10; object-fit: cover; }
.gallery--narrow { max-width: 40rem; }
.gallery--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 48rem) {
	.gallery { gap: 1.5rem; }
	.gallery--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.gallery--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.span-2 { grid-column: span 2; }

.video { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.video--portrait { max-width: 24rem; }
.video--land { max-width: 52rem; }
.clip { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: #000; }

.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; margin-top: clamp(3rem, 7vw, 5rem); padding-top: 1.75rem; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; }
.pager small { display: block; color: var(--muted); font-size: 0.875rem; }
.pager b { font-family: var(--display); font-weight: 600; font-size: 1.375rem; letter-spacing: -0.015em; }
.pager a:last-child { text-align: right; margin-left: auto; }

/* Redirect stubs */
.moved { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 1rem; padding: var(--gutter); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.tile { transition: none; }
}
