/* =========================================================================
   Irish Kim S. Babaran — site styles on top of Dimension (HTML5 UP).
   Dimension is monochrome white-on-dark; everything here follows that:
   thin white rules, translucent fills, uppercase letter-spaced labels.
   ========================================================================= */

/* ---------- Theme ----------
   Dark is the default. main.css and this file draw every foreground colour
   from --fg-rgb and every "ink on white button" colour from --bg-rgb, so
   flipping these (html[data-theme="light"], at the bottom) flips the site. */
:root {
	--fg-rgb: 255, 255, 255;
	--bg-rgb: 27, 31, 34;
	--panel: rgba(13, 18, 30, 0.88);
	--panel-shadow: rgba(0, 0, 0, 0.45);
	--lb-scrim: rgba(19, 21, 25, 0.75);
	color-scheme: dark;
}

/* ---------- Background ----------
   No photo: a deep navy base with soft aurora glows (#bg:after), and on top
   a planning-canvas dot grid, a centre-focus vignette and light film grain
   (#bg:before). Static; Dimension still blurs/zooms it when a panel opens. */
#bg:after {
	background-color: #0a0e17;
	background-image:
		radial-gradient(55% 60% at 12% 18%, rgba(56, 189, 248, 0.30), transparent 70%),
		radial-gradient(50% 55% at 88% 12%, rgba(99, 102, 241, 0.34), transparent 70%),
		radial-gradient(60% 55% at 82% 88%, rgba(20, 184, 166, 0.24), transparent 70%),
		radial-gradient(50% 50% at 15% 92%, rgba(139, 92, 246, 0.22), transparent 70%),
		linear-gradient(160deg, #0d1424 0%, #0a0e17 55%, #0b1220 100%);
	background-size: cover;
	background-repeat: no-repeat;
}
#bg:before {
	background-image:
		radial-gradient(ellipse 70% 60% at 50% 48%, rgba(10, 14, 23, 0.55), transparent 75%),
		radial-gradient(rgba(var(--fg-rgb), 0.10) 1px, transparent 1.4px),
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
	background-size: 100% 100%, 28px 28px, 220px 220px;
	background-position: center, center, 0 0;
	background-repeat: no-repeat, repeat, repeat;
	/* Fade the dot grid toward the edges so it reads as a canvas, not wallpaper. */
	-webkit-mask-image: radial-gradient(ellipse 90% 85% at 50% 50%, #000 55%, rgba(0, 0, 0, 0.35) 100%);
	mask-image: radial-gradient(ellipse 90% 85% at 50% 50%, #000 55%, rgba(0, 0, 0, 0.35) 100%);
}

/* ---------- Header ---------- */
#header .logo {
	overflow: hidden;
	padding: 0;
}
#header .logo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 18%;
}
#header .content .inner h1 { letter-spacing: 0.35rem; }
#header .content .inner p { line-height: 2; }

/* Slightly wider panels so the grids have room to breathe. */
#main article {
	width: 46rem;
	background-color: var(--panel);
	box-shadow: 0 0 0 1px rgba(var(--fg-rgb), 0.06), 0 30px 80px var(--panel-shadow);
}

#main article > p:first-of-type:not(.contact-meta) { font-size: 1.05rem; }

h2.major + p { margin-top: -0.5rem; }
h3.major { margin-top: 3rem; }
.major { max-width: 100%; }

/* Primary button = solid white, like Dimension's submit button. */
.button.primary:hover { background-color: rgba(var(--fg-rgb), 0.85); }

/* Shared list reset for the custom components below. */
.stats-grid, .features, .steps, .contact-lines, .tool-chips {
	list-style: none;
	padding: 0;
}
.stats-grid li, .features li, .steps li, .contact-lines li { padding-left: 0; }

.image.main img { aspect-ratio: 21 / 9; object-fit: cover; }

/* ---------- Stats ---------- */
.stats-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	border-top: solid 1px rgba(var(--fg-rgb), 0.35);
	border-bottom: solid 1px rgba(var(--fg-rgb), 0.35);
	margin: 0 0 2rem 0;
}
.stats-grid li {
	padding: 1.25rem 0.5rem;
	text-align: center;
	border-left: solid 1px rgba(var(--fg-rgb), 0.15);
}
.stats-grid li:first-child { border-left: 0; }
.stats-grid strong {
	display: block;
	font-size: 2rem;
	font-weight: 300;
	line-height: 1.2;
}
.stats-grid span {
	display: block;
	font-size: 0.65rem;
	letter-spacing: 0.2rem;
	text-transform: uppercase;
	opacity: 0.75;
}

