/* kcsayem.github.io */

:root {
	--bg: #fbfbf9;
	--surface: #ffffff;
	--text: #1b2330;
	--muted: #566173;
	--faint: #8a94a3;
	--line: #e3e6eb;
	--accent: #1f5fa8;
	--accent-soft: rgba(31, 95, 168, 0.09);
	--shadow: 0 1px 2px rgba(20, 32, 51, 0.06), 0 8px 24px rgba(20, 32, 51, 0.06);
	--serif: "Newsreader", Georgia, serif;
	--sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, monospace;
	color-scheme: light;
}

:root[data-theme="dark"] {
	--bg: #0e131b;
	--surface: #151c27;
	--text: #e8edf5;
	--muted: #a7b2c3;
	--faint: #7b8698;
	--line: #242f40;
	--accent: #7cc3ff;
	--accent-soft: rgba(124, 195, 255, 0.12);
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
	color-scheme: dark;
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 5rem;
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.65;
	margin: 0;
	transition: background-color 0.2s ease, color 0.2s ease;
}

a {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

img {
	display: block;
	height: auto;
	max-width: 100%;
}

h1,
h2,
h3 {
	color: var(--text);
	font-family: var(--serif);
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.2;
	margin: 0;
}

p {
	margin: 0 0 0.9rem 0;
}

.wrap {
	margin: 0 auto;
	max-width: 880px;
	padding: 0 24px;
}

.icon {
	fill: none;
	flex: none;
	height: 1em;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
	width: 1em;
}

/* Top bar */

.topbar {
	backdrop-filter: saturate(1.4) blur(10px);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	background: color-mix(in srgb, var(--bg) 85%, transparent);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 10;
}

.topbar .wrap {
	align-items: center;
	display: flex;
	gap: 1rem;
	height: 3.5rem;
	justify-content: flex-end;
}

.nav {
	align-items: center;
	display: flex;
	font-size: 0.9rem;
	font-weight: 600;
	gap: 1.4rem;
}

.nav a {
	color: var(--muted);
}

.nav a:hover {
	color: var(--text);
	text-decoration: none;
}

.theme-toggle {
	align-items: center;
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--muted);
	cursor: pointer;
	display: inline-flex;
	font-size: 1rem;
	height: 2rem;
	justify-content: center;
	padding: 0;
	width: 2rem;
}

.theme-toggle:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.theme-toggle .icon-sun,
:root[data-theme="dark"] .theme-toggle .icon-moon {
	display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
	display: block;
}

/* Intro */

.intro {
	align-items: start;
	display: grid;
	gap: 3rem;
	grid-template-columns: minmax(0, 1fr) 300px;
	padding: 4rem 0 3rem 0;
}

.intro h1 {
	font-size: 2.3rem;
	margin-bottom: 0.75rem;
}

.statement {
	color: var(--text);
	font-family: var(--serif);
	font-size: 1.3rem;
	line-height: 1.45;
	margin-bottom: 1.4rem;
}

.roles {
	list-style: none;
	margin: 0 0 1.4rem 0;
	padding: 0;
}

.roles li {
	border-left: 2px solid var(--accent);
	margin-bottom: 0.35rem;
	padding-left: 0.8rem;
}

.roles li.past {
	border-left-color: var(--line);
	color: var(--muted);
}

.roles strong {
	font-weight: 700;
}

.intro .bio {
	color: var(--muted);
}

.links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 1.5rem 0 0 0;
	padding: 0;
}

.links a {
	align-items: center;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--text);
	display: inline-flex;
	font-size: 0.88rem;
	font-weight: 600;
	gap: 0.45rem;
	padding: 0.4rem 0.85rem;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.links a:hover {
	background: var(--accent-soft);
	border-color: var(--accent);
	text-decoration: none;
}

.links a.primary {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--bg);
}

.links a.primary:hover {
	opacity: 0.9;
}

/* Sections */

.section {
	border-top: 1px solid var(--line);
	padding: 3rem 0;
}

.section > h2 {
	font-size: 1.6rem;
	margin-bottom: 1.5rem;
}

.note {
	color: var(--muted);
	font-size: 0.92rem;
}

/* News */

.news {
	list-style: none;
	margin: 0;
	padding: 0;
}

.news li {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: 6.5rem minmax(0, 1fr);
	padding: 0.35rem 0;
}

.date {
	color: var(--faint);
	font-size: 0.85rem;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	padding-top: 0.1rem;
}

details.more {
	margin-top: 0.75rem;
}

details summary {
	color: var(--accent);
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 600;
	list-style: none;
	width: fit-content;
}

details summary::-webkit-details-marker {
	display: none;
}

