/* site.css — styles for yashgarg98.github.io */

:root {
	--bg: #ffffff;
	--surface: #f6f7f9;
	--text: #1d2330;
	--muted: #5d6676;
	--border: #e3e6eb;
	--accent: #1a5fb4;
	--accent-soft: #e8f0fb;
	--max: 900px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #12151b;
		--surface: #1a1f27;
		--text: #e4e7ec;
		--muted: #9aa3b2;
		--border: #2a313c;
		--accent: #7fb0f0;
		--accent-soft: #1d2a3d;
		color-scheme: dark;
	}
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

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

img { max-width: 100%; }

.wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding-inline: 20px;
}

/* ---------- top bar ---------- */
.topbar {
	position: sticky;
	top: 0;
	z-index: 10;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--border);
}

.nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 56px;
}

.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.brand:hover { text-decoration: none; }

.nav-links {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	scrollbar-width: none;
	min-width: 0;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
	display: block;
	padding: 6px 10px;
	border-radius: 6px;
	color: var(--muted);
	font-size: 0.92rem;
	white-space: nowrap;
}
.nav-links a:hover { background: var(--surface); color: var(--text); text-decoration: none; }

/* ---------- sections ---------- */
section { padding-block: 36px; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }

h1 { font-size: 2rem; margin: 0 0 4px; line-height: 1.2; }
h2 { font-size: 1.35rem; margin: 0 0 18px; }
h3 { font-size: 1.02rem; margin: 0; line-height: 1.4; }
h3.minor { font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }

p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* ---------- hero ---------- */
.hero {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 36px;
	align-items: start;
	padding-top: 48px;
}

.headshot {
	width: 220px;
	aspect-ratio: 787 / 915;
	object-fit: cover;
	border-radius: 12px;
	border: 1px solid var(--border);
}

.role { color: var(--muted); margin-bottom: 8px; }
.email { color: var(--muted); font-size: 0.95rem; margin-bottom: 12px; }
.email i { margin-right: 6px; }

.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.socials a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text);
	font-size: 0.9rem;
}
.socials a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.socials i { font-size: 1rem; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 16px 0 0; }
.tags li {
	background: var(--accent-soft);
	color: var(--accent);
	padding: 3px 10px;
	border-radius: 6px;
	font-size: 0.82rem;
	font-weight: 500;
}

/* ---------- news ---------- */
.news { list-style: none; padding: 0; margin: 0; }
.news li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 6px 0; }
.news .date { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; padding-top: 1px; }

/* ---------- publications ---------- */
.pub {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 20px;
	padding: 16px 0;
}
.pub + .pub { border-top: 1px dashed var(--border); }

.venue-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	height: 76px;
	border-radius: 8px;
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--accent);
	font-weight: 700;
	font-size: 0.9rem;
	line-height: 1.3;
}

.thumb {
	width: 120px;
	border-radius: 8px;
	border: 1px solid var(--border);
}

.pub h3 { margin-bottom: 4px; }
.authors { margin: 0 0 2px; font-size: 0.93rem; color: var(--muted); }
.authors b { color: var(--text); }
.venue { margin: 0 0 6px; font-size: 0.93rem; }
.links { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.links a {
	font-size: 0.82rem;
	padding: 2px 10px;
	border: 1px solid var(--border);
	border-radius: 6px;
}
.links a:hover { border-color: var(--accent); text-decoration: none; }

/* ---------- experience / education ---------- */
.entry { margin-bottom: 22px; }
.entry:last-child { margin-bottom: 0; }
.entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.when { color: var(--muted); font-size: 0.9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sub { color: var(--muted); font-size: 0.93rem; margin: 2px 0 6px; }
.entry ul { margin: 0; padding-left: 20px; }
.entry li { margin-bottom: 4px; font-size: 0.95rem; }

/* ---------- service ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 3px 0; font-size: 0.95rem; }

/* ---------- footer ---------- */
.footer {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	padding-block: 28px 40px;
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: 0.85rem;
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
	.hero { grid-template-columns: 1fr; gap: 20px; padding-top: 28px; }
	.headshot { width: 160px; }
	.brand { display: none; }
	.nav { justify-content: flex-start; }
	.pub { grid-template-columns: 1fr; gap: 10px; }
	.venue-badge { height: auto; width: fit-content; padding: 2px 10px; font-size: 0.8rem; }
	.venue-badge br { display: none; }
	.two-col { grid-template-columns: 1fr; gap: 20px; }
	.news li { grid-template-columns: 1fr; gap: 0; }
}