/* ---------- Story chapters ---------- */
.chapter {
	display: grid;
	grid-template-columns: 9rem minmax(0, 1fr);
	gap: 1.5rem;
	align-items: start;
	margin-bottom: 2rem;
}
.chapter .image { margin: 0; }
.chapter .image img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
	width: 100%;
}
.chapter h4 { margin-bottom: 0.5rem; }
.chapter p:last-child { margin-bottom: 0; }
.kicker {
	font-size: 0.65rem;
	letter-spacing: 0.2rem;
	text-transform: uppercase;
	opacity: 0.65;
	margin-bottom: 0.35rem;
}

/* ---------- "What matters most" ---------- */
.decision .actions {
	flex-wrap: wrap;
	row-gap: 0.75rem;
	margin-bottom: 1rem;
}
.decision .actions li { flex: 0 0 auto; }
.decision-chip[aria-pressed="true"] {
	background-color: rgb(var(--fg-rgb));
	color: rgb(var(--bg-rgb)) !important;
}
.decision-answer {
	border-left: solid 4px rgb(var(--fg-rgb));
	padding: 0.5rem 0 0.5rem 1.25rem;
	font-style: italic;
}
.decision-answer[hidden] { display: none; }

/* ---------- Services ---------- */
.features {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin-bottom: 1rem;
}
.features li {
	border: solid 1px rgba(var(--fg-rgb), 0.2);
	border-radius: 4px;
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	transition: border-color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}
.features li:hover {
	border-color: rgba(var(--fg-rgb), 0.6);
	background-color: rgba(var(--fg-rgb), 0.04);
}
.features .icon:before {
	display: inline-block;
	width: 2.75rem;
	height: 2.75rem;
	line-height: 2.75rem;
	text-align: center;
	border: solid 1px rgb(var(--fg-rgb));
	border-radius: 100%;
	font-size: 1rem;
	margin-bottom: 1rem;
}
.features h3 { font-size: 0.85rem; margin-bottom: 0.75rem; }
.features p { font-size: 0.9rem; margin-bottom: 1rem; }
.features .tags {
	margin-top: auto;
	margin-bottom: 0;
	font-size: 0.65rem;
	letter-spacing: 0.15rem;
	text-transform: uppercase;
	opacity: 0.6;
}
.features li.cta-feature { background-color: rgba(var(--fg-rgb), 0.075); }
.features li.cta-feature .button { margin-top: auto; align-self: flex-start; }

/* ---------- Process steps ---------- */
.steps {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem 2rem;
	margin-bottom: 2rem;
}
.steps li { border-top: solid 1px rgb(var(--fg-rgb)); padding-top: 1rem; }
.steps .num {
	display: block;
	font-size: 1.75rem;
	font-weight: 300;
	line-height: 1;
	opacity: 0.5;
	margin-bottom: 0.5rem;
}
.steps h4 { margin-bottom: 0.5rem; }
.steps p { font-size: 0.9rem; margin-bottom: 0; }

/* ---------- Work cards ---------- */
.work-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin-bottom: 2rem;
}
.work-card {
	display: flex;
	flex-direction: column;
	border: solid 1px rgba(var(--fg-rgb), 0.2);
	border-radius: 4px;
	overflow: hidden;
	cursor: pointer;
	transition: border-color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}
.work-card.full { grid-column: 1 / -1; }
.work-card:hover, .work-card:focus-visible {
	border-color: rgb(var(--fg-rgb));
	background-color: rgba(var(--fg-rgb), 0.04);
	outline: none;
}
.work-card .image { display: block; overflow: hidden; margin: 0; }
.work-card .image img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	filter: grayscale(35%);
	transition: transform 0.4s ease, filter 0.4s ease;
}
.work-card.full .image img { aspect-ratio: 21 / 8; }
.work-card:hover .image img, .work-card:focus-visible .image img {
	transform: scale(1.05);
	filter: none;
}
.work-card .body { flex: 1 1 auto; padding: 1.25rem 1.25rem 0.25rem; }
.work-card .category {
	font-size: 0.6rem;
	letter-spacing: 0.2rem;
	text-transform: uppercase;
	opacity: 0.65;
}
.work-card h3 { font-size: 0.85rem; margin: 0.4rem 0 0.6rem; }
.work-card p { font-size: 0.85rem; margin-bottom: 0.75rem; }
.work-card .foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 0.85rem 1.25rem;
	border-top: solid 1px rgba(var(--fg-rgb), 0.15);
	font-size: 0.7rem;
	opacity: 0.85;
}
.work-card .foot .more {
	flex: none;
	font-weight: 600;
	letter-spacing: 0.15rem;
	text-transform: uppercase;
}
.work-card .foot .more:after { content: " \2192"; }

