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

:root {
	--bg: #07080b;
	--bg-alt: #0c0e14;
	--panel: #12141c;
	--panel-border: #22252f;
	--text: #e8eaf0;
	--muted: #8890a4;
	--accent: #7dd3fc;
	--accent2: #a78bfa;
	--prompt: #4ade80;
	--max-width: 1100px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: "Inter", -apple-system, sans-serif;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

/* subtle scanline / noise texture over the whole page */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 9999;
	background: repeating-linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.015) 0px,
		rgba(255, 255, 255, 0.015) 1px,
		transparent 1px,
		transparent 3px
	);
	mix-blend-mode: overlay;
}

h1, h2, h3 {
	font-family: "Space Grotesk", "Inter", sans-serif;
	font-weight: 600;
	line-height: 1.15;
	margin: 0;
}

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

::selection {
	background: var(--accent2);
	color: #08090c;
}

.container {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 2rem;
}

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

.section-label {
	font-family: "JetBrains Mono", monospace;
	color: var(--prompt);
	font-size: 0.85rem;
	letter-spacing: 0.05em;
	margin-bottom: 0.75rem;
	display: block;
}

.section-label::before {
	content: "$ ";
	opacity: 0.7;
}

section {
	padding: 7rem 0;
	position: relative;
}

section h2 {
	font-size: clamp(1.8rem, 3vw, 2.4rem);
	margin-bottom: 1.5rem;
}

section > .container > p.lede {
	color: var(--muted);
	max-width: 640px;
	margin-bottom: 3rem;
	font-size: 1.05rem;
}

/* Nav */

#nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 2rem;
	backdrop-filter: blur(10px);
	background: rgba(7, 8, 11, 0.6);
	border-bottom: 1px solid transparent;
	transition: border-color 0.3s ease, background 0.3s ease;
}

#nav.scrolled {
	border-bottom-color: var(--panel-border);
}

#nav .logo {
	font-family: "JetBrains Mono", monospace;
	font-size: 0.95rem;
	color: var(--accent);
}

#nav ul {
	list-style: none;
	display: flex;
	gap: 2rem;
	margin: 0;
	padding: 0;
}

#nav a:not(.logo) {
	font-size: 0.9rem;
	color: var(--muted);
	transition: color 0.2s ease;
}

#nav a:not(.logo):hover,
#nav a:not(.logo):focus-visible {
	color: var(--text);
}

/* Hero */

#hero {
	min-height: 100vh;
	display: flex;
	align-items: center;
	position: relative;
	overflow: hidden;
	padding-top: 5rem;
}

#hero-canvas {
	position: absolute;
	top: 50%;
	right: 8%;
	transform: translateY(-50%);
	width: min(46vw, 620px);
	height: min(46vw, 620px);
	opacity: 0.55;
	pointer-events: none;
}

#hero .container {
	position: relative;
	z-index: 2;
}

#hero .prompt-line {
	font-family: "JetBrains Mono", monospace;
	color: var(--prompt);
	font-size: 0.95rem;
	margin-bottom: 1.25rem;
	opacity: 0.9;
}

#hero h1 {
	font-size: clamp(2.6rem, 6vw, 4.5rem);
	background: linear-gradient(120deg, var(--text) 40%, var(--accent) 75%, var(--accent2) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	margin-bottom: 0.75rem;
}

#hero .role {
	font-size: clamp(1.1rem, 2vw, 1.35rem);
	color: var(--muted);
	max-width: 560px;
	margin-bottom: 2.5rem;
}

.scroll-cue {
	position: absolute;
	bottom: 2.5rem;
	left: 2rem;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--muted);
	font-family: "JetBrains Mono", monospace;
	font-size: 0.8rem;
}

.scroll-cue .line {
	width: 28px;
	height: 1px;
	background: var(--muted);
	position: relative;
	overflow: hidden;
}

.scroll-cue .line::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--accent);
	animation: scrollpulse 1.8s ease-in-out infinite;
}

@keyframes scrollpulse {
	0% { transform: translateX(-100%); }
	50% { transform: translateX(0); }
	100% { transform: translateX(100%); }
}

/* About */

#om {
	background: linear-gradient(to bottom, transparent, var(--bg-alt) 15%, var(--bg-alt) 85%, transparent);
}

.about-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 4rem;
	align-items: start;
}

