/* ------------------------------------------
   LOADER
------------------------------------------- */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: none;
    visibility: visible;
    transition: visibility 0s linear 1s;
}

.loader {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

.loader-section {
    position: fixed;
    left: 0;
    width: 100%;
    height: 51%;
    background: #0f0f0f;
    z-index: 99998;
    transform: translateY(0);
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1.000);
    transition-delay: 0.05s;
    will-change: transform;
}

.loader-section.left {
    top: 0;
}

.loader-section.right {
    bottom: 0;
}

.loader-bar {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
    transform: translate(-50%, -50%);
    z-index: 99999;
    transition: width 0.5s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}

/* Animation states */
.loading .loader-bar {
    width: 100%;
}

/* Loaded styles */
.loaded .loader-section.left {
    transform: translateY(-100%);
}

.loaded .loader-section.right {
    transform: translateY(100%);
}

.loaded .loader-bar {
    opacity: 0;
    transition: opacity 0.4s;
}

.loaded .loader-wrapper {
    visibility: hidden;
}

/* ------------------------------------------
   GLOBAL RESET & BASE
------------------------------------------- */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html.modal-open,
body.modal-open {
	overflow: hidden;
}

html,
body {
	font-family: 'Montserrat', sans-serif;
	background: #0f0f0f;
	color: #fff;
	overflow-x: hidden;
	scroll-behavior: smooth;
}

/* Gradient Text Fill */
.gradient-fill {
	display: inline-block;
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

section {
	scroll-margin-top: 80px;
	/* légèrement plus grand que la hauteur de la navbar */
}

.hamburger {
	display: none;
	flex-direction: column;
	justify-content: space-between;
	width: 28px;
	height: 20px;
	cursor: pointer;
	z-index: 1001;
}

.hamburger span {
	margin: 3px;
	display: block;
	height: 3px;
	width: 100%;
	background: #fff;
	border-radius: 4px;
	transition: all 0.3s ease;
}

/* Animation vers croix */
.hamburger.active span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
	opacity: 0;
}

.hamburger.active span:nth-child(3) {
	transform: translateY(-5px) rotate(-45deg);
}

#menu-overlay {
	position: fixed;
	top: 70px;
	left: 0;
	width: 100%;
	height: 0;
	background: rgba(0, 0, 0, 0.5);
	transition: height 0.4s ease;
	z-index: 1000;
}

@supports (backdrop-filter: blur(8px)) {
	#menu-overlay {
		backdrop-filter: blur(8px);
	}
}

@supports (-webkit-backdrop-filter: blur(8px)) {
	#menu-overlay {
		-webkit-backdrop-filter: blur(8px);
		backdrop-filter: blur(8px);
	}
}

#menu-overlay.active {
	height: calc(100vh - 70px);
}

#scroll-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 1px;
	width: 0%;
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	z-index: 9999;
	transition: width 0.25s ease-out;
}

#typewriter-text {
	display: inline-block;
	transition: opacity 0.5s ease;
	animation: fadeIn 0.5s ease;
}

.fade-in {
	animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

#cursor {
	display: inline-block;
	width: 1px;
	height: 1em;
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	animation: blink 1s steps(1, start) infinite;
}

@keyframes blink {
	50% {
		opacity: 0;
	}
}

/* ------------------------------------------
   NAVBAR
------------------------------------------- */
.navbar {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 70px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 2rem;
	z-index: 1001;
	transition: transform 0.3s ease, background-color 0.3s ease;
	transform: translateY(0);
	background-color: #141518;
}

.navbar-initial {
	background-color: #141518;
	transform: translateY(0);
}

.navbar-hidden {
	transform: translateY(-110%);
	background-color: transparent !important;
	pointer-events: none;
}

.navbar-fixed {
	transform: translateY(0);
	background-color: #2f2f2f;
	pointer-events: auto;
}

.logo-left .logo-text {
	font-size: 1.2rem;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
	letter-spacing: 1px;
}

.menu-right .nav-links {
	list-style: none;
	display: flex;
}

