:root {
	--bg: 230 15% 5%;
	--bg-card: 230 15% 8%;
	--bg-sec: 220 20% 14%;
	--fg: 150 60% 90%;
	--fg-muted: 220 10% 50%;
	--primary: 135 100% 50%;
	--primary-d: 135 60% 30%;
	--border: 135 40% 15%;
	--radius: 0.5rem;
	--font-sans: "Inter", system-ui, sans-serif;
	--font-mono: "JetBrains Mono", monospace;
}

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

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-mono);
	background-color: hsl(var(--bg));
	color: hsl(var(--fg));
	line-height: 1.6;
	min-height: 100svh;
	background-image:
		linear-gradient(hsl(var(--primary-d) / 0.08) 1px, transparent 1px),
		linear-gradient(90deg, hsl(var(--primary-d) / 0.08) 1px, transparent 1px);
	background-size: 40px 40px;
}

a {
	text-decoration: none;
	color: inherit;
	transition: color 0.2s;
}
ul {
	list-style: none;
}

/* ── Header ─────────────────────────────────────────────── */
header {
	position: fixed;
	top: 0;
	width: 100%;
	z-index: 100;
	background-color: hsl(var(--bg) / 0.85);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid hsl(var(--border));
}

nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 1100px;
	margin: 0 auto;
	padding: 1rem 2rem;
}

.logo {
	font-family: var(--font-mono);
	font-size: 1.1rem;
	font-weight: 700;
	color: hsl(var(--primary));
	text-shadow: 0 0 12px hsl(var(--primary) / 0.5);
	letter-spacing: 0.05em;
}

.logo::before {
	content: "> ";
}
.logo::after {
	content: "_";
	animation: blink 1s step-end infinite;
}

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

nav ul {
	display: flex;
	gap: 2rem;
}

nav a {
	font-family: var(--font-mono);
	font-size: 0.82rem;
	color: hsl(var(--fg-muted));
	letter-spacing: 0.03em;
	transition:
		color 0.2s,
		text-shadow 0.2s;
}

nav a:hover {
	color: hsl(var(--primary));
	text-shadow: 0 0 8px hsl(var(--primary) / 0.4);
}

/* ── Sections communes ───────────────────────────────────── */
section {
	padding: 6rem 2rem;
	max-width: 1000px;
	margin: 0 auto;
}

h2 {
	font-family: var(--font-mono);
	font-size: 1.4rem;
	font-weight: 600;
	color: hsl(var(--primary));
	margin-bottom: 2.5rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

h2::before {
	content: "#";
	color: hsl(var(--primary) / 0.5);
	font-weight: 400;
}

h2::after {
	content: "";
	display: block;
	flex: 0 0 60px;
	height: 2px;
	background: hsl(var(--primary));
	margin-left: 0.75rem;
	box-shadow: 0 0 8px hsl(var(--primary) / 0.5);
	border-radius: 1px;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
	height: 100vh;
	display: flex;
	align-items: center;
	padding: 0 2rem;
}

.hero-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
	max-width: 720px;
}

.prompt {
	font-family: var(--font-mono);
	font-size: 1rem;
	color: hsl(var(--primary) / 0.7);
	letter-spacing: 0.05em;
}

.hero h1 {
	font-family: var(--font-mono);
	font-size: 3.25rem;
	font-weight: 700;
	line-height: 1.15;
	color: hsl(var(--fg));
}

.highlight {
	color: hsl(var(--primary));
	text-shadow:
		0 0 10px hsl(var(--primary) / 0.6),
		0 0 30px hsl(var(--primary) / 0.3);
}

.hero-title {
	font-family: var(--font-mono);
	font-size: 0.95rem;
	color: hsl(var(--fg-muted));
	letter-spacing: 0.05em;
}

.hero-description {
	font-size: 0.95rem;
	color: hsl(var(--fg-muted));
	max-width: 540px;
}