details summary::before {
	content: "+ ";
	display: inline-block;
	width: 1em;
}

details[open] > summary::before {
	content: "− ";
}

details.more .news {
	margin-top: 0.5rem;
}

/* Research themes */

.themes {
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theme h3 {
	font-size: 1.15rem;
	margin-bottom: 0.5rem;
}

.theme p {
	color: var(--muted);
	font-size: 0.95rem;
	margin-bottom: 0.5rem;
}

.theme .work {
	color: var(--accent);
	font-size: 0.82rem;
	font-weight: 700;
	margin: 0;
}

.section .ahead {
	margin: 1.75rem 0 0 0;
}

/* Publications */

.pub {
	display: grid;
	gap: 1.75rem;
	grid-template-columns: 220px minmax(0, 1fr);
	padding: 1.5rem 0;
}

.pub + .pub {
	border-top: 1px dashed var(--line);
}

.pub-media {
	align-self: start;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 10px;
	display: block;
	overflow: hidden;
}

.pub h3 {
	font-size: 1.2rem;
	line-height: 1.3;
	margin-bottom: 0.4rem;
}

.pub h3 a {
	color: var(--text);
}

.authors {
	color: var(--muted);
	font-size: 0.9rem;
	margin-bottom: 0.4rem;
}

.authors strong {
	color: var(--text);
}

.venue {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	font-size: 0.85rem;
	gap: 0.5rem;
	margin-bottom: 0.6rem;
}

.venue b {
	color: var(--accent);
	font-weight: 700;
}

.venue span {
	color: var(--faint);
}

.tag {
	background: var(--accent-soft);
	border-radius: 999px;
	color: var(--accent);
	font-size: 0.72rem;
	font-weight: 700;
	padding: 0.1rem 0.55rem;
}

.tldr {
	font-size: 0.95rem;
	margin-bottom: 0.7rem;
}

.pub-links {
	display: flex;
	flex-wrap: wrap;
	font-size: 0.88rem;
	font-weight: 600;
	gap: 0.3rem 1rem;
	margin-bottom: 0.4rem;
}

.pub details {
	margin-top: 0.3rem;
}

.pub details p {
	color: var(--muted);
	font-size: 0.92rem;
	margin: 0.5rem 0 0 0;
}

.pub details pre {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--muted);
	font-family: var(--mono);
	font-size: 0.75rem;
	line-height: 1.5;
	margin: 0.5rem 0 0 0;
	overflow-x: auto;
	padding: 0.8rem 1rem;
}

.pub-extras {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.25rem;
}

.pub-extras details[open] {
	flex-basis: 100%;
}

/* Experience */

.timeline {
	list-style: none;
	margin: 0;
	padding: 0;
}

.timeline li {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: 6.5rem minmax(0, 1fr);
	padding: 0.75rem 0;
}

.timeline h3 {
	font-family: var(--sans);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0;
	margin-bottom: 0.15rem;
}

.timeline p {
	color: var(--muted);
	font-size: 0.93rem;
	margin: 0;
}

/* Footer */

.footer {
	border-top: 1px solid var(--line);
	color: var(--faint);
	font-size: 0.85rem;
	padding: 2rem 0 3rem 0;
}

/* Responsive */

@media (max-width: 760px) {
	.intro {
		gap: 1.5rem;
		grid-template-columns: minmax(0, 1fr);
		padding-top: 2.5rem;
	}

	.intro h1 {
		font-size: 1.8rem;
	}

	.statement {
		font-size: 1.12rem;
	}

	.themes {
		gap: 1.5rem;
		grid-template-columns: minmax(0, 1fr);
	}

	.pub {
		gap: 1rem;
		grid-template-columns: minmax(0, 1fr);
	}

	.pub-media {
		max-width: 420px;
	}
}

@media (max-width: 600px) {
	.wrap {
		padding: 0 16px;
	}

	.nav a {
		display: none;
	}

	.news li,
	.timeline li {
		gap: 0.1rem;
		grid-template-columns: minmax(0, 1fr);
	}

	.section {
		padding: 2.25rem 0;
	}
}

/* Character: hero backdrop, markers, panels, timeline dots */

.hero-bg {
	background:
		radial-gradient(60% 80% at 85% 0%, var(--glow), transparent 70%),
		radial-gradient(40% 60% at 0% 100%, var(--glow-2), transparent 70%);
	border-bottom: 1px solid var(--line);
	position: relative;
}

.hero-bg::before {
	background-image: radial-gradient(var(--dot) 1px, transparent 1px);
	background-size: 22px 22px;
	content: "";
	inset: 0;
	-webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
	mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
	pointer-events: none;
	position: absolute;
}

