/*
 * Shared timeline (Work Experience + Education)
 * Center line grows with content; cards match site maroon accent.
 */

#main .timeline-horizontal {
	align-items: stretch;
	display: flex;
	flex-direction: row;
	justify-content: center;
	margin: 0 auto;
	max-width: 72rem;
	padding: 0 1rem 2rem;
	position: relative;
}

#main .timeline-side {
	display: flex;
	flex-direction: column;
	flex: 1 1 0;
	min-width: 0;
}

#main .timeline-side .timeline-item + .timeline-item {
	margin-top: 1.75rem;
}

#main .timeline-left .timeline-item {
	align-items: flex-end;
}

#main .timeline-right .timeline-item {
	align-items: flex-start;
}

#main .timeline-line {
	align-self: stretch;
	background: linear-gradient(
		180deg,
		rgb(111, 0, 0) 0%,
		rgba(111, 0, 0, 0.55) 50%,
		rgb(111, 0, 0) 100%
	);
	border: none;
	border-radius: 999px;
	box-shadow: 0 0 0 1px rgba(111, 0, 0, 0.12), 0 4px 20px rgba(111, 0, 0, 0.12);
	flex: 0 0 4px;
	margin: 0.5rem 0;
	min-height: 14rem;
	width: 4px;
}

#main .timeline-item {
	display: flex;
	flex-direction: column;
	margin: 0;
	max-width: 100%;
	padding: 15px;
}

#main .timeline-date {
	background: rgba(111, 0, 0, 0.09);
	border-radius: 999px;
	color: rgb(111, 0, 0);
	display: inline-block;
	font-family: "Rockwell", Helvetica, sans-serif;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1.2;
	margin-bottom: 0.65rem;
	padding: 0.4rem 0.75rem;
	text-transform: uppercase;
}

#main .timeline-content {
	background: #fafafa;
	border: 1px solid #e8e8ec;
	border-radius: 12px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
	max-width: 22rem;
	padding: 1.2rem 1.35rem 1.35rem;
	text-align: left;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	width: 100%;
}

#main .timeline-left .timeline-content {
	border-left: 4px solid rgb(111, 0, 0);
}

#main .timeline-right .timeline-content {
	border-right: 4px solid rgb(111, 0, 0);
}

#main .timeline-content:hover {
	border-color: rgba(111, 0, 0, 0.22);
	box-shadow: 0 8px 28px rgba(111, 0, 0, 0.08);
}

#main .timeline-content h2 {
	color: rgb(111, 0, 0);
	font-size: 1.15rem;
	letter-spacing: 0.02em;
	line-height: 1.25;
	margin: 0 0 0.5rem 0;
}

#main .timeline-content > p:first-of-type {
	color: #5c656d;
	font-weight: 600;
	margin: 0 0 0.5rem 0;
}

#main .timeline-content > p + p {
	color: #3d4449;
	font-size: 0.95rem;
	line-height: 1.65;
	margin: 0 0 0.65rem 0;
}

#main .timeline-content > p:last-child {
	margin-bottom: 0;
}

/* Stagger offsets (keeps zig-zag rhythm vs. opposite column) */
#main .timeline-item.bottom-left {
	margin-top: 6.5rem !important;
}

#main .timeline-item.bottom-right {
	margin-top: 11rem !important;
}

#main .timeline-item.middle-right {
	margin-left: 0;
	margin-top: 10rem !important;
}

@media screen and (max-width: 1100px) {
	#main .timeline-content {
		max-width: 19rem;
	}
}

@media screen and (max-width: 900px) {
	/* Flatten columns so entries can be reordered chronologically */
	#main .timeline-horizontal {
		display: flex;
		flex-direction: column;
		gap: 1.25rem;
		padding: 0 0.5rem 1.5rem;
	}

	#main .timeline-side {
		display: contents;
	}

	#main .timeline-line {
		display: none !important;
	}

	#main .timeline-side .timeline-item + .timeline-item {
		margin-top: 0;
	}

	/* Newest / most recent first — set seq on each .timeline-item in HTML */
	#main .timeline-item.timeline-seq-1 {
		order: 1;
	}

	#main .timeline-item.timeline-seq-2 {
		order: 2;
	}

	#main .timeline-item.timeline-seq-3 {
		order: 3;
	}

	#main .timeline-item.timeline-seq-4 {
		order: 4;
	}

	#main .timeline-item.timeline-seq-5 {
		order: 5;
	}

	#main .timeline-item.timeline-seq-6 {
		order: 6;
	}

	#main .timeline-item.timeline-seq-7 {
		order: 7;
	}

	#main .timeline-item.timeline-seq-8 {
		order: 8;
	}

	#main .timeline-item.timeline-seq-9 {
		order: 9;
	}

	#main .timeline-item.timeline-seq-10 {
		order: 10;
	}

	#main .timeline-left .timeline-item,
	#main .timeline-right .timeline-item {
		align-items: stretch;
	}

	#main .timeline-item.bottom-left,
	#main .timeline-item.bottom-right,
	#main .timeline-item.middle-right,
	#main .timeline-item.top-left,
	#main .timeline-item.top-right {
		margin-left: 0 !important;
		margin-top: 0 !important;
	}

	#main .timeline-content {
		border-left: 4px solid rgb(111, 0, 0) !important;
		border-right: none !important;
		max-width: none;
	}

	#main .timeline-date {
		align-self: flex-start;
	}
}

@media screen and (max-width: 736px) {
	#main .timeline-horizontal {
		padding-bottom: 1rem;
	}

	#main .timeline-content {
		padding: 1rem 1.1rem 1.15rem;
	}

	#main .timeline-content h2 {
		font-size: 1.05rem;
	}
}
