:root {
	--bg: #07131a;
	--bg-soft: #0e2029;
	--surface: rgba(255, 255, 255, 0.07);
	--surface-strong: rgba(255, 255, 255, 0.14);
	--text: #f2f4ea;
	--muted: #c9d4d0;
	--accent: #ff6b35;
	--accent-strong: #ff8f5d;
	--accent-glow: rgba(255, 107, 53, 0.3);
	--accent-2: #f7c548;
	--max: 1120px;
	--radius: 22px;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	min-height: 100%;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: "Space Grotesk", sans-serif;
	color: var(--text);
	background:
		radial-gradient(circle at 15% 20%, rgba(247, 197, 72, 0.15), transparent 30%),
		radial-gradient(circle at 85% 0%, rgba(255, 107, 53, 0.2), transparent 36%),
		linear-gradient(140deg, var(--bg), var(--bg-soft) 45%, #0c1513);
	line-height: 1.55;
	overflow-x: hidden;
}

body.project-page {
	background:
		radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 30%),
		radial-gradient(circle at 88% 6%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 35%),
		linear-gradient(140deg, var(--bg), var(--bg-soft) 46%, #0b1518);
}

body.theme-havanna {
	--bg: #17110d;
	--bg-soft: #2b1d13;
	--surface: rgba(255, 245, 233, 0.08);
	--text: #fff4e9;
	--muted: #e5d9cf;
	--accent: #ff6b2c;
	--accent-strong: #ff9b3c;
	--accent-glow: rgba(255, 107, 44, 0.34);
	--accent-2: #ffd166;
}

body.theme-primecuts {
	--bg: #1c1c1c;
	--bg-soft: #2a2a2a;
	--surface: rgba(245, 245, 243, 0.06);
	--text: #f5f5f3;
	--muted: #d0d0d0;
	--accent: #82644b;
	--accent-strong: #9d7b5f;
	--accent-glow: rgba(130, 100, 75, 0.38);
	--accent-2: #b08a68;
}

body.theme-vestkyst {
	--bg: #0f2330;
	--bg-soft: #163d4f;
	--surface: rgba(224, 242, 255, 0.08);
	--text: #eef8ff;
	--muted: #d2e4ef;
	--accent: #3db5d8;
	--accent-strong: #67c8e4;
	--accent-glow: rgba(61, 181, 216, 0.34);
	--accent-2: #ffd08c;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -100px;
	padding: 0.7rem 1rem;
	border-radius: 10px;
	background: #ffffff;
	color: #111111;
	text-decoration: none;
	font-weight: 700;
	z-index: 100;
}

.skip-link:focus-visible {
	top: 1rem;
}

.noise {
	display: none;
}

.cursor-glow {
	display: none;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 15;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem clamp(1rem, 4vw, 2.5rem);
	background: rgba(7, 19, 26, 0.9);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
	font-family: "Syne", sans-serif;
	font-weight: 800;
	text-decoration: none;
	color: var(--text);
	letter-spacing: 0.03em;
}

nav {
	display: flex;
	gap: 1rem;
}

nav a {
	color: var(--muted);
	text-decoration: none;
	font-size: 0.95rem;
	transition: color 0.2s ease;
}

nav a:hover {
	color: var(--text);
}

nav a.active {
	color: var(--text);
	text-decoration: underline;
	text-underline-offset: 0.3rem;
}

a:focus-visible,
button:focus-visible {
	outline: 3px solid var(--accent-2);
	outline-offset: 3px;
	border-radius: 8px;
}

main {
	width: min(var(--max), 100% - 2.2rem);
	margin: 0 auto;
}

.section {
	margin: clamp(3.5rem, 8vw, 7rem) 0;
	content-visibility: auto;
	contain-intrinsic-size: 1px 760px;
}

.eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-size: 0.72rem;
	color: var(--accent-2);
	margin-bottom: 1rem;
}

.hero h1,
h2,
h3 {
	margin: 0;
	line-height: 1.08;
	font-family: "Syne", sans-serif;
}

.hero h1 {
	font-size: clamp(2.1rem, 6.3vw, 5.4rem);
	max-width: 16ch;
}

.hero h1 span {
	color: var(--accent);
	text-shadow: 0 8px 24px var(--accent-glow);
}

.page-hero {
	margin-top: clamp(2rem, 4vw, 3rem);
}

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin-bottom: 1rem;
	color: var(--text);
	text-decoration: none;
	font-weight: 700;
	letter-spacing: 0.01em;
	transition: transform 0.2s ease, color 0.2s ease;
}