.menu-right .nav-links a {
	color: #ccc;
	text-decoration: none;
	transition: color 0.3s;
}

.menu-right .nav-links a:hover {
	color: #fff;
}

/* ------------------------------------------
   HERO SECTION
------------------------------------------- */
.hero {
	position: relative;
	height: 100vh;
	overflow: hidden;
	background-color: #141518;
}

.hero::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(20deg, #111215 40%, transparent 40%);
	pointer-events: none;
	z-index: 0;
}

.hero::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 1000px;
	height: 2px;
	background: linear-gradient(to right, #4FB5EA, #CA7EED, #ED6082);
	transform: translateX(-50%);
	z-index: 1;
}

.hero-content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	padding: 0 2rem;
	gap: 1rem;
}

.hero-left {
	flex: 1;
	max-width: 600px;
}

.hero-right {
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: center;
}

.portrait-ring {
	position: relative;
	width: 350px;
	height: 350px;
	border-radius: 50%;
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	padding: 4px;
}

.portrait-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.hello-friend {
	display: inline-block;
	padding: 0.4rem 0.8rem;
	border-radius: 15px;
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 1rem;
	background: linear-gradient(45deg, #4FB5EA 0%, #CA7EED 40%, #ED6082 100%);
	color: #fff;
}

.hero-name {
	font-size: 3rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
}

.hero-subtitle {
	min-height: 3.2em;
	/* This will accommodate up to 2 lines of text */
	margin: 1rem 0;
	font-size: 1.2rem;
	display: flex;
	align-items: center;
	justify-content: left;
	text-align: left;
	gap: 0.25rem;
}

.hero-contact {
	list-style: none;
	margin-bottom: 1.5rem;
}

.hero-contact li {
	margin-bottom: 0.7rem;
	display: flex;
	align-items: center;
	color: #ccc;
}

.hero-contact li i {
	margin-right: 0.5rem;
	color: #f06292;
}

.hero-contact a {
	color: inherit;
	text-decoration: none;
}

.hero-socials {
	display: flex;
	gap: 1rem;
}

.hero-socials a {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: #333;
	border-radius: 50%;
	text-decoration: none;
	overflow: hidden;
	box-shadow: 0 0 0px transparent;
	transition: box-shadow 0.4s ease;
}

.hero-socials a::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	opacity: 0;
	transition: opacity 0.4s ease;
	z-index: 0;
}

.hero-socials a i {
	position: relative;
	color: #ccc;
	font-size: 1.2rem;
	transition: color 0.4s ease;
	z-index: 1;
}

.hero-socials a:hover {
	box-shadow: 0 0 10px #CA7EED, 0 0 10px #4FB5EA;
}

.hero-socials a:hover::before {
	opacity: 1;
}

.hero-socials a:hover i {
	color: #fff;
}

/* ------------------------------------------
   RESPONSIVE DESIGN
------------------------------------------- */
@media (max-width: 1024px) {
	.hero-content {
		padding: 0 1.5rem;
	}

	.whoami-container {
		padding: 0 1.5rem;
	}

	.contact-container {
		padding: 0 0rem;
	}
}

@media (min-width: 768px) {
	.menu-right .nav-links {
		gap: 1rem;
	}
}

