@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500;700;800&display=swap');

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

:root {
	--bg: #000000;
	--bg-card: #0a0a0a;
	--bg-card-hover: #111111;
	--bg-elevated: #151515;
	--text: #f4f4f5;
	--text-secondary: #a1a1aa;
	--accent: #ff3b3b;
	--accent-dim: rgba(255, 59, 59, 0.08);
	--accent-muted: rgba(255, 59, 59, 0.35);
	--border: #222222;
	--border-accent: rgba(255, 59, 59, 0.25);
	--radius: 0px; /* Techy squarish edges */
	--font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	--font-mono: 'JetBrains Mono', monospace;
}

:root[data-theme='dark'] {
	--bg: #000000;
	--bg-card: #0a0a0a;
	--bg-card-hover: #111111;
	--bg-elevated: #151515;
	--text: #f4f4f5;
	--text-secondary: #a1a1aa;
	--accent: #ff3b3b;
	--accent-dim: rgba(255, 59, 59, 0.08);
	--accent-muted: rgba(255, 59, 59, 0.35);
	--border: #222222;
	--border-accent: rgba(255, 59, 59, 0.25);
}

:root[data-theme='light'] {
	--bg: #ffffff;
	--bg-card: #f9f9f9;
	--bg-card-hover: #f1f1f1;
	--bg-elevated: #ffffff;
	--text: #111111;
	--text-secondary: #555555;
	--accent: #e52e2e;
	--accent-dim: rgba(229, 46, 46, 0.08);
	--accent-muted: rgba(229, 46, 46, 0.35);
	--border: #e5e5e5;
	--border-accent: rgba(229, 46, 46, 0.25);
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-main);
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
	min-height: 100vh;
	overflow-x: hidden;
	transition:
		background-color 0.3s,
		color 0.3s;
}

.container {
	max-width: 800px;
	margin: 0 auto;
	padding: 0 24px;
	position: relative;
	z-index: 1;
}

/* Header / Controls */
.top-controls {
	display: flex;
	justify-content: flex-end;
	padding: 24px 0;
}

/* Tech Header text */
.tech-label {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	color: var(--accent);
	text-transform: uppercase;
	letter-spacing: 0.15em;
	margin-bottom: 24px;
	display: inline-flex;
	align-items: center;
	line-height: 1;
	padding: 7px 16px 6px;
	border: 1px solid var(--border-accent);
	border-radius: var(--radius);
	background: var(--accent-dim);
}

/* Hero */
.hero {
	padding: 60px 0 72px;
	position: relative;
}

.hero__name {
	font-size: clamp(2.5rem, 6vw, 4rem);
	font-weight: 800;
	font-family: var(--font-mono);
	letter-spacing: -0.04em;
	margin-bottom: 16px;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--text);
}

.hero__title {
	font-size: clamp(1.1rem, 2.5vw, 1.3rem);
	color: var(--text-secondary);
	font-weight: 300;
	max-width: 650px;
	letter-spacing: 0.02em;
}

/* Intro text */
.intro-text {
	margin-bottom: 48px;
}

.intro-text p {
	max-width: 700px;
}

/* Sections */
.section {
	margin-bottom: 48px;
	background: transparent;
	padding: 0;
	border: none;
}

.section + .section,
.intro-text + .section {
	border-top: 1px solid var(--border);
	padding-top: 40px;
}

.section + .connect-section {
	border-top: 1px solid var(--border);
	padding-top: 40px;
}

/* Connect footer — no background */
.connect-section {
	margin-top: 48px;
	padding-bottom: 64px;
}

.section__header {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 32px;
}

.section__num {
	font-family: var(--font-mono);
	color: var(--bg);
	font-size: 0.75rem;
	font-weight: 700;
	padding: 0 15px;
	background: var(--accent);
	/* height = exactly one line of the title: font-size × line-height */
	line-height: calc(1.4rem * 1.2);
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.section__title {
	font-size: 1.4rem;
	font-weight: 700;
	font-family: var(--font-mono);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	line-height: 1.3;
}

/* Expertise Text */
.expertise__text {
	font-size: 1.05rem;
	color: var(--text-secondary);
	font-weight: 400;
	line-height: 1.7;
	margin-bottom: 24px;
}

.expertise__text strong {
	color: var(--text);
	font-weight: 600;
}

.expertise__list {
	font-size: 1.05rem;
	color: var(--text-secondary);
	line-height: 1.7;
	margin: 0 0 24px 0;
	padding-left: 20px;
}

.expertise__list li {
	margin-bottom: 10px;
}

.expertise__list strong {
	color: var(--text);
	font-weight: 600;
}

.video__wrapper {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	background: var(--bg);
	border: 1px solid var(--border);
}

.video__wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
	opacity: 0.95;
	transition: opacity 0.3s;
}
.video__wrapper:hover iframe {
	opacity: 1;
}

/* Links */
.links-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
}

.link-card {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	text-decoration: none;
	color: var(--text);
	transition: all 0.2s ease;
}

.link-card:hover {
	background: var(--bg-elevated);
	border-color: var(--accent-muted);
}

.link-card__icon {
	width: 24px;
	height: 24px;
	color: var(--text);
	transition: color 0.2s;
}

.link-card:hover .link-card__icon {
	color: var(--accent);
}

.link-card__label {
	font-weight: 600;
	font-size: 1rem;
	font-family: var(--font-mono);
}

.link-card__sub {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	color: var(--text-secondary);
	margin-top: 4px;
}

/* Section inline actions */
.section-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 24px;
}

