/*
Theme Name: Alek Theme
Description: Block theme for Alejandro Kordich's communication, web, research and learning portfolio.
Author: Alek
Version: 0.2.0
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alek-theme
Domain Path: /languages
Tags: block-patterns, full-site-editing, portfolio, translation-ready
*/

/*
Copyright (C) 2026 Alek
This theme is distributed under the terms of the GNU General Public License v2 or later.
*/

html {
	scroll-behavior: smooth;
	scroll-padding-top: 4.5rem;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

:where(.wp-site-blocks a, .wp-site-blocks button, .wp-site-blocks input, .wp-site-blocks select, .wp-site-blocks textarea):focus-visible {
	outline: 3px solid var(--wp--preset--color--action);
	outline-offset: 4px;
}

:where(.wp-site-blocks input, .wp-site-blocks select, .wp-site-blocks textarea) {
	box-sizing: border-box;
	max-inline-size: 100%;
}

::selection {
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--text-inverse);
}

.alek-header-part {
	position: sticky;
	z-index: 20;
	top: 0;
}

.alek-site-header {
	background: color-mix(in srgb, var(--wp--preset--color--background) 95%, transparent);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.alek-header-inner {
	min-height: 4.5rem;
}

.alek-skip-link {
	position: fixed;
	z-index: 100;
	top: 0.75rem;
	left: 0.75rem;
	margin: 0;
	transform: translateY(-160%);
}

.alek-skip-link:focus-within {
	transform: translateY(0);
}

.alek-skip-link a {
	display: inline-block;
	padding: 0.75rem 1rem;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text-inverse);
}

.alek-wordmark {
	font-size: 1.55rem;
	font-weight: 800;
	letter-spacing: -0.07em;
	line-height: 1;
}

.alek-wordmark a {
	text-decoration: none;
}

.alek-wordmark a::after {
	color: var(--wp--preset--color--action);
	content: ".";
}

.alek-main-navigation {
	gap: clamp(0.85rem, 2.2vw, 2.4rem);
}

.alek-main-navigation a {
	text-decoration: none;
}

.alek-main-navigation a:hover {
	text-decoration: underline;
}

.alek-main-navigation .alek-external-link a {
	color: var(--wp--preset--color--action);
}

.alek-external-link a::after,
.alek-footer-external::after {
	content: " ↗";
}

.alek-hero {
	min-height: calc(100svh - 4.5rem);
	padding-top: clamp(3rem, 8vh, 7rem);
	padding-bottom: clamp(2.5rem, 6vh, 5rem);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	border-bottom: 1px solid var(--wp--preset--color--border-strong);
}

.alek-page-header {
	padding-top: var(--wp--preset--spacing--l);
	padding-bottom: var(--wp--preset--spacing--m);
}

.alek-page-header .wp-block-post-title {
	max-width: 14ch;
}

.alek-page-shell > .wp-block-post-featured-image {
	margin-bottom: var(--wp--preset--spacing--l);
}

.alek-hero > .alek-eyebrow,
.alek-hero > .alek-hero-title,
.alek-hero > .alek-hero-bottom {
	width: 100%;
	margin-right: 0;
	margin-left: 0;
}

.alek-eyebrow,
.alek-section-label,
.alek-service-number,
.alek-service-tags {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.alek-eyebrow::before,
.alek-section-label::before {
	content: "";
	display: inline-block;
	width: 1.6rem;
	height: 0.18rem;
	margin: 0 0.65rem 0.2rem 0;
	background: var(--wp--preset--color--action);
}

.alek-hero-title {
	max-width: 12ch;
	margin-top: clamp(2rem, 5vh, 4rem);
	margin-bottom: clamp(2rem, 5vh, 4rem);
	letter-spacing: -0.085em;
	line-height: 0.82;
}

.alek-hero-title span,
.alek-section-title span,
.alek-profile-title span,
.alek-footer-question span,
.alek-service-number,
.alek-service-tags {
	color: var(--wp--preset--color--action);
}

.alek-hero-bottom {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
	align-items: end;
	gap: clamp(2rem, 8vw, 8rem);
}

.alek-hero-lead {
	max-width: 46rem;
	font-weight: 600;
	letter-spacing: -0.035em;
	line-height: 1.15;
}

.alek-hero-lead mark {
	padding: 0 0.1em;
	background: var(--wp--preset--color--action);
	color: var(--wp--preset--color--text-inverse);
}

.alek-hero-actions {
	justify-content: flex-end;
	gap: var(--wp--preset--spacing--xs);
}

.wp-block-button__link {
	min-height: 3.2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.wp-block-button__link:hover {
	border-color: var(--wp--preset--color--action);
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: var(--wp--preset--color--background);
	border-color: var(--wp--preset--color--border-strong);
	color: var(--wp--preset--color--text);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--border-strong);
	color: var(--wp--preset--color--text-inverse);
}

.alek-section-heading {
	display: grid;
	grid-template-columns: minmax(12rem, 0.42fr) minmax(0, 1fr);
	gap: 3rem;
	margin-bottom: clamp(4rem, 8vw, 7rem);
}

.alek-section-title {
	letter-spacing: -0.075em;
	line-height: 0.92;
}

.alek-section-intro {
	max-width: 42rem;
	margin-top: 2rem;
}

.alek-services-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: clamp(2rem, 6vw, 7rem);
}