/* ---------- Reviews ---------- */
.quotes { display: grid; gap: 1rem; margin-bottom: 2rem; }
.quote {
	margin: 0;
	padding: 1.75rem;
	border: solid 1px rgba(var(--fg-rgb), 0.2);
	border-radius: 4px;
	position: relative;
}
.quote:before {
	content: "\201C";
	position: absolute;
	top: 0.25rem;
	right: 1.25rem;
	font-size: 4rem;
	line-height: 1;
	opacity: 0.2;
}
.quote blockquote {
	border-left: 0;
	padding: 0;
	margin: 0 0 1.25rem 0;
	font-size: 0.95rem;
}
/* Multi-paragraph reviews: tighter than body copy, no gap after the last. */
.quote blockquote p { margin: 0 0 0.85rem 0; }
.quote blockquote p:last-child { margin-bottom: 0; }
.quote figcaption { display: flex; align-items: center; gap: 1rem; }
.quote .avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 2.75rem;
	height: 2.75rem;
	border: solid 1px rgb(var(--fg-rgb));
	border-radius: 100%;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.1rem;
}
.quote strong {
	display: block;
	font-size: 0.75rem;
	letter-spacing: 0.15rem;
	text-transform: uppercase;
}
.quote figcaption span:not(.avatar) { font-size: 0.8rem; opacity: 0.65; }

/* ---------- Credentials ---------- */
.licenses {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin-bottom: 2.5rem;
}
.license {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	padding: 1.25rem;
	border: solid 1px rgb(var(--fg-rgb));
	border-radius: 4px;
	background-color: rgba(var(--fg-rgb), 0.05);
}
.license .icon:before {
	display: inline-block;
	width: 2.5rem;
	height: 2.5rem;
	line-height: 2.5rem;
	text-align: center;
	border-radius: 100%;
	background: rgb(var(--fg-rgb));
	color: rgb(var(--bg-rgb));
}
.license h3 { font-size: 0.75rem; margin: 0.25rem 0; }
.license p { font-size: 0.8rem; margin: 0; opacity: 0.7; }
.license .tag {
	font-size: 0.55rem;
	letter-spacing: 0.2rem;
	text-transform: uppercase;
	opacity: 0.65;
}
.cred-cols {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 2.5rem;
}
.cred-cols h3 { font-size: 0.75rem; margin-bottom: 0.75rem; }
.cred-cols h3 .icon { margin-right: 0.75rem; opacity: 0.75; }
.cred-cols ul.alt { margin-bottom: 2rem; }
.cred-cols ul.alt li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	font-size: 0.9rem;
}
.cred-cols ul.alt li + li { border-top-color: rgba(var(--fg-rgb), 0.2); }
.cred-cols ul.alt li span { opacity: 0.6; white-space: nowrap; font-size: 0.8rem; }

/* ---------- Tools ---------- */
.tool-groups { display: grid; gap: 1.5rem; margin-bottom: 2rem; }
.tool-group h3 { font-size: 0.65rem; margin-bottom: 0.6rem; opacity: 0.75; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tool-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	border: solid 1px rgba(var(--fg-rgb), 0.25);
	border-radius: 2rem;
	padding: 0.3rem 0.8rem 0.3rem 0.3rem;
	font-size: 0.8rem;
	line-height: 1;
	transition: border-color 0.2s ease-in-out;
}
.tool-chip:hover { border-color: rgb(var(--fg-rgb)); }
.tc-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 100%;
	background: var(--tc-bg, rgb(var(--fg-rgb)));
}
.tc-icon svg { width: 0.95rem; height: 0.95rem; }

/* ---------- FAQ ---------- */
.faq-list { margin-bottom: 2rem; }
.faq { border-bottom: solid 1px rgba(var(--fg-rgb), 0.2); }
.faq:first-child { border-top: solid 1px rgba(var(--fg-rgb), 0.2); }
.faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 0;
	cursor: pointer;
	list-style: none;
	font-weight: 600;
	font-size: 0.9rem;
	transition: opacity 0.2s ease-in-out;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:after {
	content: "+";
	flex: none;
	font-size: 1.4rem;
	font-weight: 300;
	line-height: 1;
	transition: transform 0.2s ease-in-out;
}
.faq summary:hover { opacity: 0.75; }
.faq[open] summary:after { transform: rotate(45deg); }
.faq p { margin: 0; padding-bottom: 1.25rem; opacity: 0.85; }

/* ---------- Contact ---------- */
.contact-meta {
	font-size: 0.7rem;
	letter-spacing: 0.2rem;
	text-transform: uppercase;
	opacity: 0.65;
}
.contact-lines { margin-bottom: 2rem; }
.contact-lines li {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.4rem 0;
}
.contact-lines .icon { width: 1.25rem; text-align: center; opacity: 0.75; }

/* ---------- Footer ---------- */
#footer ul.icons { margin-bottom: 0.5rem; }

