/* =========================
   History page (redesign)
   ========================= */

/* Layout */
.history-layout {
	margin-top: 24px;
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
	align-items: start;
}

.history-story h2 {
	margin-top: 0;
}

.history-aside {
	position: sticky;
	top: 96px;
	display: grid;
	gap: 14px;
}

.history-aside-card {
	background: #FFFFFF;
	border: 1px solid var(--border);
	border-radius: 20px;
	padding: 16px;
	box-shadow: 0 10px 26px rgba(0, 0, 0, .06);
}

.history-aside-title {
	font-weight: 900;
	letter-spacing: -0.2px;
	margin-bottom: 10px;
}

.history-aside-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 14px;
	border: 1px solid rgba(0, 0, 0, .08);
	background: rgba(0, 0, 0, .02);
	text-decoration: none;
}

.history-aside-link:hover {
	background: rgba(0, 0, 0, .04);
}

.history-aside-link i {
	width: 18px;
	color: var(--accent);
}

/* Milestones list in aside */
.history-milestones {
	overflow: hidden;
}

.history-milestone {
	display: grid;
	grid-template-columns: 12px 1fr;
	gap: 10px;
	padding: 10px 0;
	border-top: 1px dashed rgba(0, 0, 0, .12);
}

.history-milestone:first-of-type {
	border-top: 0;
}

.history-dot {
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: rgba(45, 42, 98, .22);
	border: 2px solid rgba(45, 42, 98, .22);
	margin-top: 6px;
}

.history-milestone-year {
	font-weight: 900;
	letter-spacing: -0.2px;
}

.history-milestone-text {
	font-size: 0.92rem;
	color: rgba(17, 17, 17, .84);
	line-height: 1.45;
	margin-top: 2px;
}

/* Section head */
.history-section-head {
	margin-top: 28px;
}

.history-section-head h2 {
	margin-bottom: 0.4rem;
}

/* Heads list grid */
.grid {
	display: grid;
	gap: 16px;
	margin-top: 18px;
}

/* Card - (kept compatible with current JS structure) */
.chair-card {
	position: relative;
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 14px;

	padding: 16px;
	background: #FFFFFF;
	border: 1px solid var(--border);
	border-radius: 22px;
	box-shadow: 0 10px 26px rgba(0, 0, 0, .06);
	transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
	overflow: hidden;
}

.chair-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    opacity: 0;
    transition: opacity .22s ease;
}

.chair-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 18px 44px rgba(0, 0, 0, .12);
	border-color: rgba(0, 0, 0, .14);
}

.chair-card:hover::before {
    opacity: 1;
}

/* Avatar */
.chair-avatar {
	width: 96px;
	height: 120px;
	border-radius: 18px;
	object-fit: cover;
	border: 3px solid #fff;
	box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
	background: #f3f4f6;
	transition: transform .25s ease;
	z-index: 1;
}

.chair-card:hover .chair-avatar {
	transform: scale(1.02);
}

/* Body */
.chair-body {
	z-index: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: .6rem;
}

.chair-header {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: start;
	gap: 10px;
}

.chair-name {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 900;
	letter-spacing: -0.2px;
	line-height: 1.15;
	color: #000000;
}

.chair-name a {
	color: inherit;
	text-decoration: none;
	border: none;
}

.chair-role {
	margin: 6px 0 0;
	font-size: 0.9rem;
	color: var(--muted);
	line-height: 1.35;
}

.chair-years {
	align-self: flex-start;
	font-size: 0.78rem;
	font-weight: 900;
	padding: 8px 10px;
	border-radius: 999px;
	background: rgba(45, 42, 98, .08);
	border: 1px solid rgba(45, 42, 98, .16);
	color: var(--accent);
	white-space: nowrap;
}

.chair-phd {
	font-size: 0.92rem;
	color: rgba(17, 17, 17, .86);
}

.chair-tags {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
}

.chair-chip {
	display: inline-flex;
	align-items: center;
	padding: .32rem .65rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, .04);
	border: 1px solid rgba(0, 0, 0, .08);
	font-size: 0.78rem;
	font-weight: 800;
	color: rgba(17, 17, 17, .82);
}

/* Responsive */
@media (max-width: 992px) {
	.history-layout {
		grid-template-columns: 1fr;
	}

	.history-aside {
		position: static;
	}

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

@media (max-width: 768px) {
	.chair-card {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.chair-avatar {
		margin: 0 auto;
		width: 110px;
		height: 140px;
	}

	.chair-header {
		grid-template-columns: 1fr;
		justify-items: center;
	}

	.chair-years {
		margin-top: 6px;
	}

	.chair-tags {
		justify-content: center;
	}
}