.alek-service-card {
	min-height: 22rem;
	display: flex;
	flex-direction: column;
}

.alek-service-title {
	max-width: 12ch;
	margin-top: auto;
	margin-bottom: 1.25rem;
	letter-spacing: -0.055em;
	line-height: 0.98;
}

.alek-service-copy {
	max-width: 38rem;
	margin-bottom: 1.75rem;
	color: color-mix(in srgb, var(--wp--preset--color--text) 80%, var(--wp--preset--color--background));
}

.alek-service-tags {
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--border);
}

.alek-profile-grid {
	display: grid;
	grid-template-columns: minmax(0, 0.88fr) minmax(22rem, 0.75fr);
	gap: clamp(4rem, 10vw, 10rem);
}

.alek-profile-title {
	margin-top: clamp(3rem, 7vw, 7rem);
	font-size: clamp(3rem, 5.5vw, 6.4rem);
	letter-spacing: -0.075em;
	line-height: 0.92;
}

.alek-profile-copy {
	align-self: end;
}

.alek-profile-copy > p {
	max-width: 48rem;
	margin-bottom: 1.4rem;
}

.alek-profile-intro {
	font-size: clamp(1.45rem, 2.5vw, 2.4rem);
	font-weight: 700;
	letter-spacing: -0.04em;
	line-height: 1.12;
}

.alek-text-link,
.alek-footer-email {
	font-weight: 700;
}

.alek-media-text,
.alek-project-feature,
.alek-cta {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: center;
	gap: clamp(3rem, 8vw, 8rem);
}

.alek-project-feature {
	align-items: end;
}

.alek-module-copy {
	max-width: 42rem;
}

.alek-module-copy > * + * {
	margin-top: var(--wp--preset--spacing--s);
}

.wp-block-image.is-style-alek-editorial-media {
	margin: 0;
	overflow: hidden;
}

.wp-block-image.is-style-alek-editorial-media img {
	width: 100%;
	aspect-ratio: 4 / 3;
	display: block;
	object-fit: cover;
}

.alek-process-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.5rem, 4vw, 4rem);
}

.alek-process-grid > .is-style-alek-card {
	min-height: 20rem;
	display: flex;
	flex-direction: column;
}

.alek-process-grid > .is-style-alek-card .wp-block-heading {
	margin-top: auto;
}

.alek-cta {
	align-items: end;
}

.alek-footer {
	padding-top: clamp(5rem, 10vw, 9rem);
	padding-bottom: 2rem;
}

.alek-footer-question {
	max-width: 17ch;
	margin-top: clamp(3rem, 7vw, 6rem);
	margin-bottom: 2.5rem;
	font-size: clamp(2.8rem, 7vw, 7.6rem);
	font-weight: 800;
	letter-spacing: -0.075em;
	line-height: 0.92;
}

.alek-footer-email {
	display: inline-block;
	font-size: clamp(1.4rem, 2.5vw, 2.5rem);
}

.alek-footer-bottom {
	margin-top: clamp(5rem, 12vw, 10rem);
	padding-top: 1.5rem;
	display: grid;
	grid-template-columns: auto 1fr auto auto;
	align-items: center;
	gap: clamp(1.5rem, 4vw, 4rem);
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--text-inverse) 25%, transparent);
	color: color-mix(in srgb, var(--wp--preset--color--text-inverse) 63%, var(--wp--preset--color--surface-alt));
}

.alek-footer-links {
	display: flex;
	gap: 1.5rem;
}

.alek-footer-bottom p {
	margin: 0;
}

@media (max-width: 900px) {
	.alek-hero-bottom,
	.alek-section-heading,
	.alek-profile-grid,
	.alek-media-text,
	.alek-project-feature,
	.alek-cta {
		grid-template-columns: 1fr;
	}

	.alek-hero-bottom,
	.alek-profile-grid {
		gap: 3rem;
	}

	.alek-hero-actions {
		justify-content: flex-start;
	}

	.alek-section-heading {
		gap: 2rem;
	}

	.alek-services-grid {
		column-gap: 2rem;
	}

	.alek-process-grid {
		grid-template-columns: 1fr 1fr;
	}

	.alek-profile-title {
		margin-top: 2.5rem;
	}

	.alek-footer-bottom {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 640px) {
	html {
		scroll-padding-top: 4rem;
	}

	.alek-header-inner {
		min-height: 4rem;
		gap: 1rem;
	}

	.alek-main-navigation {
		gap: 0.8rem;
		font-size: 0.75rem;
	}

	.alek-main-navigation .wp-block-navigation-item:nth-child(1),
	.alek-main-navigation .wp-block-navigation-item:nth-child(2) {
		display: none;
	}

	.alek-hero {
		min-height: calc(100svh - 4rem);
	}

	.alek-hero-actions,
	.alek-hero-actions .wp-block-button,
	.alek-hero-actions .wp-block-button__link {
		width: 100%;
	}

	.alek-services-grid {
		grid-template-columns: 1fr;
	}

	.alek-process-grid {
		grid-template-columns: 1fr;
	}

	.alek-service-card {
		min-height: 20rem;
	}

	.alek-process-grid > .is-style-alek-card {
		min-height: 16rem;
	}

	.alek-footer-bottom {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
}

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

	.wp-block-button__link {
		transition: none;
	}
}
