/* ==========================================================================
   V5 — BASE
   ========================================================================== */

/* FONTS */

@font-face {
	font-family: "Berkeley Mono";
	src: url("../fonts/berkeley-mono-regular.woff2") format("woff2");
	font-weight: normal;
	font-style: normal;
	font-display: block;
}

@font-face {
	font-family: "Die Grotesk A";
	src: url("../fonts/die-grotesk-a-regular.woff2") format("woff2");
	font-weight: normal;
	font-style: normal;
	font-display: block;
}

@font-face {
	font-family: "Die Grotesk B";
	src: url("../fonts/die-grotesk-b-regular.woff2") format("woff2");
	font-weight: normal;
	font-style: normal;
	font-display: block;
}

.font-grotesk-a {
	font-family: "Die Grotesk A", sans-serif;
}

.font-grotesk-b {
	font-family: "Die Grotesk B", sans-serif;
}

.font-berkeley {
	font-family: "Berkeley Mono", monospace;
}

/* ==========================================================================
   CUSTOM PROPERTIES
   ========================================================================== */

:root {
	--color-bg: #000000;
	--color-text: #ffffff;
	--color-accent: #aaff00;
	--color-border: #1a1a1a;
	--opacity-15: rgba(255, 255, 255, 0.15);
	--opacity-25: rgba(255, 255, 255, 0.25);
	--opacity-50: rgba(255, 255, 255, 0.5);
	--opacity-75: rgba(255, 255, 255, 0.75);
	--opacity-90: rgba(255, 255, 255, 0.9);
	--gap-section: 16px;
	--gap-flex: 20px;
	--max-width: 2880px;
	--padding-x: 60px;
}

:root.light-mode {
	--color-bg: #ffffff;
	--color-text: #000000;
	--color-accent: #0044FF;
	--color-border: #e5e5e5;
	--opacity-15: rgba(0, 0, 0, 0.15);
	--opacity-25: rgba(0, 0, 0, 0.25);
	--opacity-50: rgba(0, 0, 0, 0.5);
	--opacity-75: rgba(0, 0, 0, 0.75);
	--opacity-90: rgba(0, 0, 0, 0.9);
}

/* ==========================================================================
   RESET
   ========================================================================== */

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

html {
	line-height: 1.15;
	-webkit-text-size-adjust: 100%;
	-moz-tab-size: 4;
	tab-size: 4;
	scroll-behavior: smooth;
}

body {
	margin: 0 auto;
	line-height: 1.6;
	color: var(--color-text);
	font-size: 12px;
	font-family: "Berkeley Mono", monospace;
	max-width: 100%;
	background-color: var(--color-bg);
}

/* TEXT SELECTION */

::selection {
	background-color: var(--opacity-50);
	color: var(--color-bg);
}

::-moz-selection {
	background-color: var(--opacity-50);
	color: var(--color-bg);
}

/* TYPOGRAPHY RESETS */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-size: inherit;
	font-weight: inherit;
}

ul,
ol {
	list-style: none;
}

a {
	color: inherit;
	text-decoration: inherit;
}

a:hover {
	opacity: 0.5;
}

a.underline {
	text-decoration: underline;
	text-underline-position: from-font;
	text-underline-offset: 1px;
	text-decoration-skip-ink: auto;
}

button,
input,
select,
textarea {
	font-family: inherit;
	font-size: 100%;
	line-height: 1.15;
	margin: 0;
}

button,
select {
	text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
	-webkit-appearance: button;
	appearance: button;
}

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

