﻿/* Ändar hur storleken räknas */
* {
	box-sizing: border-box;
}

/* Färg variabler */
:root {
	--page-bg: #f6f8ff;
	--page-fg: #111;
	--page-overlay: radial-gradient(circle at 16% 18%, rgba(255, 138, 198, 0.22) 0%, transparent 42%), radial-gradient(circle at 82% 14%, rgba(117, 169, 255, 0.22) 0%, transparent 45%), radial-gradient(circle at 78% 84%, rgba(84, 223, 198, 0.2) 0%, transparent 46%), linear-gradient(135deg, #fff8f6 0%, #f6fbff 46%, #f4fff7 100%);
	--surface: rgba(255, 255, 255, 0.95);
	--surface-soft: rgba(248, 248, 248, 0.95);
	--surface-elevated: rgba(255, 255, 255, 0.85);
	--surface-border: rgba(200, 200, 220, 0.3);
	--surface-border-soft: #e4e4e4;
	--surface-shadow: 0 18px 40px rgba(17, 17, 17, 0.08);
	--text-muted: #4f4f4f;
	--text-strong: #222;
	--code-bg: #131313;
	--code-fg: #f3f3f3;
	--button-bg: #111;
	--button-fg: #fff;
	--button-hover-bg: #333;
	--current-bg: rgba(100, 200, 255, 0.15);
	--current-fg: #0066cc;
	--link-hover-bg: rgba(255, 255, 255, 0.95);
	--link-hover-shadow: 0 0 20px rgba(150, 100, 255, 0.1);
	--glass-border: rgba(255, 255, 255, 0.2);
	--glass-shadow: rgba(17, 17, 17, 0.08);
}

body {
	margin: 0;
	font-family: 'Inter', 'Ubuntu', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: var(--page-overlay);
	background: var(--page-overlay);
	background-attachment: fixed;
	background-color: var(--page-bg);
	color: var(--page-fg);
	position: relative;
	min-height: 100vh;
}

body::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	pointer-events: none;
	display: none;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
	body {
		--page-bg: #0d1324;
		--page-fg: #e0e0e0;
		--page-overlay: radial-gradient(circle at 14% 24%, rgba(255, 88, 176, 0.34) 0%, transparent 38%), radial-gradient(circle at 86% 20%, rgba(87, 186, 255, 0.34) 0%, transparent 40%), radial-gradient(circle at 74% 82%, rgba(71, 255, 206, 0.28) 0%, transparent 42%), linear-gradient(145deg, #0a1228 0%, #12142b 46%, #0e231f 100%);
		--surface: rgba(30, 30, 40, 0.7);
		--surface-soft: rgba(30, 30, 40, 0.55);
		--surface-elevated: rgba(30, 30, 40, 0.8);
		--surface-border: rgba(100, 200, 255, 0.1);
		--surface-border-soft: rgba(100, 200, 255, 0.12);
		--surface-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
		--text-muted: #c0c0c0;
		--text-strong: #e0e0e0;
		--button-bg: rgba(100, 200, 255, 0.3);
		--button-fg: #64c8ff;
		--button-hover-bg: rgba(100, 200, 255, 0.4);
		--current-bg: rgba(100, 200, 255, 0.25);
		--current-fg: #64c8ff;
		--link-hover-bg: rgba(100, 200, 255, 0.15);
		--link-hover-shadow: 0 0 20px rgba(100, 200, 255, 0.1);
		--glass-border: rgba(100, 200, 255, 0.2);
		--glass-shadow: rgba(0, 0, 0, 0.3);
	}
}

a {
	color: inherit;
}

main {
	padding: 0 20px 40px;
}

.page-header {
	padding: 28px 20px;
}

/* Nav bar */
.primary-navigation {
	display: grid;
	grid-template-columns: minmax(150px, 1.4fr) repeat(4, minmax(110px, 1fr));
	gap: 10px;
	max-width: 980px;
	margin: 0 auto;
	background: transparent;
}

.brand-link,
.navigation-link {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 62px;
	padding: 12px 18px;
	background: var(--surface-elevated);
	border-radius: 14px;
	text-decoration: none;
	color: inherit;
	font-size: 1rem;
	line-height: 1;
	transition: all 0.3s ease;
	backdrop-filter: blur(10px);
	border: 1px solid var(--glass-border);
}

.brand-link {
	font-weight: 700;
	justify-content: flex-start;
	padding-left: 20px;
}

.navigation-link:hover {
	background: var(--link-hover-bg);
	box-shadow: var(--link-hover-shadow);
}

.navigation-link.is-current {
	background: var(--current-bg);
	font-weight: 600;
	box-shadow: 0 0 20px rgba(100, 200, 255, 0.12);
	color: var(--current-fg);
}

/* Huvud delen */
.content-panel {
	max-width: 980px;
	margin: 24px auto 0;
	padding: 28px;
	background: var(--surface);
	border-radius: 22px;
	box-shadow: var(--surface-shadow);
	border: 1px solid var(--surface-border);
}

.hero-panel h1,
.section-header h2 {
	margin: 8px 0 0;
	font-size: clamp(1.8rem, 4vw, 3rem);
	line-height: 1.08;
}

.hero-panel p,
.section-header p,
.topic-list,
.practice-list,
.lesson-note {
	line-height: 1.65;
	color: var(--text-muted);
}

.section-kicker {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.78rem;
	font-weight: 700;
}

.section-header {
	margin-bottom: 16px;
}

.topic-list,
.practice-list {
	margin: 0;
	padding-left: 20px;
	display: grid;
	gap: 10px;
}

pre {
	overflow-x: auto;
	padding: 16px;
	border-radius: 14px;
	background: var(--code-bg);
	color: var(--code-fg);
	font-size: 0.95rem;
	line-height: 1.55;
}

code {
	font-family: "Consolas", "Courier New", monospace;
}

.lesson-note {
	margin: 12px 0 0;
}

/* Gå vidare knappar */
.primary-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 16px;
	padding: 12px 18px;
	border-radius: 999px;
	background: var(--button-bg);
	color: var(--button-fg);
	text-decoration: none;
	border: 0;
	cursor: pointer;
	font: inherit;
	transition: all 0.3s ease;
}

.primary-link:hover {
	background: var(--button-hover-bg);
	box-shadow: 0 0 20px rgba(100, 200, 255, 0.15);
}

.button-group {
	display: flex;
	gap: 22px;
	margin-left: 0;
	margin-top: 12px;
	flex-wrap: wrap;
}

/* Mindre platformar */
@media (max-width: 600px) {
	.button-group {
		display: grid;
		grid-template-columns: 1fr;
	}
}

@media (max-width: 760px) {
	main {
		padding: 0 16px 32px;
	}

	.primary-navigation {
		grid-template-columns: repeat(2, minmax(140px, 1fr));
	}

	.brand-link {
		grid-column: 1 / -1;
		justify-content: center;
		padding-left: 18px;
	}

	.content-panel {
		margin-left: 0;
		max-width: none;
	}
}