.about-grid p {
	margin-bottom: 1.2rem;
	color: #cfd2dc;
}

.toolbelt {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	align-content: flex-start;
}

.tag {
	font-family: "JetBrains Mono", monospace;
	font-size: 0.8rem;
	padding: 0.4rem 0.75rem;
	border: 1px solid var(--panel-border);
	border-radius: 999px;
	color: var(--muted);
	background: var(--panel);
}

/* Projects */

.projects-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
}

.project-card {
	background: var(--panel);
	border: 1px solid var(--panel-border);
	border-radius: 12px;
	padding: 1.75rem;
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
	position: relative;
	overflow: hidden;
}

.project-card:hover {
	transform: translateY(-4px);
	border-color: var(--accent2);
	box-shadow: 0 12px 40px -12px rgba(167, 139, 250, 0.35);
}

.project-card .icon {
	width: 36px;
	height: 36px;
	margin-bottom: 1.25rem;
	color: var(--accent);
}

.project-card .icon svg {
	width: 100%;
	height: 100%;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.4;
}

.project-card h3 {
	font-size: 1.15rem;
	margin-bottom: 0.6rem;
}

.project-card p {
	color: var(--muted);
	font-size: 0.92rem;
	margin-bottom: 1.25rem;
}

.tag-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.tag-row span {
	font-family: "JetBrains Mono", monospace;
	font-size: 0.72rem;
	color: var(--accent2);
	background: rgba(167, 139, 250, 0.1);
	padding: 0.2rem 0.55rem;
	border-radius: 5px;
}

/* Experience */

#erfarenhet {
	background: var(--bg-alt);
}

.timeline {
	position: relative;
	padding-left: 2.5rem;
	border-left: 1px solid var(--panel-border);
}

.timeline-item {
	position: relative;
	padding-bottom: 3rem;
}

.timeline-item:last-child {
	padding-bottom: 0;
}

.timeline-item::before {
	content: "";
	position: absolute;
	left: -2.56rem;
	top: 0.3rem;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.15);
}

.timeline-item .badge {
	display: inline-block;
	font-family: "JetBrains Mono", monospace;
	font-size: 0.72rem;
	color: var(--prompt);
	border: 1px solid rgba(74, 222, 128, 0.3);
	padding: 0.15rem 0.55rem;
	border-radius: 5px;
	margin-bottom: 0.6rem;
}

.timeline-item h3 {
	font-size: 1.15rem;
	margin-bottom: 0.2rem;
}

.timeline-item .org {
	color: var(--accent2);
	font-size: 0.9rem;
	margin-bottom: 0.6rem;
	display: block;
}

.timeline-item p {
	color: var(--muted);
	font-size: 0.92rem;
	max-width: 560px;
}

/* Contact */

#kontakt {
	text-align: center;
	padding-bottom: 9rem;
}

#kontakt h2 {
	margin-bottom: 1rem;
}

#kontakt .lede {
	margin-left: auto;
	margin-right: auto;
}

.contact-links {
	display: flex;
	gap: 1.5rem;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 2.5rem;
}

.contact-links a {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.85rem 1.5rem;
	border: 1px solid var(--panel-border);
	border-radius: 10px;
	background: var(--panel);
	font-family: "JetBrains Mono", monospace;
	font-size: 0.9rem;
	transition: border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.contact-links a:hover,
.contact-links a:focus-visible {
	border-color: var(--accent);
	color: var(--accent);
	transform: translateY(-2px);
}

.contact-links a i {
	font-size: 1.1rem;
}

/* Footer */

footer {
	border-top: 1px solid var(--panel-border);
	padding: 2rem;
	text-align: center;
	color: var(--muted);
	font-family: "JetBrains Mono", monospace;
	font-size: 0.8rem;
}

/* Responsive */

@media (max-width: 900px) {
	.about-grid {
		grid-template-columns: 1fr;
		gap: 2.5rem;
	}

	#hero-canvas {
		opacity: 0.25;
		right: -10%;
	}
}

@media (max-width: 640px) {
	#nav ul {
		gap: 1.1rem;
	}

	#nav ul li:nth-child(1) span,
	#nav .logo {
		font-size: 0.85rem;
	}

	section {
		padding: 4.5rem 0;
	}

	.container {
		padding: 0 1.25rem;
	}
}

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

	.scroll-cue .line::after {
		animation: none;
	}
}