@media (max-width: 768px) {
	.navbar {
		padding: 0 1rem;
	}

	.modal {
		padding: 1rem;
	}

	.modal-content {
		position: relative;
		background: #1f1f1f;
		padding: 2rem;
		border-radius: 12px;
		width: 90%;
		max-width: 600px;
		margin: 2rem auto;
		transform: scale(0.7);
		opacity: 0;
		transition: transform 0.3s ease, opacity 0.3s ease;
		will-change: transform, opacity;
	}

	.modal .close {
		right: 0.75rem;
		top: 0.75rem;
	}

	.modal-body {
		font-size: 1.1rem;
		line-height: 1.6;
		padding: 1rem;
	}

	.modal-title {
		text-align: center;
	}

	.hero {
		padding-top: 70px;
		/* Add padding equal to navbar height */
		min-height: 100vh;
		/* Change to min-height */
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}

	.hero-content {
		flex: 1;
		display: flex;
		flex-direction: column-reverse;
		justify-content: flex-start;
		/* Change from center to flex-start */
		padding: 1rem 1rem;
		text-align: center;
	}

	.hero::after {
		bottom: 0;
		width: 100%;
		/* Make the gradient line full width on mobile */
		transform: none;
		left: 0;
	}

	.hamburger {
		display: flex;
	}

	html.menu-open,
	body.menu-open {
		overflow: hidden !important;
	}

	.menu-right {
		position: fixed;
		top: 70px;
		left: 0;
		background-color: rgba(20, 21, 24, 0.98);
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(10px);
		width: 100%;
		height: calc(100vh - 70px);
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.4s ease;
		z-index: 1001;
	}

	.menu-right.active {
		max-height: calc(100vh - 70px);
		overflow: hidden;
	}

	.nav-links {
		flex-direction: column;
		width: 100%;
		margin: 0;
		padding: 0;
		height: auto;
		display: flex;
		justify-content: center;
	}

	.nav-links a {
		font-size: 1.2rem;
		display: block;
		text-align: center;
		padding: 1rem;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
		width: 100%;
	}

	.nav-links li:last-child a {
		border-bottom: none;
	}

	/* Hero Section Mobile */
	.hero-left,
	.hero-right {
		width: 100%;
	}

	.hero-right {
		margin-bottom: 2rem;
	}

	.portrait-ring {
		width: 300px;
		height: 300px;
		margin: 0 auto;
	}

	.hero-name {
		font-size: 2rem;
	}

	.hero-subtitle {
		min-height: 4em;
		/* Slightly taller on mobile to accommodate text wrapping */
		font-size: 1.1rem;
		text-align: center;
		justify-content: center;
		align-items: center;
	}

	.hero-contact {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 1rem;
		margin: 2rem 0;
	}

	.hero-contact li {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		text-align: center;
	}

	.hero-socials {
		justify-content: center;
	}

	/* Skills Section Mobile */
	.whoami-section {
		padding: 3rem 1rem;
	}

	.whoami-title {
		font-size: 2rem;
		margin-bottom: 2rem;
	}

	.whoami-container {
		flex-direction: column;
		gap: 2rem;
		padding: 0;
	}

	.column {
		width: 100%;
		padding: 1rem;
	}

	.whoami-skills {
		grid-template-columns: 1fr;
		padding: 0;
		width: 100%;
	}

	.skill-card {
		width: 100%;
		margin: 0 auto;
		padding: 1.5rem;
	}

	/* Contact Section Mobile */
	.contact-section {
		padding: 3rem 1rem;
	}

	.contact-container {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.contact-info {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.contact-form {
		padding: 1.5rem;
	}

	.form-group input,
	.form-group textarea {
		padding: 0.8rem;
	}
}

@media (max-width: 480px) {
	.hero-name {
		font-size: 1.8rem;
	}

	.hello-friend {
		font-size: 1rem;
	}

	.hero-subtitle {
		font-size: 1rem;
	}

	#cursor {
		width: 2px;
		height: 1em;
		background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
		animation: blink 1s steps(1, start) infinite;
	}

	.portrait-ring {
		width: 180px;
		height: 180px;
	}

	.whoami-skills {
		grid-template-columns: 1fr;
	}

	.skill-card {
		padding: 0.8rem;
	}

	.contact-card {
		padding: 1.2rem;
	}

	.contact-card i {
		font-size: 1.5rem;
	}

	.contact-card h3 {
		font-size: 1rem;
	}

	.contact-card p {
		font-size: 0.9rem;
	}
}

/* Fix for iOS Safari 100vh issue */
@supports (-webkit-touch-callout: none) {
	.hero {
		height: -webkit-fill-available;
	}

	.menu-right.active {
		max-height: -webkit-fill-available;
	}
}

/* ------------------------------------------
   WHOAMI SECTION
------------------------------------------- */
.whoami-section {
	width: 100%;
	min-height: 100vh;
	background: #141518;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding: 4rem 2rem;
}

.whoami-title {
	font-size: 2.5rem;
	color: #fff;
	text-align: center;
	margin-bottom: 4rem;
}

.whoami-container {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	max-width: 1200px;
	width: 100%;
	gap: 2rem;
	margin-bottom: 4rem;
}

.column {
	flex: 1;
	background-color: #1f1f1f;
	padding: 2rem;
	border-radius: 8px;
	box-sizing: border-box;
}

.skills-subtitle {
	font-size: 1.6rem;
	margin-bottom: 1.5rem;
	color: #fff;
	text-align: center;
}

.divider {
	width: 2px;
	background-color: #888;
	margin-top: 1rem;
	margin-bottom: 1rem;
}

.skills-instruction {
	text-align: center;
	font-size: 1.5rem;
	/* Slightly larger text */
	color: #f0f0f0;
	margin-bottom: 2rem;
	/* Space between instruction and skills columns */
}

/********************************************
   SKILL CARDS
********************************************/
.whoami-skills {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
	padding: 1rem 0;
}

.skill-card {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	background-color: #2a2a2a;
	padding: 0.75rem 1rem;
	border-radius: 6px;
	color: #fff;
	min-height: 70px;
	cursor: pointer;
	overflow: hidden;
}

.skill-card .card-bg {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 0;
	pointer-events: none;
}

.skill-card:hover .card-bg {
	opacity: 0.6;
}

.skill-card i,
.skill-card span {
	position: relative;
	z-index: 1;
}

.skill-card i {
	font-size: 1.4rem;
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/********************************************
   MODAL
********************************************/
.modal {
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
	overflow: hidden;
}

.modal-content {
	position: relative;
	background: #1f1f1f;
	border-radius: 10px;
	color: #fff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
	transform: translateY(50px);
	opacity: 0;
	transition: transform 0.4s ease, opacity 0.4s ease;
	width: 90%;
	max-width: 90vw;
	padding: 4rem;
	display: flex;
	flex-direction: column;
	max-height: 90vh;
	/* cap the overall height */
	/* remove overflow-y from here */
}

.modal-body {
	flex: 1 1 auto;
	/* fill whatever space remains */
	overflow-y: auto;
	/* only the body scrolls */
	overscroll-behavior: contain;
	/* if you want to double-insure no chaining */
}

.pdf-modal-content {
	/* Take up most of the viewport while leaving space for padding */
	width: 90vw;
	height: 90vh;
	/* Limit maximum dimensions */
	max-width: 1000px;
	max-height: 90vh;
	/* Center content */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: #1f1f1f;
	margin: auto;
	position: relative;
}

.pdf-modal-content iframe {
	/* Take up all available space */
	width: 100%;
	height: 100%;
	/* Clean up appearance */
	border: none;
	border-radius: 6px;
	background: white;
	/* Scale content to fit */
	object-fit: contain;
	max-height: 100%;
	object-fit: contain;
}

.modal .close {
	position: absolute;
	top: 1rem;
	right: 2rem;
	font-size: 2rem;
	color: #aaa;
	cursor: pointer;
	transition: color 0.2s;
}

.modal .close:hover {
	color: #fff;
}

.modal-title {
	font-size: 2.5rem;
	margin-bottom: 1rem;
}

.modal-body {
	font-size: 1.1rem;
	line-height: 1.6;
}

.modal.active .modal-content {
	transform: translateY(0);
	opacity: 1;
}

.modal.active {
	opacity: 1;
	pointer-events: auto;
}

/********************************************
   CV BUTTONS
********************************************/
.download-cv-container {
	margin-top: 2rem;
	display: flex;
	gap: 1rem;
	justify-content: center;
}

.download-cv-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	background: #2a2a2a;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 0.75rem 1.5rem;
	font-size: 1rem;
	cursor: pointer;
	overflow: hidden;
	transition: transform 0.4s ease, color 0.4s ease;
	z-index: 1;
	text-decoration: none;
	outline: 0;
	box-shadow: none;
}

.download-cv-btn i {
	margin-right: 0.5rem;
	position: relative;
	z-index: 2;
}

.download-cv-btn span {
	position: relative;
	z-index: 2;
}

.download-cv-btn::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	opacity: 0;
	transition: opacity 0.4s ease;
	z-index: 0;
}