pre,
code {
	font-family: "Berkeley Mono", monospace;
	white-space: pre-wrap;
	word-wrap: break-word;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.mono {
	font-family: "Berkeley Mono", monospace;
}

.mono.small {
	font-size: 12px;
	line-height: 18px;
}

.opacity-15 {
	opacity: 0.15;
}

.opacity-25 {
	opacity: 0.25;
}

.opacity-35 {
	opacity: 0.35;
}

.opacity-50 {
	opacity: 0.5;
}

.opacity-75 {
	opacity: 0.75;
}

.opacity-90 {
	opacity: 0.9;
}

.opacity-100 {
	opacity: 1;
}

.accent {
	color: var(--color-accent);
}

.divider {
	width: 100%;
	height: 0;
	border: none;
	border-top: 1px dashed var(--color-border);
	margin: var(--gap-section) 0;
	padding: 0;
}

.uppercase {
	text-transform: uppercase;
}

.no-break {
	white-space: nowrap;
}

.mobile-only {
	display: none;
}

/* ==========================================================================
   HOMEPAGE
   ========================================================================== */

.page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.page-content {
	flex: 1 0 auto;
}

.page>header {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 64px var(--padding-x) 0;
	width: 100%;
	box-sizing: border-box;
}

.logo {
	width: 110px;
	height: auto;
}

:root.light-mode .logo {
	filter: invert(1);
}

.logo-caption {
	font-size: 12px;
	line-height: 22px;
	color: var(--opacity-50);
	margin-top: 24px;
}

.info {
	max-width: var(--max-width);
	margin: clamp(160px, 24vh, 460px) auto 0;
	padding: 0 var(--padding-x);
	width: 100%;
	box-sizing: border-box;
}

.page-content .info {
	position: sticky;
	top: 0;
	z-index: 500;
	background-color: color-mix(in srgb, var(--color-bg) 75%, transparent);
	-webkit-backdrop-filter: blur(12px) saturate(180%);
	backdrop-filter: blur(12px) saturate(180%);
}

.row {
	display: grid;
	grid-template-columns: 200px 1fr;
	font-size: 14px;
	line-height: 24px;
	color: var(--opacity-90);
	border-top: 1px dashed var(--color-border);
	padding: 16px 0 15px;
}

.row:last-of-type {
	border-bottom: 1px dashed var(--color-border);
}

.label {
	color: var(--opacity-50);
}

.page .opacity-15 {
	color: var(--opacity-15);
	opacity: 1;
}

.page .opacity-25 {
	color: var(--opacity-25);
	opacity: 1;
}

.page .opacity-50 {
	color: var(--opacity-50);
	opacity: 1;
}

.page .opacity-75 {
	color: var(--opacity-75);
	opacity: 1;
}

.page .opacity-90 {
	color: var(--opacity-90);
	opacity: 1;
}

.page a:hover {
	opacity: 0.5;
}

.page>footer {
	margin-top: auto;
	font-size: 12px;
	line-height: 22px;
	color: var(--opacity-90);
}

.footer-meta {
	margin-bottom: 22px;
}

.mode-light,
.mode-dark {
	color: var(--opacity-50);
}

/* ==========================================================================
   HEADER LINKS
   ========================================================================== */

.header-links {
	position: absolute;
	right: var(--padding-x);
	top: 50%;
	transform: translateY(-50%);
	font-family: "Berkeley Mono", monospace;
	font-size: 12px;
	line-height: 24px;
	color: var(--opacity-50);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.info.is-stuck .header-links {
	opacity: 1;
	pointer-events: auto;
}

.header-links a {
	color: var(--opacity-75);
}

/* ==========================================================================
   SECTION LABEL
   ========================================================================== */

.section-label {
	font-family: "Berkeley Mono", monospace;
	text-transform: uppercase;
	font-size: 12px;
	line-height: 22px;
	color: var(--opacity-25);
}

/* ==========================================================================
   WORK SECTION
   ========================================================================== */

.work-samples {
	display: flex;
	flex-direction: column;
	gap: var(--gap-section);
	max-width: var(--max-width);
	margin: 0 auto;
	padding: var(--gap-section) var(--padding-x);
	margin-top: 120px;
	width: 100%;
	box-sizing: border-box;
}

.work-samples:last-of-type {
	margin-bottom: 120px;
}

.work-intro {
	display: grid;
	grid-template-columns: minmax(0, 880px) minmax(0, 880px);
	gap: 0 3rem;
	font-size: 24px;
	line-height: 32px;
	color: var(--opacity-90);
	margin-bottom: 12rem;
}

.work-intro p {
	margin-bottom: 32px;
}

.work-intro p:last-child {
	margin-bottom: 0;
}

.work-samples .divider {
	margin: 8px 0;
}

.work-label {
	font-family: "Berkeley Mono", monospace;
	font-size: 11px;
	line-height: normal;
	text-transform: uppercase;
	color: var(--opacity-25);
	margin: 0;
}

.work-content {
	max-width: 100%;
}

/* WORK GRID */

.work-grid {
	display: grid;
	grid-template-columns: repeat(10, 1fr);
	gap: var(--gap-flex);
	width: 100%;
	margin-top: var(--gap-section);
	margin-bottom: 2rem;
}

.work-item {
	display: flex;
	flex-direction: column;
	gap: var(--gap-section);
	overflow: hidden;
	align-self: start;
}

.work-item[data-columns="1"] {
	grid-column: span 1;
}

.work-item[data-columns="2"] {
	grid-column: span 2;
}

.work-item[data-columns="3"] {
	grid-column: span 3;
}

.work-item[data-columns="4"] {
	grid-column: span 4;
}

.work-grid>hr.work-grid-divider {
	grid-column: 1 / -1;
	margin-bottom: calc(var(--gap-section) * 2);
}

.work-grid-title {
	grid-column: 1 / -1;
	justify-self: start;
	width: 100%;
	max-width: 640px;
	font-family: "Berkeley Mono", monospace;
	font-size: 14px;
	line-height: 22px;
	color: var(--color-text);
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.work-grid-title .work-title-line {
	margin: 0;
	font-size: 14px;
	line-height: 1.65;
}

.work-grid-title .work-description {
	font-size: 14px;
}

.work-grid-title .work-link {
	font-size: 14px;
	line-height: 1.65;
}

.work-grid-title .work-title-name {
	opacity: 1;
	color: var(--color-text);
	text-transform: uppercase;
}

/* WORK IMAGES */

.work-image-frame {
	width: 100%;
	box-sizing: border-box;
	background-color: #080808;
	border: 1px solid #1D1D1D;
	overflow: hidden;
}

.work-image {
	width: 100%;
	height: auto;
	display: block;
	transition: filter 0.3s ease, opacity 0.9s ease-out;
	opacity: 0;
	color: transparent;
}

.work-image.is-loaded {
	opacity: 1;
}

#work .work-image {
	filter: grayscale(0%);
}

.light-mode .work-image-frame {
	background-color: #F5F5F5;
	border-color: #DDDDDD;
}

.work-item>a {
	display: block;
	width: 100%;
}

.work-item>a:hover {
	opacity: 1;
}

/* WORK CAPTIONS */

.work-caption,
.work-text,
.work-client,
.work-number,
.work-description,
.work-filename {
	font-family: "Berkeley Mono", monospace;
	font-size: 11px;
	line-height: 1.5;
}

.work-caption {
	color: var(--color-text);
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 1rem;
}

.work-text {
	margin: 0;
}

.work-client {
	color: var(--color-text);
	opacity: 0.75;
}

.work-number {
	color: var(--color-text);
	opacity: 0.50;
}

.work-client a,
.work-number a {
	display: inline;
	color: inherit;
	opacity: inherit;
}

.work-description {
	color: var(--opacity-75);
	margin-top: 0;
	display: inline;
}

.work-filename {
	color: var(--color-text);
	margin: 0;
}

.work-link {
	font-family: "Berkeley Mono", monospace;
	font-size: 11px;
	line-height: 1.5;
	color: var(--color-text);
	margin-top: 4px;
	display: block;
}

.work-link a {
	color: inherit;
	text-decoration: none;
	opacity: 0.75;
}

.work-link a:hover {
	opacity: 1;
}

/* LOAD MORE */

.load-more-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5em 1em;
	margin-top: var(--gap-section);
	padding: var(--gap-section) 0;
}

.load-more-row .load-more-button {
	margin-top: 0;
}

.load-more-separator {
	white-space: pre;
}

.load-more-separator.hidden {
	display: none;
}

.load-more-status {
	font-family: "Berkeley Mono", monospace;
	font-size: 11px;
	line-height: normal;
	text-transform: uppercase;
}

.load-more-button {
	font-family: "Berkeley Mono", monospace;
	font-size: 12px;
	line-height: normal;
	text-transform: uppercase;
	color: var(--opacity-90);
	background: none;
	border: none;
	padding: 0;
	margin-top: 0;
	cursor: pointer;
	text-align: left;
	transition: opacity 0.2s ease;
}

.load-more-button:hover {
	opacity: 0.75;
}

.load-more-button:disabled,
.load-more-button.hidden,
.work-content>.divider.hidden {
	display: none;
}

.arrow {
	font-size: 22px;
	padding-top: 4rem;
	padding-bottom: 2rem;
}

.arrow a {
	color: inherit;
	text-decoration: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 120px var(--padding-x) 60px;
	width: 100%;
	box-sizing: border-box;
}

footer .caption {
	font-family: "Berkeley Mono", monospace;
	font-size: 11px;
	line-height: 1.65;
	color: var(--opacity-50);
}

/* ==========================================================================
   LOGOS MARQUEE
   ========================================================================== */

.marquee-column {
	display: flex;
	flex-direction: column;
	gap: var(--gap-section);
	width: 100%;
	padding: 0 0 100px 0;
}

.marquee {
	width: 100%;
	max-width: var(--max-width);
	margin: 10px auto 0;
	padding: 0;
	overflow: hidden;
	box-sizing: border-box;
	position: relative;
	border-top: 1px dashed var(--color-border);
	border-bottom: 1px dashed var(--color-border);
}

.marquee-track {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	will-change: transform;
	animation: marquee-scroll 90s linear infinite;
}

.marquee ul {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	gap: 1.5rem;
	padding: 18px 0;
	margin: 0;
	margin-right: 1.5rem;
	list-style: none;
	white-space: nowrap;
}

.marquee li {
	font-family: "Berkeley Mono", monospace;
	font-size: 11px;
	line-height: 22px;
	text-transform: uppercase;
	color: var(--color-text);
	white-space: nowrap;
}

@keyframes marquee-scroll {
	0% {
		transform: translateX(0);
	}

	100% {
		transform: translateX(-50%);
	}
}

.marquee::before,
.marquee::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: 80px;
	pointer-events: none;
	z-index: 1;
}