.back-link:hover {
	transform: translateX(-3px);
	color: var(--accent-2);
}

.page-hero h1 {
	font-size: clamp(2rem, 5vw, 4.2rem);
	max-width: 18ch;
}

.intro {
	max-width: 64ch;
	color: var(--muted);
	margin: 1.3rem 0 0;
}

.hero-actions,
.contact-links {
	margin-top: 1.8rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.9rem;
}

.btn {
	display: inline-block;
	padding: 0.82rem 1.2rem;
	border-radius: 999px;
	text-decoration: none;
	border: 1px solid transparent;
	font-weight: 600;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
	transform: translateY(-2px);
}

.btn:active {
	transform: translateY(0) scale(0.98);
}

.btn-primary {
	background: linear-gradient(90deg, var(--accent), var(--accent-strong));
	color: #1b1008;
	box-shadow: none;
}

.btn-ghost {
	border-color: rgba(255, 255, 255, 0.24);
	color: var(--text);
	background: rgba(255, 255, 255, 0.03);
}

.stats {
	margin: 2.3rem 0 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 0.75rem;
}

.stats li {
	background: var(--surface);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	padding: 1rem;
}

.stat-number {
	display: block;
	font-family: "Syne", sans-serif;
	font-size: 2rem;
}

.stat-label {
	color: var(--muted);
	font-size: 0.9rem;
}

.section-head {
	margin-bottom: 1.5rem;
}

h2 {
	font-size: clamp(1.7rem, 4.4vw, 3.3rem);
	max-width: 19ch;
}

.skills-grid,
.cases-grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 1rem;
}

.skill-card {
	grid-column: span 6;
	background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius);
	padding: 1.2rem;
}

.profile-photo-card {
	padding: 0.75rem;
	overflow: hidden;
}

.profile-photo {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: calc(var(--radius) - 8px);
	display: block;
}

.profile-photo-note {
	margin: 0.75rem 0 0;
	font-size: 0.88rem;
	color: var(--muted);
}

.hover-card {
	position: relative;
}

.case-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 430px;
	gap: 1rem;
	align-items: start;
}

.case-layout .skills-grid {
	grid-template-columns: 1fr;
	gap: 1rem;
}

.case-layout .skills-grid .skill-card {
	grid-column: 1;
}

.mobile-preview-panel {
	grid-column: 2;
	grid-row: 1;
	position: sticky;
	top: 6.5rem;
	align-self: start;
	padding: 1rem 1rem 1.2rem;
}

.mobile-preview-note {
	margin: 0.1rem 0 0;
	color: var(--muted);
	font-size: 0.9rem;
}