.download-cv-btn:hover::before {
	opacity: 1;
}

.download-cv-btn:hover {
	transform: translateY(0) scale(1.03);
}

/********************************************
   TIMELINE SECTION
********************************************/
.timeline-visual-section {
	background: #141518;
	padding: 4rem 2rem;
	color: #fff;
}

.timeline-visual-section .section-title {
	text-align: center;
	font-size: 2.5rem;
	margin-bottom: 2rem;
}

.timeline {
	position: relative;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 2rem;
}

.timeline::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 4px;
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	z-index: 0;
}

.timeline-item {
	position: relative;
	width: 50%;
	padding: 3rem 0;
	box-sizing: border-box;
	transition: all 0.4s ease-in-out;
	opacity: 1;
	transform: scale(1);
	z-index: 1;
}

.timeline-item.left {
	left: 0;
	text-align: left;
}

.timeline-item.right {
	left: 50%;
	text-align: left;
}

.timeline-item::after {
	content: "";
	position: absolute;
	top: 20px;
	width: 20px;
	height: 20px;
	background: #2f2f2f;
	border: 4px solid #fff;
	border-radius: 50%;
	z-index: 4;
	/* Elevate over the gradient line */
}

.timeline-item.left::after {
	right: -14px;
}

.timeline-item.right::after {
	left: -14px;
}