/* ---------- Responsive ---------- */
@media screen and (max-width: 736px) {
	.stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.stats-grid li:nth-child(3) { border-left: 0; }
	.stats-grid li:nth-child(n+3) { border-top: solid 1px rgba(var(--fg-rgb), 0.15); }
	.features, .steps, .work-grid, .licenses, .cred-cols { grid-template-columns: minmax(0, 1fr); }
	.chapter { grid-template-columns: 5rem minmax(0, 1fr); gap: 1rem; }
	.work-card.full .image img { aspect-ratio: 16 / 10; }
}
@media screen and (max-width: 480px) {
	.cred-cols ul.alt li { flex-direction: column; gap: 0; }
	.work-card .foot { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
}

/* ---------- Lightbox tokens (js/lightbox.js + css/lightbox.css), dark to match ---------- */
:root {
	--bg: #0f1522;
	--bg-alt: #161d2c;
	--surface: #161d2c;
	--surface-alt: #1c2436;
	--border: rgba(var(--fg-rgb), 0.2);
	--text: rgb(var(--fg-rgb));
	--text-muted: rgba(var(--fg-rgb), 0.65);
	--accent: rgb(var(--fg-rgb));
	--accent-2: rgb(var(--fg-rgb));
	--accent-hover: rgba(var(--fg-rgb), 0.85);
	--tag-bg: rgba(var(--fg-rgb), 0.1);
	--tag-text: rgb(var(--fg-rgb));
	--glass-bg: rgba(22, 29, 44, 0.92);
	--glass-border: rgba(var(--fg-rgb), 0.2);
	--glass-blur: blur(12px);
	--glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
	--shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
	--shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
	--shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.5);
	--radius: 4px;
	--radius-sm: 4px;
	--radius-lg: 4px;
	--font-body: "Source Sans Pro", sans-serif;
	--font-display: "Source Sans Pro", sans-serif;
	--transition: 0.2s ease;
	--spring: cubic-bezier(0.34, 1.56, 0.64, 1);
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
.lb-overlay { z-index: 10010; background: var(--lb-scrim); }
.lb-overlay h3, .lb-overlay h4 { letter-spacing: 0.15rem; }
.lb-overlay ul { padding-left: 1.25rem; }
/* Undo Dimension's global <button> look inside the lightbox. */
.lb-overlay button {
	font-family: inherit;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.05rem;
	line-height: 1.2;
	text-transform: none;
	white-space: nowrap;
	color: rgb(var(--fg-rgb)) !important;
}
.lb-overlay button:not(.lb-close) { height: auto; }
.lb-overlay .lb-close {
	width: 36px;
	height: 36px;
	padding: 0;
	box-shadow: inset 0 0 0 1px rgba(var(--fg-rgb), 0.35);
}
.lb-overlay .lb-close:hover { box-shadow: inset 0 0 0 1px rgb(var(--fg-rgb)); }

/* ---------- Aurora mesh gradient (js/aurora-mesh-bg.js) ----------
   The WebGL canvas replaces #bg:after's CSS gradient (kept as the fallback)
   and copies its zoom/blur when a panel opens. #bg:before stays on top. */
#aurora {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	transform: scale(1.05);
	transition: transform 0.325s ease-in-out, filter 0.325s ease-in-out;
}
#bg.is-gl:after { opacity: 0; }
body.is-article-visible #aurora {
	transform: scale(1.0);
	filter: blur(0.2rem);
}

/* ---------- Theme toggle (js/theme-toggle.js) ---------- */
.theme-toggle {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 10005;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border-radius: 100%;
	background-color: rgba(var(--fg-rgb), 0.08);
	box-shadow: inset 0 0 0 1px rgba(var(--fg-rgb), 0.35);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: rgb(var(--fg-rgb)) !important;
	font-size: 1rem;
	line-height: 1;
	letter-spacing: 0;
	cursor: pointer;
	transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}
.theme-toggle:hover {
	background-color: rgba(var(--fg-rgb), 0.15);
	box-shadow: inset 0 0 0 1px rgb(var(--fg-rgb));
}
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle:focus-visible { outline: 2px solid rgb(var(--fg-rgb)); outline-offset: 3px; }
.theme-toggle .icon:before { margin: 0; }
.theme-toggle .fa-moon { display: none; }
html[data-theme="light"] .theme-toggle .fa-sun { display: none; }
html[data-theme="light"] .theme-toggle .fa-moon { display: inline; }
body.is-preload .theme-toggle { opacity: 0; }

/* Smooth hand-off when switching themes (skipped on first paint). */
html.theme-anim body,
html.theme-anim #main article,
html.theme-anim #bg:before,
html.theme-anim #bg:after {
	transition: background-color 0.4s ease, color 0.4s ease;
}