.phone-shell {
	margin-top: 0.9rem;
	max-width: 390px;
	width: 100%;
	margin-inline: auto;
	padding: 16px 12px;
	border-radius: 42px;
	background: linear-gradient(160deg, #20262c, #0c1419);
	border: 1px solid rgba(255, 255, 255, 0.16);
	box-shadow: 0 16px 28px rgba(0, 0, 0, 0.34);
}

.phone-notch {
	width: 44%;
	height: 16px;
	margin: 0 auto 10px;
	border-radius: 0 0 12px 12px;
	background: #060a0d;
	border: 1px solid rgba(255, 255, 255, 0.09);
}

.phone-iframe {
	display: block;
	width: 100%;
	aspect-ratio: 390 / 844;
	height: auto;
	border: 0;
	border-radius: 30px;
	background: #ffffff;
}

.preview-load-wrap {
	margin-top: 0.75rem;
	text-align: center;
}

.skill-card p,
.case p,
.cta p {
	color: var(--muted);
}

.meter {
	height: 10px;
	margin-top: 1rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	overflow: hidden;
}

.meter span {
	display: block;
	width: var(--value);
	height: 100%;
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
	transform-origin: left center;
	animation: grow 1.2s ease both;
}

.case {
	grid-column: span 4;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(5, 13, 17, 0.8);
	transform-style: preserve-3d;
	transition: transform 0.2s ease, border-color 0.2s ease;
	position: relative;
	scroll-margin-top: 8.4rem;
}

.case:hover {
	border-color: color-mix(in srgb, var(--accent-2) 46%, transparent);
}

.case-full {
	grid-column: span 12;
}

.case strong {
	color: #ffe7dd;
}

.media {
	aspect-ratio: 16 / 10;
}

.media img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.media-vestkyst {
	aspect-ratio: 2.2 / 1;
	background: rgba(6, 15, 20, 0.35);
}

.media-vestkyst img {
	object-fit: cover;
	object-position: center top;
}

.placeholder-a {
	background: linear-gradient(135deg, #2ec4b6, #047f73);
}

.placeholder-b {
	background: linear-gradient(135deg, #ff6b35, #ad3a15);
}

.placeholder-c {
	background: linear-gradient(135deg, #f7c548, #d08700);
}

.case-body {
	padding: 1rem 1rem 1.2rem;
}

.case-body p {
	margin: 0.65rem 0;
}

.case-body span {
	font-size: 0.82rem;
	color: #ffe7dd;
	letter-spacing: 0.04em;
}

.content-grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 1rem;
}

.content-card {
	grid-column: span 4;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(5, 13, 17, 0.8);
	position: relative;
	transition: border-color 0.25s ease, box-shadow 0.3s ease;
}

.content-card:hover,
.content-card:focus-within {
	border-color: color-mix(in srgb, var(--accent-2) 46%, transparent);
	box-shadow: 0 18px 34px rgba(0, 0, 0, 0.26);
}

.static-post-card {
	transform-origin: center center;
	transition: transform 0.28s ease, border-color 0.25s ease, box-shadow 0.3s ease;
}

.static-post-card:hover,
.static-post-card:focus-within {
	transform: scale(1.02);
	z-index: 3;
}

.content-media {
	aspect-ratio: 4 / 5;
	width: 100%;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.content-media img,
.content-media video {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.static-post-card .content-media {
	background: rgba(7, 19, 26, 0.92);
}

.static-post-card .content-media img {
	object-fit: contain;
	object-position: center;
}

.content-body {
	padding: 1rem 1rem 1.2rem;
}

.content-body h3 {
	font-size: 1.15rem;
	margin-bottom: 0.45rem;
}

.content-body p {
	margin: 0;
	color: var(--muted);
}

.content-body span {
	display: inline-block;
	margin-top: 0.7rem;
	font-size: 0.82rem;
	letter-spacing: 0.04em;
	color: #ffe7dd;
}

.content-placeholder-a {
	background: linear-gradient(145deg, #264653, #2a9d8f);
}

.content-placeholder-b {
	background: linear-gradient(145deg, #5e3b2f, #bc6c25);
}

.content-placeholder-c {
	background: linear-gradient(145deg, #2b2d42, #8d99ae);
}

.content-video-shell {
	aspect-ratio: 9 / 16;
	display: grid;
	place-items: center;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
}

.content-video-shell span {
	padding: 0.42rem 0.7rem;
	border-radius: 999px;
	font-size: 0.78rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text);
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.18);
}

.primecuts-content-section {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	padding-top: 2rem;
	opacity: 1;
	transform: none;
}

.primecuts-static-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	gap: 1rem;
	align-items: start;
}

.primecuts-carousel-card {
	grid-column: auto;
}

.primecuts-static-side {
	display: grid;
	gap: 1rem;
}

.primecuts-carousel {
	position: relative;
	padding: 0.8rem;
	background: rgba(255, 255, 255, 0.03);
}

.primecuts-carousel-window {
	overflow: hidden;
	border-radius: 16px;
}

.primecuts-carousel-track {
	display: flex;
	transition: transform 0.45s ease;
	will-change: transform;
}

.primecuts-slide {
	min-width: 100%;
	aspect-ratio: 4 / 5;
	background: rgba(7, 19, 26, 0.92);
}

.primecuts-slide img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
}

.carousel-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 38px;
	height: 38px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	background: rgba(7, 19, 26, 0.72);
	color: var(--text);
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}

.carousel-btn:hover {
	border-color: color-mix(in srgb, var(--accent-2) 54%, transparent);
	background: rgba(7, 19, 26, 0.9);
}

.carousel-btn-prev {
	left: 1rem;
}

.carousel-btn-next {
	right: 1rem;
}

.primecuts-video-head {
	margin-top: 2rem;
}

.primecuts-video-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 360px));
	gap: 1rem;
	justify-content: center;
	justify-items: center;
}

.primecuts-video-grid .content-card {
	grid-column: auto;
	width: min(100%, 360px);
}

.case-actions {
	margin-top: 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
}

.hover-card::before {
	display: none;
}

.hover-card:hover::before {
	opacity: 1;
}

.hover-card > * {
	position: relative;
	z-index: 1;
}

.cta {
	text-align: center;
	padding: clamp(1.2rem, 4vw, 3rem);
	border-radius: 26px;
	background:
		linear-gradient(160deg, rgba(255, 107, 53, 0.25), rgba(247, 197, 72, 0.14)),
		rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.14);
}

.cta h2 {
	margin-inline: auto;
}