.timeline-year {
	position: absolute;
	top: 20px;
	background: #2f2f2f;
	padding: 0.3rem 0.6rem;
	border-radius: 4px;
	font-size: 0.9rem;
	color: #a38cf2;
	z-index: 3;
	/* Was 2 before — now placed in front of the line */
}

.timeline-item.left .timeline-year {
	right: -80px;
}

.timeline-item.right .timeline-year {
	left: -80px;
}

.timeline-header {
	position: absolute;
	top: 13px;
	background: #2f2f2f;
	padding: 0.5rem 1rem;
	border-radius: 6px;
	cursor: pointer;
	transition: transform 0.3s ease;
}

.timeline-item.left .timeline-header {
	right: calc(3% + 1rem);
}

.timeline-item.right .timeline-header {
	left: calc(3% + 1rem);
}

.timeline-header .button-bg {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	border-radius: 6px;
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	opacity: 0;
	transition: opacity 0.3s;
	z-index: 0;
}

.timeline-header:hover .button-bg {
	opacity: 1;
}

.timeline-item.active .timeline-header .button-bg {
	opacity: 1;
}

.timeline-header {
	transform: translateY(0) scale(1);
	transition: transform 0.3s ease;
}

.timeline-header:hover {
	transform: translateY(0) scale(1.05);
}

@media (max-width: 768px) {
	.timeline-item:not(.active) .timeline-header:hover .button-bg {
		opacity: 0;
	}

	.timeline-item:not(.active) .timeline-header {
		transform: translateY(0) scale(1);
	}
}

.timeline-label {
	position: relative;
	z-index: 1;
	font-size: 1.4rem;
	font-weight: bold;
}

.timeline-hover {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: #2f2f2f;
	padding: 0.5rem 1rem;
	border-radius: 6px;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0.3s;
	z-index: 10;
}

.timeline-item.left .timeline-hover {
	right: calc(100% + 1rem);
}

.timeline-item.right .timeline-hover {
	left: calc(100% + 1rem);
}

.timeline-header:hover .timeline-hover {
	opacity: 1;
	visibility: visible;
}

.timeline-details {
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-height 0.5s, opacity 0.5s;
	margin-top: 1rem;
}