.marquee::before {
	left: 0;
	background: linear-gradient(to right, var(--color-bg) 0%, transparent 100%);
}

.marquee::after {
	right: 0;
	background: linear-gradient(to left, var(--color-bg) 0%, transparent 100%);
}

.logos-marquee-section {
	display: flex;
	flex-direction: column;
	gap: var(--gap-section);
	max-width: var(--max-width);
	margin: 0 auto;
	padding: var(--gap-section) 60px;
	margin-top: 240px;
	width: 100%;
	box-sizing: border-box;
}

.logos-marquee-section .marquee-column {
	display: flex;
	flex-direction: column;
	gap: var(--gap-section);
	width: 100%;
	padding: 0;
}

.logos-marquee-section .marquee-track {
	opacity: 0.50;
}

.logos-marquee-section .marquee ul {
	gap: 6rem;
	margin-right: 6rem;
}

.logos-marquee-section .marquee li {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 60px;
}

.logo-svg {
	display: block;
	max-height: 60px;
	max-width: 200px;
	width: auto;
	height: auto;
	object-fit: contain;
	opacity: 0.75;
	transition: opacity 0.3s ease;
}

.logo-svg:hover {
	opacity: 1;
}

:root.light-mode .logo-svg {
	filter: invert(1);
}

/* ==========================================================================
   SCROLL ANCHORS
   ========================================================================== */