.cta p {
	max-width: 68ch;
	margin-inline: auto;
}

.cta .contact-links,
.cta .hero-actions {
	justify-content: center;
}

.contact-hero {
	padding: clamp(1rem, 2vw, 1.5rem) 0;
}

.contact-signals {
	margin: 1.6rem 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.contact-signals li {
	padding: 0.46rem 0.8rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.04);
	font-size: 0.85rem;
	color: var(--text);
}

.contact-layout {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 1rem;
}

.contact-panel {
	grid-column: span 6;
	padding: 1.2rem;
	border-radius: var(--radius);
	background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-panel-primary {
	background:
		linear-gradient(155deg, rgba(255, 107, 53, 0.2), rgba(247, 197, 72, 0.09)),
		rgba(255, 255, 255, 0.03);
}

.contact-list {
	margin: 0.9rem 0 0;
	padding-left: 1.1rem;
	color: var(--muted);
	display: grid;
	gap: 0.48rem;
}

.contact-map-section {
	margin-top: 2rem;
}

.contact-map-grid {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
	gap: 1rem;
	align-items: stretch;
}

.contact-map-frame {
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.1);
	min-height: 360px;
	background: rgba(255, 255, 255, 0.03);
}

.contact-map-frame iframe {
	width: 100%;
	height: 100%;
	min-height: 360px;
	border: 0;
	display: block;
}

.site-footer {
	text-align: center;
	color: var(--muted);
	font-size: 0.9rem;
	padding: 2rem 1rem 3rem;
}

.site-footer-rich {
	text-align: left;
	padding: 2.2rem 1rem 2.6rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}

.footer-inner {
	width: min(var(--max), 100% - 0.4rem);
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1.2fr 1fr 1fr 1fr;
	gap: 1.1rem;
}

.footer-col h3 {
	margin: 0 0 0.55rem;
	font-family: "Syne", sans-serif;
	font-size: 1.02rem;
}

.footer-col p {
	margin: 0;
	color: var(--muted);
}

.footer-col ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.42rem;
}

.footer-col a {
	color: var(--muted);
	text-decoration: none;
}

.footer-col a:hover {
	color: var(--text);
}

.footer-meta {
	width: min(var(--max), 100% - 0.4rem);
	margin: 1.4rem auto 0;
	padding-top: 1rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	color: var(--muted);
	text-align: center;
}

[aria-disabled="true"] {
	opacity: 0.65;
	pointer-events: none;
}

.reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@keyframes grow {
	from {
		transform: scaleX(0);
	}
	to {
		transform: scaleX(1);
	}
}

@media (max-width: 930px) {
	.skill-card {
		grid-column: span 12;
	}

	.contact-panel {
		grid-column: span 12;
	}

	.contact-map-grid {
		grid-template-columns: 1fr;
	}

	.primecuts-static-layout {
		grid-template-columns: 1fr;
	}

	.primecuts-video-grid {
		grid-template-columns: repeat(2, minmax(0, 320px));
		justify-content: center;
	}

	.content-card {
		grid-column: span 6;
	}

	.case {
		grid-column: span 6;
	}

	.case-layout {
		grid-template-columns: minmax(0, 1fr) 360px;
	}

	.phone-shell {
		max-width: 320px;
	}

	.footer-inner {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 820px) {
	.case-layout {
		grid-template-columns: 1fr;
	}

	.mobile-preview-panel {
		grid-column: 1;
		grid-row: auto;
		position: static;
		max-width: 420px;
	}

	.phone-iframe {
		max-height: 680px;
	}
}

@media (max-width: 700px) {
	.site-header {
		flex-direction: column;
		gap: 0.6rem;
	}

	nav {
		flex-wrap: wrap;
		justify-content: center;
	}

	.case {
		grid-column: span 12;
	}

	.content-card {
		grid-column: span 12;
		max-height: none;
	}

	.contact-signals {
		justify-content: center;
	}

	.contact-map-frame,
	.contact-map-frame iframe {
		min-height: 300px;
	}

	.primecuts-video-grid {
		grid-template-columns: 1fr;
	}

	.carousel-btn {
		width: 34px;
		height: 34px;
	}

	.content-body {
		max-height: none;
	}

	.content-body p {
		opacity: 1;
		transform: none;
	}

	.cursor-glow {
		display: none;
	}

	.noise {
		display: none;
	}

	.phone-iframe {
		max-height: 560px;
	}

	.footer-inner {
		grid-template-columns: 1fr;
	}

	.site-footer-rich {
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}

	.reveal {
		opacity: 1;
		transform: none;
	}
}