/* =========================================================================
   Light theme
   ========================================================================= */
html[data-theme="light"] {
	--fg-rgb: 15, 23, 42;
	--bg-rgb: 248, 250, 252;
	--panel: rgba(255, 255, 255, 0.84);
	--panel-shadow: rgba(15, 23, 42, 0.14);
	--lb-scrim: rgba(15, 23, 42, 0.35);
	color-scheme: light;

	/* Lightbox tokens */
	--bg: #ffffff;
	--bg-alt: #f1f5f9;
	--surface: #ffffff;
	--surface-alt: #f1f5f9;
	--glass-bg: rgba(255, 255, 255, 0.92);
	--glass-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
	--shadow: 0 2px 20px rgba(15, 23, 42, 0.08);
	--shadow-lg: 0 8px 40px rgba(15, 23, 42, 0.12);
	--shadow-xl: 0 24px 64px rgba(15, 23, 42, 0.18);
}

/* Static fallback for the aurora: soft pastel glows on near-white. */
html[data-theme="light"] #bg:after {
	background-color: #f5f7fb;
	background-image:
		radial-gradient(55% 60% at 12% 18%, rgba(56, 189, 248, 0.30), transparent 70%),
		radial-gradient(50% 55% at 88% 12%, rgba(99, 102, 241, 0.26), transparent 70%),
		radial-gradient(60% 55% at 82% 88%, rgba(20, 184, 166, 0.24), transparent 70%),
		radial-gradient(50% 50% at 15% 92%, rgba(139, 92, 246, 0.22), transparent 70%),
		linear-gradient(160deg, #f8fafc 0%, #eef2f8 55%, #f5f7fb 100%);
}
html[data-theme="light"] #bg:before {
	background-image:
		radial-gradient(ellipse 70% 60% at 50% 48%, rgba(248, 250, 252, 0.6), transparent 75%),
		radial-gradient(rgba(15, 23, 42, 0.14) 1px, transparent 1.4px),
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
html[data-theme="light"] body.is-preload #bg:before { background-color: #f8fafc; }

/* Dimension's close "×" is a white SVG; darken it. */
html[data-theme="light"] #main article .close:before { filter: invert(0.85); }

/* Lighter weight text needs a touch more weight on white. */
html[data-theme="light"] body,
html[data-theme="light"] input,
html[data-theme="light"] textarea { font-weight: 400; }
html[data-theme="light"] .work-card .image img { filter: grayscale(15%); }

/* Dimension puts a dark halo behind the header; use a white glow in light mode. */
html[data-theme="light"] #header {
	background-image: radial-gradient(rgba(255, 255, 255, 0.55) 25%, rgba(255, 255, 255, 0) 55%);
}
html[data-theme="light"] #header .content p { color: rgba(var(--fg-rgb), 0.8); font-weight: 600; }

/* ---------- Header nav: equal-width items ----------
   Dimension draws its centre line at 50% of the nav and assumes that's the
   gap between items 3 and 4. "Credentials" is wider than the rest, which
   pushed that gap off-centre and the line through "Reviews". Equal columns
   put the gap exactly at 50%. (≤736px the nav stacks and the line is hidden.) */
@media screen and (min-width: 737px) {
	#header nav ul {
		display: grid;
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
	#header nav ul li a {
		min-width: 0;
		padding: 0 1rem;
		text-align: center;
	}
}
@media screen and (min-width: 737px) and (max-width: 1100px) {
	#header nav ul li a {
		padding: 0 0.6rem;
		font-size: 0.7rem;
		letter-spacing: 0.12rem;
	}
}

/* =========================================================================
   Modal motion
   Panels (#main article) and the gallery lightbox open with a soft
   rise + scale + focus-in, then reveal their content in a short stagger.
   Opening uses a long ease-out; closing is quicker and eases in, and stays
   under Dimension's 325ms hide delay so nothing is cut off.
   ========================================================================= */
:root {
	--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
	--ease-in-soft: cubic-bezier(0.4, 0, 1, 1);
	--spring: cubic-bezier(0.16, 1, 0.3, 1); /* used by lightbox.css */
}

/* ---------- Panels: 3D unfold ----------
   Each panel starts folded back on a hinge along its top edge and swings
   down flat toward the viewer as it fades in; closing folds it back up.
   The negative tilt sends the free (bottom) edge away from the viewer, so
   even very tall panels never swing through the camera. */
#main article {
	opacity: 0;
	transform-origin: 50% 0;
	transform: perspective(1600px) rotateX(-70deg);
	backface-visibility: hidden;
	transition:
		opacity 0.22s ease-in,
		transform 0.26s var(--ease-in-soft);
}
#main article.active {
	opacity: 1;
	/* `none` (not a 0deg rotate) so the settled panel isn't left on a 3D
	   layer, which can soften text. */
	transform: none;
	transition:
		opacity 0.5s ease-out,
		transform 1s var(--ease-out-expo);
}