.timeline-item.active .timeline-details {
	max-height: 300px;
	opacity: 1;
}

.timeline-content {
	margin: 5px 30px;
	background: #2f2f2f;
	padding: 1rem;
	border-radius: 8px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.timeline-content h3 {
	margin-bottom: 0.5rem;
	font-size: 1.2rem;
}

.timeline-content p {
	font-size: 1rem;
	line-height: 1.5;
}

.filter-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #2a2a2a;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 0.75rem 1.5rem;
	font-size: 1rem;
	cursor: pointer;
	overflow: hidden;
	transition: transform 0.4s ease, color 0.4s ease;
	z-index: 1;
	text-decoration: none;
	outline: 0;
	box-shadow: none;
}

.filter-btn::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	opacity: 0;
	transition: opacity 0.4s ease;
	z-index: 0;
}

.filter-btn:hover::before {
	opacity: 0.5;
}

.filter-btn:hover {
	transform: translateY(0) scale(1.03);
}

.filter-btn span {
	position: relative;
	z-index: 2;
}

/* Active = même effet que hover */
.filter-btn.active::before {
	opacity: 1;
}

.filter-btn.active {
	transform: scale(1.03);
	color: #fff;
}

.timeline-item.hidden {
	opacity: 0;
	transform: scale(0.9);
	pointer-events: none;
	height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
}

/********************************************
      CERTIFICATIONS
********************************************/
.cert-section {
	padding: 4rem 2rem;
	background: #111215;
	text-align: center;
}

.cert-section .section-title {
	font-size: 2.5rem;
	margin-bottom: 3rem;
	color: #fff;
}

.cert-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 2rem;
	max-width: 1100px;
	margin: 0 auto;
}

.cert-card {
	perspective: 1000px;
	width: 100%;
	height: 300px;
	cursor: pointer;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	transform-style: preserve-3d;
	pointer-events: auto;
	opacity: 0;
	transform: translateY(50px);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.cert-card.visible {
	opacity: 1;
	transform: translateY(0);
}

.cert-card:not(.flipped):hover {
	transform: scale(1.03) rotateX(30deg) rotateY(-30deg);
}

.cert-card.scaled {
	transform: scale(1.03);
}

.cert-inner {
	position: relative;
	width: 100%;
	height: 100%;
	transition: transform 0.8s ease;
	transform-style: preserve-3d;
	pointer-events: none;
}

.cert-card.flipped .cert-inner {
	transform: rotateY(180deg);
}

.cert-front,
.cert-back {
	position: absolute;
	width: 100%;
	height: 100%;
	background: #2a2a2a;
	border-radius: 12px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
	backface-visibility: hidden;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	color: #fff;
}

.cert-front {
	z-index: 2;
	pointer-events: none;
}

.cert-front i {
	font-size: 2.2rem;
	margin-bottom: 1rem;
	color: #ccc;
}

.cert-card:hover .cert-front i {
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.cert-card:hover .cert-front h3 {
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.cert-back {
	transform: rotateY(180deg);
	pointer-events: auto;
	/* 🔥 important pour que les liens soient cliquables */
}

.cert-back p {
	font-size: 1rem;
	margin-bottom: 1rem;
	color: #ccc;
}

.cert-back a {
	color: #fff;
	text-decoration: none;
	padding: 0.5rem 1rem;
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	border-radius: 6px;
	font-weight: bold;
	transition: background-position 0.4s ease;
	background-size: 200% auto;
	background-position: left center;
}

.cert-back a:hover {
	background-position: right center;
}

/********************************************
   CONTACT SECTION
********************************************/
.contact-section {
	background: #111215;
	padding: 4rem 2rem;
}

.contact-section .section-title {
	font-size: 2.5rem;
	margin-bottom: 3rem;
	text-align: center;
	color: #fff;
}

.contact-container {
	display: grid;
	grid-template-columns: 1fr 1.5fr;
	gap: 3rem;
	max-width: 1200px;
	margin: 0 auto;
}

.contact-info {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}

.contact-card {
	background: #1f1f1f;
	padding: 2rem;
	border-radius: 8px;
	text-align: center;
	position: relative;
	overflow: hidden;
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	min-height: 200px;
	text-decoration: none;
	color: inherit;
}

.contact-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 0;
}

.contact-card:hover {
	transform: translateY(-5px);
}

.contact-card:hover::before {
	opacity: 0.2;
}

.contact-card i {
	font-size: 2rem;
	margin-bottom: 1rem;
	position: relative;
	z-index: 1;
}

.contact-card h3 {
	margin-bottom: 0.5rem;
	color: #fff;
	position: relative;
	z-index: 1;
}

.contact-card p {
	color: #fff;
	margin: 0;
	opacity: 0.8;
	position: relative;
	z-index: 1;
}

.contact-card a {
	color: inherit;
	text-decoration: none;
}

.contact-card a:hover {
	color: inherit;
}

.contact-form {
	background: #1f1f1f;
	padding: 2rem;
	border-radius: 8px;
}

.form-group {
	margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
	width: 100%;
	padding: 1rem;
	background: #141518;
	border: 1px solid #2f2f2f;
	border-radius: 4px;
	color: #fff;
	font-family: 'Montserrat', sans-serif;
	transition: border-color 0.3s ease;
}

.form-group textarea {
	min-height: 150px;
	resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
	outline: none;
	border-color: #4FB5EA;
}

.download-cv-container {
	display: flex;
	gap: 1rem;
	margin-top: 2rem;
	width: 100%;
}

.cv-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 1rem 2rem;
	background: #2f2f2f;
	border: none;
	border-radius: 4px;
	color: #fff;
	text-decoration: none;
	transition: transform 0.3s ease, background-color 0.3s ease;
	position: relative;
	overflow: hidden;
	cursor: pointer;
}

.cv-btn::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 0;
}