#work {
	scroll-margin-top: 60px;
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

*:focus-visible {
	outline: 2px solid var(--opacity-50);
	outline-offset: 2px;
}

/* ==========================================================================
   RESPONSIVE — WIDE DESKTOP (≤2660px)
   ========================================================================== */

@media only screen and (max-width: 2660px) {
	:root {
		--padding-x: 3rem;
	}

	body {
		max-width: 1840px;
	}

	.work-intro {
		grid-template-columns: minmax(0, 630px) minmax(0, 630px);
		font-size: 18px;
		line-height: 26px;
	}

	.divider {
		margin: 0;
	}

	/* WORK GRID TITLES */
	.work-grid-title {
		font-size: 12px;
		line-height: 20px;
	}

	.work-grid-title .work-title-line,
	.work-grid-title .work-description,
	.work-grid-title .work-link {
		font-size: 12px;
	}

	/* LOGOS MARQUEE */
	.logos-marquee-section {
		padding-left: 3rem;
		padding-right: 3rem;
	}
}

/* ==========================================================================
   RESPONSIVE — NARROW DESKTOP (≤1640px)
   ========================================================================== */

@media only screen and (max-width: 1640px) {
	:root {
		--padding-x: 2rem;
	}

	body {
		max-width: 1200px;
	}

	.work-intro {
		grid-template-columns: minmax(0, 520px) minmax(0, 520px);
		font-size: 16px;
		line-height: 24px;
	}

	.work-samples {
		margin-top: 80px;
	}

	.work-grid {
		grid-template-columns: repeat(6, 1fr);
	}

	/* LOGOS MARQUEE */
	.logos-marquee-section {
		padding-left: 2rem;
		padding-right: 2rem;
	}
}