.hero-bg .intro {
	position: relative;
}

:root {
	--glow: rgba(31, 95, 168, 0.12);
	--glow-2: rgba(196, 120, 60, 0.08);
	--dot: rgba(27, 35, 48, 0.12);
	--panel: rgba(31, 95, 168, 0.05);
}

:root[data-theme="dark"] {
	--glow: rgba(124, 195, 255, 0.14);
	--glow-2: rgba(255, 170, 110, 0.06);
	--dot: rgba(232, 237, 245, 0.08);
	--panel: rgba(124, 195, 255, 0.05);
}

.section > h2 {
	align-items: center;
	display: flex;
	gap: 0.65rem;
}

.section > h2::before {
	background: var(--accent);
	border-radius: 3px;
	content: "";
	height: 0.8rem;
	transform: rotate(45deg);
	width: 0.8rem;
}

.theme {
	background: var(--panel);
	border: 1px solid transparent;
	border-radius: 14px;
	padding: 1.25rem 1.25rem 1.1rem 1.25rem;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.theme:hover {
	border-color: var(--line);
	transform: translateY(-2px);
}

.theme-icon {
	align-items: center;
	background: var(--accent-soft);
	border-radius: 10px;
	color: var(--accent);
	display: inline-flex;
	font-size: 1.15rem;
	height: 2.3rem;
	justify-content: center;
	margin-bottom: 0.85rem;
	width: 2.3rem;
}

.news li {
	position: relative;
}

.news li::before {
	background: var(--bg);
	border: 2px solid var(--accent);
	border-radius: 50%;
	content: "";
	height: 9px;
	left: 7.05rem;
	position: absolute;
	top: 0.72rem;
	width: 9px;
	z-index: 1;
}

.news li::after {
	background: var(--line);
	bottom: -0.35rem;
	content: "";
	left: calc(7.05rem + 4px);
	position: absolute;
	top: 0.35rem;
	width: 1px;
}

.news li:last-child::after {
	bottom: auto;
	height: 0.8rem;
}

.news li > span:last-child {
	padding-left: 1.4rem;
}

.pub-media img {
	transition: transform 0.35s ease;
}

.pub-media {
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.pub-media:hover {
	box-shadow: var(--shadow);
	transform: translateY(-2px);
}

.pub-media:hover img {
	transform: scale(1.03);
}

@media (max-width: 600px) {
	.news li::before,
	.news li::after {
		display: none;
	}

	.news li > span:last-child {
		padding-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.theme,
	.pub-media,
	.pub-media img {
		transition: none;
	}
}

#news {
	border-top: 0;
}

/* Intro: photo column, selected work row */

.intro {
	grid-template-columns: 270px minmax(0, 1fr);
	padding-bottom: 2.5rem;
}

.intro h1 {
	margin-bottom: 0.75rem;
}

.avatar {
	display: block;
}

.avatar img {
	aspect-ratio: 1;
	border-radius: 50%;
	box-shadow: var(--shadow);
	height: 270px;
	object-fit: cover;
	object-position: center 22%;
	width: 270px;
}

.featured {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	padding: 0 0 3rem 0;
	position: relative;
}

.featured-label {
	color: var(--faint);
	font-size: 0.72rem;
	font-weight: 700;
	grid-column: 1 / -1;
	letter-spacing: 0.12em;
	margin: 0;
	text-transform: uppercase;
}

.feat {
	background: color-mix(in srgb, var(--surface) 85%, transparent);
	border: 1px solid var(--line);
	border-radius: 14px;
	color: var(--text);
	display: grid;
	gap: 0.85rem;
	grid-template-columns: 96px minmax(0, 1fr);
	padding: 0.75rem;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.feat:hover {
	border-color: var(--accent);
	text-decoration: none;
	transform: translateY(-2px);
}

.feat img {
	aspect-ratio: 4 / 3;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 8px;
	object-fit: cover;
	width: 96px;
}

.feat span {
	display: grid;
	align-content: start;
	line-height: 1.35;
}

.feat b {
	font-size: 0.95rem;
}

.feat em {
	color: var(--accent);
	font-size: 0.75rem;
	font-style: normal;
	font-weight: 700;
}

.feat small {
	color: var(--muted);
	font-size: 0.8rem;
	margin-top: 0.2rem;
}

@media (max-width: 900px) {
	.featured {
		grid-template-columns: minmax(0, 1fr);
		max-width: 560px;
	}
}

@media (max-width: 767px) {
	.intro {
		grid-template-columns: minmax(0, 1fr);
	}

	.avatar img {
		height: 200px;
		margin: 0 auto;
		width: 200px;
	}
}