/* Content rises in one block after another. */
#main article > *:not(.close) {
	opacity: 0;
	transform: translateY(0.75rem);
	transition: opacity 0.18s ease-in, transform 0.18s ease-in;
}
#main article.active > *:not(.close) {
	opacity: 1;
	transform: none;
	transition: opacity 0.55s ease-out, transform 0.7s var(--ease-out-expo);
	transition-delay: 0.6s;
}
#main article.active > *:nth-child(1) { transition-delay: 0.12s; }
#main article.active > *:nth-child(2) { transition-delay: 0.18s; }
#main article.active > *:nth-child(3) { transition-delay: 0.24s; }
#main article.active > *:nth-child(4) { transition-delay: 0.30s; }
#main article.active > *:nth-child(5) { transition-delay: 0.36s; }
#main article.active > *:nth-child(6) { transition-delay: 0.42s; }
#main article.active > *:nth-child(7) { transition-delay: 0.48s; }
#main article.active > *:nth-child(8) { transition-delay: 0.54s; }

/* Heading underline draws in from the left. */
#main article h2.major {
	position: relative;
	border-bottom-color: transparent;
}
#main article h2.major:after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 100%;
	height: 1px;
	background: rgb(var(--fg-rgb));
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.2s ease-in;
}
#main article.active h2.major:after {
	transform: scaleX(1);
	transition: transform 0.9s var(--ease-out-expo) 0.3s;
}

/* Close button turns into place. */
#main article .close {
	opacity: 0;
	transform: rotate(-90deg) scale(0.6);
	transition: opacity 0.18s ease-in, transform 0.2s ease-in;
}
#main article.active .close {
	opacity: 1;
	transform: none;
	transition: opacity 0.4s ease-out 0.25s, transform 0.6s var(--ease-out-expo) 0.25s;
}
#main article .close:before { transition: background-color 0.2s ease-in-out, transform 0.3s var(--ease-out-expo); }
#main article .close:hover:before { transform: rotate(90deg); }

/* ---------- About panel: extra choreography ----------
   Uses the shared 3D unfold above, plus a sheen that sweeps across once,
   a hero photo that wipes up with a slow Ken Burns settle, and a longer
   section-by-section reveal. */
#main #about {
	/* The sheen and sliding chapters would otherwise extend the page's
	   scroll area. `clip` (unlike `hidden`) doesn't make a scroll box. */
	overflow: hidden;
	overflow: clip;
}

/* One-time light sheen across the panel. */
#main #about::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(105deg,
		transparent 35%,
		rgba(var(--fg-rgb), 0.07) 48%,
		rgba(var(--fg-rgb), 0.12) 50%,
		rgba(var(--fg-rgb), 0.07) 52%,
		transparent 65%);
	transform: translateX(-100%);
	opacity: 0;
}
#main #about.active::after { animation: about-sheen 1.4s var(--ease-out-expo) 0.25s both; }

@keyframes about-sheen {
	0%   { transform: translateX(-100%); opacity: 1; }
	100% { transform: translateX(100%);  opacity: 0; }
}

/* Section order (the about panel has more children than the generic stagger). */
#main #about.active > :nth-child(1)  { transition-delay: 0.15s; }
#main #about.active > :nth-child(2)  { transition-delay: 0.22s; }
#main #about.active > :nth-child(3)  { transition-delay: 0.40s; }
#main #about.active > :nth-child(4)  { transition-delay: 0.48s; }
#main #about.active > :nth-child(5)  { transition-delay: 0.62s; }
#main #about.active > :nth-child(6)  { transition-delay: 0.68s; }
#main #about.active > :nth-child(7)  { transition-delay: 0.76s; }
#main #about.active > :nth-child(8)  { transition-delay: 0.86s; }
#main #about.active > :nth-child(9)  { transition-delay: 0.96s; }
#main #about.active > :nth-child(10) { transition-delay: 1.06s; }
#main #about.active > :nth-child(n+11) { transition-delay: 1.14s; }

/* Hero photo: curtain wipe upward + slow zoom settle. */
#main #about .image.main {
	overflow: hidden;
	clip-path: inset(100% 0 0 0 round 4px);
	transition: opacity 0.18s ease-in, transform 0.18s ease-in, clip-path 0.2s ease-in;
}
#main #about .image.main img {
	transform: scale(1.18);
	transition: transform 0.2s ease-in;
}
#main #about.active .image.main {
	clip-path: inset(0 0 0 0 round 4px);
	transition: opacity 0.55s ease-out 0.22s, transform 0.7s var(--ease-out-expo) 0.22s, clip-path 1.1s var(--ease-out-expo) 0.25s;
}
#main #about.active .image.main img {
	transform: scale(1);
	transition: transform 2.2s var(--ease-out-expo) 0.25s;
}