/* ==========================================================================
   RESPONSIVE — MOBILE (≤1080px)
   ========================================================================== */

@media only screen and (max-width: 1080px) {
	:root {
		--padding-x: 1.5rem;
	}

	.mobile-only {
		display: inline;
	}

	.desktop-only {
		display: none;
	}

	/* WORK */
	.work-samples {
		margin-top: 3rem;
		padding-left: var(--padding-x);
		padding-right: var(--padding-x);
	}

	.work-grid {
		grid-template-columns: 1fr;
	}

	.work-item[data-columns] {
		grid-column: span 1 !important;
	}

	/* FOOTER */
	footer {
		padding-top: 3rem;
		padding-bottom: 2rem;
	}

	#work {
		scroll-margin-top: 30px;
	}

	/* HOMEPAGE */
	.page>header {
		padding-top: 48px;
	}

	.info {
		margin-top: clamp(80px, 15vh, 200px);
	}

	.page>footer {
		padding-top: 60px;
		padding-bottom: 32px;
	}

	/* LOGOS MARQUEE */
	.logos-marquee-section {
		padding: 1.5rem;
		margin-top: 3rem;
	}

	.logos-marquee-section .marquee {
		margin-top: 8px;
	}

	.logos-marquee-section .marquee ul {
		gap: 4rem;
		margin-right: 4rem;
	}

	.logos-marquee-section .marquee li {
		height: 50px;
	}

	.logo-svg {
		max-height: 50px;
		max-width: 160px;
	}

	.marquee-column {
		padding-bottom: 2rem;
	}

	.marquee ul {
		padding: 12px 0;
	}

	.marquee {
		margin-top: 0;
	}

	.marquee::before,
	.marquee::after {
		display: block;
		width: 20px;
	}

}

/* ==========================================================================
   RESPONSIVE — SMALL MOBILE (≤640px)
   ========================================================================== */

@media only screen and (max-width: 640px) {

	.work-intro {
		grid-template-columns: 1fr;
		font-size: 14px;
		line-height: 22px;
	}

	.work-intro p {
		margin-bottom: 16px;
	}

	.work-intro-col:first-child {
		margin-bottom: 16px;
	}

	.work-grid-title .work-title-line,
	.work-grid-title .work-description,
	.work-grid-title .work-link {
		font-size: 12px;
	}

	/* HOMEPAGE */
	.page>header {
		padding-top: 48px;
	}

	.logo {
		width: 80px;
	}

	.logo-caption {
		margin-top: 24px;
	}

	.row {
		grid-template-columns: 100px 1fr;
		font-size: 11px;
		line-height: 20px;
	}

	.info {
		margin-top: clamp(48px, 8vh, 120px);
	}
}