.cv-btn:hover {
	transform: translateY(-2px);
}

.cv-btn:hover::before {
	opacity: 1;
}

.cv-btn i,
.cv-btn span {
	position: relative;
	z-index: 1;
}

.submit-btn {
	width: 100%;
	padding: 1rem;
	background: #2f2f2f;
	border: none;
	border-radius: 4px;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	transition: transform 0.3s ease;
}

.submit-btn::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(90deg, #4FB5EA, #CA7EED, #ED6082);
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 0;
}

.submit-btn:hover {
	transform: translateY(-2px);
}

.submit-btn:hover::before {
	opacity: 1;
}

.submit-btn span {
	position: relative;
	z-index: 1;
}

@media (max-width: 768px) {
	.contact-container {
		grid-template-columns: 1fr;
	}

	.contact-info {
		gap: 1.5rem;
	}

	.contact-card {
		padding: 1.5rem;
	}
}

/********************************************
   RESPONSIVE TWEAKS
********************************************/
@media (max-width: 768px) {
	.whoami-skills {
		grid-template-columns: 1fr;
	}

	.modal-content {
		width: 100%;
		max-width: none;
		margin: 0;
		padding: 2rem 1rem;
		border-radius: 12px;
	}

	.modal-title {
		font-size: 1.8rem;
	}

	.cert-grid {
		grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	}

	.timeline::after {
		left: 10px;
		/* repositionne la ligne verticale */
	}

	.timeline-item {
		width: 115%;
		left: 0 !important;
		text-align: left;
		padding-left: 0rem;
		padding-right: 0rem;
		padding: 1rem;
	}

	.timeline-item::after {
		left: 0;
		right: auto;
	}

	.timeline-year {
		position: static;
		display: inline-block;
		margin-bottom: 0.3rem;
	}

	.timeline-header {
		position: static;
		margin-bottom: 0.5rem;
	}

	.timeline-hover {
		position: static;
		transform: translateY(0%);
		margin-top: 0.5rem;
		opacity: 1;
		visibility: visible;
	}

	.timeline-content {
		margin: 0;
	}

	.whoami-container {
		flex-direction: column;
		gap: 2rem;
	}

	.column {
		width: 100%;
	}

	.hamburger {
		display: block;
	}

	.menu-right {
		position: absolute;
		top: 70px;
		right: 0;
		background-color: #141518;
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.4s ease;
		z-index: 1001;
	}

	.menu-right.active {
		max-height: 400px;
		/* ou plus selon ton nombre de liens */
	}

	.nav-links {
		flex-direction: column;
		padding-top: 2rem;
		/* espace au-dessus du premier lien */
		padding-bottom: 2rem;
	}

	.pdf-modal-content {
		width: 100%;
		height: 100%;
		padding: 0.5rem;
		margin: 0 auto;
		max-height: calc(100vh - 4rem);
		max-width: 800px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.pdf-modal-content iframe,
	.pdf-modal-content embed {
		width: 100%;
		height: 100%;
		object-fit: contain;
		background: white;
		border-radius: 4px;
	}

	.timeline-item.left::after {
		left: -35px;
	}

	.timeline-item.right::after {
		left: -36px;
	}

	.timeline-year {
		padding: 0.5rem 40%;
		font-size: 1rem;
	}

	.timeline-item .timeline-details {
		max-height: 0;
		overflow: hidden;
		opacity: 0;
		transition: max-height 0.4s ease, opacity 0.4s ease;
		margin-top: 1rem;
	}

	.timeline-item.active .timeline-details {
		/* big enough to accommodate most content; if you really need unlimited height you can use auto, but transitions won’t animate */
		max-height: 1000px;
		opacity: 1;
	}
}

@media (max-width: 768px) {

	/* timeline filter buttons */
	.filter-btn,
	/* CV download buttons */
	.download-cv-btn {
		width: 100%;
		box-sizing: border-box;
	}

	/* ensure it starts hidden */
	.timeline-header .button-bg {
		opacity: 0;
	}
}

/* ------------------------------------------
   DOCUMENTS SECTION
------------------------------------------- */
.documents-section {
   padding: 120px 2rem 4rem;
   min-height: 100vh;
   background-color: #0f0f0f;
   text-align: center;
   font-size: 2rem;
}

.documents-container {
   max-width: 1200px;
   margin: 0 auto;
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
   gap: 2rem;
   padding: 2rem;
}

.document-card {
   background: #1f1f1f;
   border-radius: 15px;
   padding: 2rem;
   display: flex;
   align-items: flex-start;
   gap: 1.5rem;
   transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.document-card:hover {
   transform: translateY(-5px);
   box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.document-icon {
   font-size: 2.5rem;
   flex-shrink: 0;
}

.document-info {
   flex-grow: 1;
}

.document-info h3 {
   color: var(--text-light);
   margin: 0 0 0.5rem;
   font-size: 1.2rem;
}

.document-info p {
   color: var(--text-muted);
   margin: 0 0 1rem;
   font-size: 0.9rem;
}

.download-btn {
   display: inline-flex;
   align-items: center;
   gap: 0.5rem;
   padding: 0.5rem 1rem;
   background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
   color: var(--text-light);
   border-radius: 25px;
   text-decoration: none;
   font-size: 0.9rem;
   transition: transform 0.2s ease;
}

.download-btn:hover {
   transform: scale(1.05);
}

.confidential-badge {
   display: inline-block;
   padding: 0.5rem 1rem;
   background-color: #555;
   color: #fff;
   border-radius: 25px;
   font-size: 0.9rem;
   text-align: center;
   margin-top: 0.5rem;
}

.download-btn i {
   font-size: 1rem;
}

@media (max-width: 768px) {
   .documents-container {
      grid-template-columns: 1fr;
      padding: 1rem;
   }

   .document-card {
      padding: 1.5rem;
   }
}

/* ------------------------------------------
   FOOTER
------------------------------------------- */
.footer {
	background: #1f1f1f;
	text-align: center;
	padding: 1.5rem;
	color: #cccccc;
	font-size: 0.875rem;
}