/* ==========================================================================
   emullernl.github.io — personal projects landing page
   Design tokens lifted from the "Abundio Dark" theme, with the same cyber /
   glassy layer so this hub matches the projects it links to.
   ========================================================================== */

:root {
	/* Core theme tokens (exact values from Abundio Dark) */
	--bg-primary: #0d1117;
	--bg-secondary: #161b22;
	--bg-tertiary: #21262d;
	--fg-primary: #e6edf3;
	--fg-secondary: #8b949e;
	--accent: #58d5ba;
	--accent-hover: #7ee2cc;
	--border: #30363d;

	/* Accent palette (for icons & decorative touches) */
	--blue: #58a6ff;
	--magenta: #bc8cff;
	--green: #3fb950;
	--yellow: #d29922;

	/* Derived / cyber tokens */
	--accent-rgb: 88, 213, 186;
	--glass-bg: rgba(22, 27, 34, 0.6);
	--glass-bg-strong: rgba(22, 27, 34, 0.82);
	--glass-inset: inset 0 0 0 1px rgba(255, 255, 255, 0.04);

	--font-mono: ui-monospace, SFMono-Regular, Menlo, "JetBrains Mono", monospace;
	--font-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--transition-fast: 120ms ease-out;
	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 16px;

	--maxw: 1180px;
	--gutter: clamp(20px, 5vw, 64px);

	color-scheme: dark;
}

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

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

body {
	font-family: var(--font-ui);
	background: var(--bg-primary);
	color: var(--fg-primary);
	line-height: 1.6;
	font-size: 16px;
	min-height: 100vh;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

img {
	display: block;
	max-width: 100%;
}

::selection {
	background: rgba(var(--accent-rgb), 0.3);
	color: #fff;
}

/* --- ambient cyber background ------------------------------------------ */
.bg-layer {
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
}

.bg-mesh {
	background:
		radial-gradient(60% 50% at 15% 0%, rgba(var(--accent-rgb), 0.16), transparent 70%),
		radial-gradient(55% 50% at 85% 8%, rgba(88, 166, 255, 0.14), transparent 70%),
		radial-gradient(50% 45% at 50% 100%, rgba(188, 140, 255, 0.12), transparent 70%);
	animation: meshDrift 24s ease-in-out infinite alternate;
}

.bg-grid {
	background-image:
		linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
	background-size: 56px 56px;
	mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 80%);
	-webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 80%);
}

.bg-vignette {
	background: radial-gradient(120% 120% at 50% 30%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

@keyframes meshDrift {
	from {
		transform: translate3d(-1.5%, -1%, 0) scale(1.05);
	}
	to {
		transform: translate3d(2%, 2%, 0) scale(1.12);
	}
}

/* --- layout ------------------------------------------------------------ */
.page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: clamp(48px, 9vw, 96px) var(--gutter);
	gap: clamp(2.4rem, 6vw, 4rem);
	text-align: center;
}

/* --- header ------------------------------------------------------------ */
.intro {
	max-width: 60ch;
}

.eyebrow {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--accent);
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	justify-content: center;
}

.dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 10px 2px rgba(var(--accent-rgb), 0.7);
	animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.35; }
}

.title {
	font-size: clamp(2.2rem, 5.5vw, 3.6rem);
	line-height: 1.06;
	letter-spacing: -0.03em;
	font-weight: 800;
	margin-top: 1rem;
}

.gradient-text {
	background: linear-gradient(120deg, #fff 0%, var(--accent-hover) 45%, var(--blue) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.lead {
	color: var(--fg-secondary);
	font-size: clamp(1rem, 1.7vw, 1.18rem);
	max-width: 52ch;
	margin: 1.2rem auto 0;
}

/* --- project tiles ----------------------------------------------------- */
.tiles {
	list-style: none;
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
	width: 100%;
	max-width: 420px;
}

.glass {
	background: var(--glass-bg);
	backdrop-filter: blur(12px) saturate(140%);
	-webkit-backdrop-filter: blur(12px) saturate(140%);
	border: 1px solid var(--border);
	box-shadow: var(--glass-inset), 0 20px 50px rgba(0, 0, 0, 0.4);
	border-radius: var(--radius-lg);
}

.tile {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 1rem;
	padding: 2.2rem 1.8rem 2rem;
	overflow: hidden;
	transition: transform var(--transition-fast), border-color var(--transition-fast),
		box-shadow var(--transition-fast);
	--tint-rgb: var(--accent-rgb);
}

/* animated gradient hairline that lights up on hover */
.tile::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(140deg, rgba(var(--tint-rgb), 0.7), transparent 45%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity var(--transition-fast);
	pointer-events: none;
}

.tile:hover,
.tile:focus-visible {
	transform: translateY(-4px);
	border-color: rgba(var(--tint-rgb), 0.4);
	box-shadow: var(--glass-inset), 0 26px 60px rgba(0, 0, 0, 0.5),
		0 0 50px rgba(var(--tint-rgb), 0.18);
	outline: none;
}

.tile:hover::before,
.tile:focus-visible::before {
	opacity: 1;
}

.tile-icon {
	display: grid;
	place-items: center;
	width: 76px;
	height: 76px;
	border-radius: 18px;
	background: rgba(var(--tint-rgb), 0.1);
	border: 1px solid rgba(var(--tint-rgb), 0.28);
	box-shadow: 0 0 26px rgba(var(--tint-rgb), 0.2);
}

.tile-icon img {
	width: 48px;
	height: 48px;
	object-fit: contain;
}

.tile-title {
	font-size: 1.3rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
}

.tile-title .arrow {
	width: 0.9em;
	height: 0.9em;
	color: var(--accent);
	transition: transform var(--transition-fast);
}

.tile:hover .tile-title .arrow,
.tile:focus-visible .tile-title .arrow {
	transform: translate(2px, -2px);
}

.tile-desc {
	color: var(--fg-secondary);
	font-size: 0.95rem;
	line-height: 1.55;
	max-width: 34ch;
}

.tile-tag {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent);
	background: rgba(var(--tint-rgb), 0.1);
	border: 1px solid rgba(var(--tint-rgb), 0.25);
	border-radius: 999px;
	padding: 0.3em 0.85em;
}

/* --- footer ------------------------------------------------------------ */
.footer {
	color: var(--fg-secondary);
	font-size: 0.85rem;
	font-family: var(--font-mono);
	letter-spacing: 0.04em;
}

.footer a:hover {
	color: var(--accent-hover);
}

/* --- reveal-on-load ---------------------------------------------------- */
[data-reveal] {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
	opacity: 1;
	transform: none;
}

/* --- reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
	[data-reveal] {
		opacity: 1;
		transform: none;
	}
}