.btn-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-mono);
	font-size: 0.75rem;
	text-transform: uppercase;
	color: var(--text);
	text-decoration: none;
	padding: 10px 20px;
	border: 1px solid var(--border);
	background: var(--bg-card);
	transition: all 0.2s;
	white-space: nowrap;
}

.btn-link:hover {
	background: var(--accent-dim);
	border-color: var(--accent);
	color: var(--accent);
}

.btn-link__arrow {
	display: inline-block;
	transition: transform 0.2s;
}

.btn-link:hover .btn-link__arrow {
	transform: translate(3px, -3px);
}

/* Animations */
.fade-in {
	opacity: 0;
	transform: translateY(15px);
	transition:
		opacity 0.5s ease-out,
		transform 0.5s ease-out;
}

.fade-in.visible {
	opacity: 1;
	transform: translateY(0);
}

@media (max-width: 600px) {
	.features-grid {
		grid-template-columns: 1fr;
	}
	.hero {
		padding: 40px 0 50px;
	}
	.top-controls {
		padding: 16px 0;
	}
}

/* Embed Grids */
.embed-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-top: 24px;
}
.embed-grid--shorts {
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.embed-grid--cols-3 {
	grid-template-columns: repeat(3, 1fr);
}
.embed-wrapper {
	position: relative;
	padding-bottom: 125%;
	border: 1px solid var(--border);
	background: var(--bg);
}
.embed-wrapper--short {
	padding-bottom: 177.77%;
}
.embed-wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
}

/* Blockquote */
blockquote {
	margin: 24px 0;
	padding-left: 16px;
	border-left: 4px solid var(--border);
	font-style: italic;
	color: var(--text-secondary);
	line-height: 1.7;
}

/* ── Selected Works page ─────────────────────────────────────── */

/* General visibility helper for x-intersect.once */
.sw-animate {
	opacity: 0;
	transform: translateY(15px);
	transition:
		opacity 0.5s,
		transform 0.5s;
}

.visible {
	opacity: 1;
	transform: none;
}

.sw-container {
	padding-bottom: 80px;
}

/* Header */
.sp-header {
	padding: 60px 0 48px;
	border-bottom: 1px solid var(--border);
	margin-bottom: 48px;
}

.sp-eyebrow {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	color: var(--accent);
	text-transform: uppercase;
	letter-spacing: 0.15em;
	margin-bottom: 20px;
}

.sp-title {
	font-family: var(--font-mono);
	font-size: clamp(2.5rem, 6vw, 4rem);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: -0.04em;
	line-height: 1.1;
	color: var(--text);
	margin-bottom: 24px;
}

.sp-notice {
	font-size: 0.85rem;
	color: var(--text-secondary);
	background: var(--accent-dim);
	border: 1px solid var(--border-accent);
	padding: 12px 16px;
	margin-bottom: 20px;
	line-height: 1.6;
}

.sp-subtitle {
	font-size: 1rem;
	color: var(--text-secondary);
	line-height: 1.7;
	max-width: 640px;
	margin-bottom: 24px;
}

.sp-back {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-secondary);
	text-decoration: none;
	border-bottom: 1px solid var(--border);
	padding-bottom: 2px;
	margin-top: 24px;
	transition:
		color 0.2s,
		border-color 0.2s;
	display: inline-block;
}

.sp-back:hover {
	color: var(--accent);
	border-color: var(--accent);
}

/* Loading */
.sp-loading {
	font-family: var(--font-mono);
	font-size: 0.85rem;
	color: var(--text-secondary);
	padding: 40px 0;
}

/* Work card */
.sw-work {
	margin-bottom: 64px;
	padding-bottom: 64px;
	border-bottom: 1px solid var(--border);
}

.sw-work:last-of-type {
	border-bottom: none;
}

/* Image grid — images will fill naturally via Tailwind grid classes */
.sw-work img.square {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
}

/* Meta */
.sw-meta {
	display: flex;
	gap: 24px;
	margin-top: 24px;
	align-items: flex-start;
}

.sw-index {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--bg);
	background: var(--accent);
	padding: 3px 10px;
	flex-shrink: 0;
	line-height: 1.8;
}

.sw-info {
	flex: 1;
	min-width: 0;
}

.sw-title {
	font-family: var(--font-mono);
	font-size: 1.2rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--text);
	margin-bottom: 8px;
}

.sw-customer {
	display: flex;
	align-items: center;
	font-family: var(--font-mono);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--accent);
	margin-bottom: 12px;
}

.sw-customer svg {
	width: 14px;
	height: 14px;
	margin-right: 6px;
	flex-shrink: 0;
}

.sw-desc {
	font-size: 0.95rem;
	color: var(--text-secondary);
	line-height: 1.7;
	margin-bottom: 16px;
}

.sw-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sw-tag {
	font-family: var(--font-mono);
	font-size: 0.65rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--text-secondary);
	border: 1px solid var(--border);
	padding: 3px 10px;
}

/* More works section */
.sp-more-works .sp-notice {
	max-width: 600px;
	margin-bottom: 24px;
}

.sp-notice a {
	text-decoration: underline;
}

/* More works & footer */
.sp-more-works {
	padding: 48px 0 32px;
	border-top: 1px solid var(--border);
}

.sp-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 24px 0 48px;
	font-family: var(--font-mono);
	font-size: 0.7rem;
	color: var(--text-secondary);
	border-top: 1px solid var(--border);
	gap: 16px;
	flex-wrap: wrap;
}

@media (max-width: 600px) {
	.sw-meta {
		flex-direction: column;
		gap: 12px;
	}
	.sp-footer {
		flex-direction: column;
		align-items: flex-start;
	}
}