/* Stats: rule lines draw out, then each figure rises in turn. */
#main #about .stats-grid li {
	opacity: 0;
	transform: translateY(0.9rem);
	transition: opacity 0.15s ease-in, transform 0.15s ease-in;
}
#main #about.active .stats-grid li {
	opacity: 1;
	transform: none;
	transition: opacity 0.6s ease-out, transform 0.8s var(--ease-out-expo);
}
#main #about.active .stats-grid li:nth-child(1) { transition-delay: 0.55s; }
#main #about.active .stats-grid li:nth-child(2) { transition-delay: 0.63s; }
#main #about.active .stats-grid li:nth-child(3) { transition-delay: 0.71s; }
#main #about.active .stats-grid li:nth-child(4) { transition-delay: 0.79s; }

/* Quote: the left rule grows down before the words settle in. */
#main #about blockquote {
	position: relative;
	border-left-color: transparent;
}
#main #about blockquote::before {
	content: '';
	position: absolute;
	left: -4px;
	top: 0;
	bottom: 0;
	width: 4px;
	background: rgb(var(--fg-rgb));
	transform: scaleY(0);
	transform-origin: top center;
	transition: transform 0.15s ease-in;
}
#main #about.active blockquote::before {
	transform: scaleY(1);
	transition: transform 0.9s var(--ease-out-expo) 0.85s;
}

/* Chapters slide in from alternating sides; the photo wipes across. */
#main #about > .chapter:nth-of-type(odd)  { transform: translateX(-1.5rem); }
#main #about > .chapter:nth-of-type(even) { transform: translateX(1.5rem); }
#main #about.active > .chapter { transform: none; }
#main #about .chapter .image {
	overflow: hidden;
	clip-path: inset(0 100% 0 0 round 4px);
	transition: clip-path 0.15s ease-in;
}
#main #about.active .chapter .image {
	clip-path: inset(0 0 0 0 round 4px);
	transition: clip-path 0.9s var(--ease-out-expo);
}
#main #about.active > :nth-child(8)  .image { transition-delay: 1.0s; }
#main #about.active > :nth-child(9)  .image { transition-delay: 1.1s; }
#main #about.active > :nth-child(10) .image { transition-delay: 1.2s; }

/* Phones: stack chapters with a wide photo, keep small text readable,
   and shorten the slide distances so motion stays inside narrow screens. */
@media screen and (max-width: 480px) {
	#main #about { padding-top: 3.25rem; }
	#main #about .image.main { margin: 1.25rem 0 1.5rem; }
	#main #about .image.main img { aspect-ratio: 16 / 10; }
	#main #about .stats-grid strong { font-size: 1.75rem; }
	#main #about .stats-grid span { font-size: 0.7rem; letter-spacing: 0.12rem; }
	#main #about h3.major { margin-top: 2.25rem; }
	#main #about blockquote { padding-left: 1.25rem; }
	#main #about .chapter {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.85rem;
		margin-bottom: 2.25rem;
	}
	#main #about .chapter .image img { aspect-ratio: 16 / 9; }
	#main #about .kicker { font-size: 0.7rem; letter-spacing: 0.12rem; }
	#main #about > .chapter:nth-of-type(odd)  { transform: translateX(-0.75rem); }
	#main #about > .chapter:nth-of-type(even) { transform: translateX(0.75rem); }
	#main #about.active > .chapter { transform: none; }
	#main #about .decision-chip { font-size: 0.72rem; height: auto; min-height: 2.75rem; line-height: 1.3; padding: 0.6rem 1rem; white-space: normal; }
	#main #about > ul.actions { flex-direction: column; }
	#main #about > ul.actions li { width: 100%; }
	#main #about > ul.actions .button { width: 100%; }
}

/* Decision chips pop in one by one. */
#main #about .decision .actions li {
	opacity: 0;
	transform: translateY(0.5rem) scale(0.96);
	transition: opacity 0.15s ease-in, transform 0.15s ease-in;
}
#main #about.active .decision .actions li {
	opacity: 1;
	transform: none;
	transition: opacity 0.5s ease-out, transform 0.6s var(--ease-out-expo);
}
#main #about.active .decision .actions li:nth-child(1) { transition-delay: 1.25s; }
#main #about.active .decision .actions li:nth-child(2) { transition-delay: 1.31s; }
#main #about.active .decision .actions li:nth-child(3) { transition-delay: 1.37s; }
#main #about.active .decision .actions li:nth-child(4) { transition-delay: 1.43s; }