/* ── Boutons ─────────────────────────────────────────────── */
.btn {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	padding: 0.65rem 1.75rem;
	border-radius: var(--radius);
	background-color: hsl(var(--primary));
	color: hsl(var(--bg));
	transition:
		box-shadow 0.2s,
		transform 0.2s;
	margin-top: 0.5rem;
}

.btn:hover {
	box-shadow: 0 0 24px hsl(var(--primary) / 0.5);
	transform: translateY(-2px);
}

.btn-secondary {
	background-color: transparent;
	color: hsl(var(--primary));
	border: 1px solid hsl(var(--primary));
}

.btn-secondary:hover {
	background-color: hsl(var(--primary) / 0.1);
	box-shadow: 0 0 16px hsl(var(--primary) / 0.3);
}

/* ── About ───────────────────────────────────────────────── */
.about-text {
	color: hsl(var(--fg));
	font-size: 1.05rem;
	line-height: 1.8;
	max-width: 780px;
	margin-bottom: 1.5rem;
}

.about-badges {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 1.5rem;
}

.badge {
	font-family: var(--font-mono);
	font-size: 0.82rem;
	padding: 0.5rem 1rem;
	border-radius: var(--radius);
	background: hsl(var(--bg-card));
	border: 1px solid hsl(var(--border));
	color: hsl(var(--fg));
	cursor: default;
}