/* Revealed answer eases in rather than snapping. */
#main #about .decision-answer:not([hidden]) { animation: about-answer-in 0.5s var(--ease-out-expo) both; }
@keyframes about-answer-in {
	from { opacity: 0; transform: translateY(0.5rem); }
	to   { opacity: 1; transform: none; }
}

/* ---------- Lightbox ---------- */
.lb-overlay {
	transition: opacity 0.3s ease-in;
}
.lb-overlay.lb-open {
	transition: opacity 0.4s ease-out;
}
/* Same 3D unfold as the panels, hinged on the top edge. */
.lb-panel {
	opacity: 0;
	transform-origin: 50% 0;
	transform: perspective(1600px) rotateX(-70deg);
	backface-visibility: hidden;
	transition: opacity 0.22s ease-in, transform 0.28s var(--ease-in-soft);
}
.lb-overlay.lb-open .lb-panel {
	opacity: 1;
	transform: none;
	transition: opacity 0.5s ease-out 0.05s, transform 1s var(--ease-out-expo) 0.05s;
}
/* ≤768px the lightbox is a bottom sheet (lightbox.css), so hinge it on its
   bottom edge and unfold upward; the top edge tilts away from the viewer. */
@media (max-width: 768px) {
	.lb-panel {
		transform-origin: 50% 100%;
		transform: perspective(1600px) rotateX(70deg);
	}
	.lb-overlay.lb-open .lb-panel { transform: none; }
}

@keyframes lb-item-in {
	from { opacity: 0; transform: translateY(1rem) scale(0.97); }
	to   { opacity: 1; transform: none; }
}
@keyframes lb-fade-in {
	from { opacity: 0; transform: scale(0.985); }
	to   { opacity: 1; transform: none; }
}
.lb-overlay.lb-open .lb-thumb,
.lb-overlay.lb-open .lb-project-card,
.lb-overlay.lb-open .lb-web-card,
.lb-overlay.lb-open .lb-bento-item,
.lb-overlay.lb-open .lb-text-intro {
	animation: lb-item-in 0.6s var(--ease-out-expo) both;
	animation-delay: 0.5s;
}
.lb-overlay.lb-open :is(.lb-thumb, .lb-project-card, .lb-web-card, .lb-bento-item, .lb-text-intro):nth-child(1) { animation-delay: 0.15s; }
.lb-overlay.lb-open :is(.lb-thumb, .lb-project-card, .lb-web-card, .lb-bento-item, .lb-text-intro):nth-child(2) { animation-delay: 0.20s; }
.lb-overlay.lb-open :is(.lb-thumb, .lb-project-card, .lb-web-card, .lb-bento-item, .lb-text-intro):nth-child(3) { animation-delay: 0.25s; }
.lb-overlay.lb-open :is(.lb-thumb, .lb-project-card, .lb-web-card, .lb-bento-item, .lb-text-intro):nth-child(4) { animation-delay: 0.30s; }
.lb-overlay.lb-open :is(.lb-thumb, .lb-project-card, .lb-web-card, .lb-bento-item, .lb-text-intro):nth-child(5) { animation-delay: 0.35s; }
.lb-overlay.lb-open :is(.lb-thumb, .lb-project-card, .lb-web-card, .lb-bento-item, .lb-text-intro):nth-child(6) { animation-delay: 0.40s; }
.lb-overlay.lb-open :is(.lb-thumb, .lb-project-card, .lb-web-card, .lb-bento-item, .lb-text-intro):nth-child(7) { animation-delay: 0.45s; }
.lb-single-view.visible { animation: lb-fade-in 0.45s var(--ease-out-expo) both; }

/* ---------- Reduced motion: keep the fades, drop the movement ---------- */
@media (prefers-reduced-motion: reduce) {
	#main article,
	#main article > *,
	#main article .close,
	.lb-panel {
		transform: none !important;
		filter: none !important;
	}
	#main article h2.major:after { transform: scaleX(1) !important; transition: none !important; }
	.lb-overlay.lb-open .lb-thumb,
	.lb-overlay.lb-open .lb-project-card,
	.lb-overlay.lb-open .lb-web-card,
	.lb-overlay.lb-open .lb-bento-item,
	.lb-overlay.lb-open .lb-text-intro,
	.lb-single-view.visible { animation: none; }
	#main #about,
	#main #about .image.main,
	#main #about .chapter .image { clip-path: none !important; }
	#main #about .image.main img,
	#main #about .stats-grid li,
	#main #about .decision .actions li { transform: none !important; }
	#main #about blockquote::before { transform: scaleY(1) !important; transition: none !important; }
	#main #about::after,
	#main #about .decision-answer:not([hidden]) { animation: none; }
}