.about-skills {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.about-skills li {
	font-family: var(--font-mono);
	font-size: 0.875rem;
	color: hsl(var(--fg-muted));
}

.about-skills li::before {
	content: "→ ";
	color: hsl(var(--primary-d));
	font-family: var(--font-mono);
}

/* ── Cartes expandables (commun) ─────────────────────────── */
.experience-item,
.education-item,
.project-card {
	cursor: pointer;
	overflow: hidden;
	transition:
		max-height 0.4s ease,
		border-color 0.3s,
		box-shadow 0.3s;
}

.experience-item.expanded,
.education-item.expanded,
.project-card.expanded {
	border-color: hsl(var(--primary) / 0.6) !important;
	box-shadow:
		0 0 20px hsl(var(--primary) / 0.1),
		inset 0 0 20px hsl(var(--primary) / 0.03);
}

.details {
	margin-top: 0.5rem;
	padding-top: 1rem;
	border-top: 1px solid hsl(var(--border));
	opacity: 0;
	max-height: 0;
	overflow: hidden;
	transition:
		opacity 0.3s ease,
		max-height 0.4s ease;
}

.expanded .details {
	opacity: 1;
	max-height: 1000px;
}

.expand-label {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	font-weight: 600;
	color: hsl(var(--primary));
	flex-shrink: 0;
	white-space: nowrap;
	transition: opacity 0.2s;
}

.expand-label::after {
	content: " >";
}
.expanded .expand-label::after {
	content: " ↓";
}

/* ── Expérience ──────────────────────────────────────────── */
.experience-list {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.experience-item {
	background: hsl(var(--bg-card));
	padding: 1.5rem;
	border-radius: var(--radius);
	border: 1px solid hsl(var(--border));
}

.exp-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
}

.exp-main {
	flex: 1;
}

.exp-company-line {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.35rem;
}

.company-icon {
	font-size: 0.9rem;
}

.company {
	font-family: var(--font-mono);
	font-size: 1rem;
	font-weight: 600;
	color: hsl(var(--fg));
	flex: 1;
}

.experience-item .period {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	color: hsl(var(--fg-muted));
	white-space: nowrap;
}

.role {
	font-family: var(--font-mono);
	font-size: 0.9rem;
	color: hsl(var(--primary));
	margin-bottom: 0.4rem;
}

.summary {
	font-size: 0.875rem;
	color: hsl(var(--fg-muted));
}

/* Détails expérience : tree notation ├── */
.experience-item .details ul {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.experience-item .details li {
	font-family: var(--font-mono);
	font-size: 0.8rem;
	color: hsl(var(--fg-muted));
	padding-left: 0.25rem;
}

.experience-item .details li::before {
	content: "├── ";
	color: hsl(var(--primary-d));
}

.experience-item .details li:last-child::before {
	content: "└── ";
}

/* ── Formation ───────────────────────────────────────────── */
.education-list {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.education-item {
	background: hsl(var(--bg-card));
	padding: 1.5rem 1rem 0.5rem 1rem;
	border-radius: var(--radius);
	border: 1px solid hsl(var(--border));
}

.edu-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
}

.edu-main {
	flex: 1;
}

.edu-title-line {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.school-icon {
	font-size: 0.9rem;
}

.edu-title {
	font-family: var(--font-mono);
	font-size: 0.95rem;
	font-weight: 600;
	color: hsl(var(--fg));
	flex: 1;
}

.education-item .period {
	font-family: var(--font-mono);
	font-size: 0.78rem;
	color: hsl(var(--fg-muted));
	white-space: nowrap;
}

/* Description formation */
.edu-description {
	font-family: var(--font-mono);
	font-size: 0.8rem;
	color: hsl(var(--fg-muted));
}

/* Sub-items */
.sub-items-container {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.sub-item {
	border-left: 2px solid hsl(var(--border));
	padding-left: 1rem;
}

.sub-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.35rem;
}

.sub-arrow {
	font-family: var(--font-mono);
	color: hsl(var(--primary));
	font-size: 0.85rem;
}

.sub-header h4 {
	font-family: var(--font-mono);
	font-size: 0.85rem;
	font-weight: 600;
	color: hsl(var(--fg));
	flex: 1;
}

.sub-period {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: hsl(var(--fg-muted));
}

.sub-details {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin-top: 0.4rem;
}

.sub-details li {
	font-size: 0.78rem;
	color: hsl(var(--fg-muted));
	line-height: 1.5;
}

.sub-details li::before {
	content: "├── ";
	color: hsl(var(--primary-d));
}

.sub-details li:last-child::before {
	content: "└── ";
	color: hsl(var(--primary-d));
}

/* ── Projets ─────────────────────────────────────────────── */
.project-list {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.project-card:nth-child(odd) {
	margin-right: 20rem;
}
.project-card:nth-child(even) {
	margin-left: 20rem;
}

.project-card {
	background: hsl(var(--bg-card));
	padding: 1.5rem;
	border-radius: var(--radius);
	border: 1px solid hsl(var(--border));
	cursor: pointer;
	overflow: hidden;
	transition:
		border-color 0.3s,
		box-shadow 0.3s;
}

.project-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
}

.project-main {
	flex: 1;
}

.project-title-line {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.35rem;
	flex-wrap: wrap;
}

.term-prefix {
	color: hsl(var(--primary));
	font-family: var(--font-mono);
	font-size: 1rem;
}

.project-title {
	font-family: var(--font-mono);
	font-size: 1rem;
	font-weight: 600;
	color: hsl(var(--fg));
}

.project-card .details ul {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.project-card .details li {
	font-family: var(--font-mono);
	font-size: 0.8rem;
	color: hsl(var(--fg-muted));
}

.project-card .details li::before {
	content: "├── ";
	color: hsl(var(--primary-d));
}

.project-card .details li:last-child::before {
	content: "└── ";
}

.project-link-row {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid hsl(var(--border));
}

.project-link {
	font-size: 0.82rem;
	color: hsl(var(--primary));
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: text-shadow 0.2s;
}

.project-link:hover {
	text-shadow: 0 0 8px hsl(var(--primary) / 0.5);
}

.project-link-wip {
	font-size: 0.82rem;
	color: hsl(var(--fg-muted));
}

/* ── Page WIP (Projets Annuels) ─────────────────────────── */
.wip-container {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding-top: 5rem;
	padding-bottom: 4rem;
	text-align: center;
	gap: 1.25rem;
}

.wip-title {
	font-size: 2rem;
	color: hsl(var(--primary));
}

.wip-text {
	color: hsl(var(--fg-muted));
	font-size: 1rem;
}

/* Badges difficulté */
.difficulty {
	font-family: var(--font-mono);
	font-size: 0.68rem;
	padding: 0.2rem 0.55rem;
	border-radius: 9999px;
	font-weight: 600;
	letter-spacing: 0.04em;
	white-space: nowrap;
	flex-shrink: 0;
}

.difficulty.simple,
.difficulty.débutant {
	background: hsl(135 80% 40% / 0.12);
	color: hsl(135 80% 65%);
	border: 1px solid hsl(135 80% 40% / 0.3);
}

.difficulty.intermédiaire {
	background: hsl(45 100% 50% / 0.12);
	color: hsl(45 100% 65%);
	border: 1px solid hsl(45 100% 50% / 0.3);
}

.difficulty.avancé {
	background: hsl(0 80% 60% / 0.12);
	color: hsl(0 80% 70%);
	border: 1px solid hsl(0 80% 60% / 0.3);
}

/* ── Recommandations ─────────────────────────────────────── */
.recommendations-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.25rem;
}

.recommendation-card {
	background: hsl(var(--bg-card));
	padding: 1.5rem;
	border-radius: var(--radius);
	border: 1px solid hsl(var(--border));
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	transition:
		border-color 0.3s,
		box-shadow 0.3s;
}

.recommendation-card::before {
	content: "";
	font-family: var(--font-mono);
	font-size: 3rem;
	line-height: 1;
	color: hsl(var(--primary) / 0.3);
	display: block;
	margin-bottom: -0.75rem;
}

.recommendation-card:hover {
	border-color: hsl(var(--primary) / 0.4);
	box-shadow: 0 0 20px hsl(var(--primary) / 0.08);
}

.rec-text {
	font-size: 0.9rem;
	color: hsl(var(--fg));
	line-height: 1.75;
	flex: 1;
}

.rec-footer {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	border-top: 1px solid hsl(var(--border));
	padding-top: 1rem;
}

.rec-name {
	font-family: var(--font-mono);
	font-size: 0.85rem;
	font-weight: 600;
	color: hsl(var(--primary));
}

.rec-role {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: hsl(var(--fg-muted));
}

/* ── Contact ─────────────────────────────────────────────── */
#contact p {
	color: hsl(var(--fg-muted));
	margin-bottom: 1.5rem;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
	text-align: center;
	padding: 2rem;
	border-top: 1px solid hsl(var(--border));
	color: hsl(var(--fg-muted));
	font-family: var(--font-mono);
	font-size: 0.78rem;
}

/* ── Burger ──────────────────────────────────────────────── */
.burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.25rem;
}

.burger span {
	display: block;
	width: 22px;
	height: 2px;
	background: hsl(var(--primary));
	border-radius: 2px;
	transition:
		transform 0.3s,
		opacity 0.3s;
}

.burger.open span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.burger.open span:nth-child(2) {
	opacity: 0;
}
.burger.open span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1000px) {
	.hero h1 {
		font-size: 2rem;
	}
	h2 {
		font-size: 1.2rem;
	}

	.burger {
		display: flex;
	}

	#nav-links {
		display: none;
		flex-direction: column;
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		background: hsl(var(--bg) / 0.97);
		backdrop-filter: blur(12px);
		border-bottom: 1px solid hsl(var(--border));
		padding: 1rem 2rem;
		gap: 1rem;
	}

	#nav-links.open {
		display: flex;
	}

	.recommendations-grid {
		grid-template-columns: 1fr;
	}
	.project-card:nth-child(odd),
	.project-card:nth-child(even) {
		margin-left: 0;
		margin-right: 0;
	}
}
