/* =========================================================================
   Hope Kean — site styles
   Clean, self-contained CSS (replaces the HTML5 UP / skel framework).
   ========================================================================= */

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

:root {
	--ink: #1f1f1f;
	--ink-strong: #0b0b0b;
	--muted: #6e6e6e;
	--line: #e4e4e4;
	--rule: #c6c6c6;
	--tint: #f5f5f5;
	--underline: #b9b9b9;
	--page: #ffffff;
	--surface: #ffffff;
	--surface-img: #efefef;
	--body-text: #3d3d3d;
	--lead-text: #3a3a3a;
	--authors: #5f5f5f;
	--nav-bg: rgba(255, 255, 255, 0.92);
	--nav-link: #4a4a4a;
	--hover-border: #c6c6c6;
	--card-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
	--hero-lead: #2e2e2e;
	--footer-bg: #111111;
	--footer-text: #c9c9c9;
	--footer-copy: #8a8a8a;
	--sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* --- Dark theme (default; toggled via the nav button) -------------------- */
:root[data-theme="dark"] {
	color-scheme: dark;
	--ink: #e6e6e6;
	--ink-strong: #ffffff;
	--muted: #9a9a9a;
	--line: #2b2b2b;
	--rule: #4a4a4a;
	--tint: #131313;
	--underline: #6d6d6d;
	--page: #0a0a0a;
	--surface: #151515;
	--surface-img: #1e1e1e;
	--body-text: #c0c0c0;
	--lead-text: #cccccc;
	--authors: #a3a3a3;
	--nav-bg: rgba(10, 10, 10, 0.9);
	--nav-link: #b5b5b5;
	--hover-border: #5a5a5a;
	--card-shadow: none;
	--hero-lead: #f2f2f2;
	--footer-bg: #000000;
	--footer-text: #c2c2c2;
	--footer-copy: #7d7d7d;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-size: 112.5%; }

body {
	margin: 0;
	font-family: var(--sans);
	font-size: 1rem;
	line-height: 1.62;
	color: var(--ink);
	background: var(--page);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

/* Monochrome links: underline carries the affordance, not color. */
a {
	color: var(--ink-strong);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.16em;
	text-decoration-color: var(--underline);
	transition: text-decoration-color .15s ease, color .15s ease;
}
a:hover { color: var(--ink-strong); text-decoration-color: currentColor; }

h1, h2, h3 { color: var(--ink-strong); letter-spacing: -0.022em; }

[id] { scroll-margin-top: 72px; }

/* --- Layout ------------------------------------------------------------- */
.container { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }

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

.section__title {
	display: block;
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: -0.025em;
	color: var(--ink-strong);
	text-align: center;
	margin: 0 0 1.4rem;
}

.section__lead {
	font-size: 1.1rem;
	color: var(--lead-text);
	text-align: center;
	margin: 0 auto 2.5rem;
	max-width: 62ch;
}

/* --- Nav ---------------------------------------------------------------- */
.nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--nav-bg);
	backdrop-filter: saturate(140%) blur(8px);
	-webkit-backdrop-filter: saturate(140%) blur(8px);
	border-bottom: 1px solid var(--line);
}
.nav__inner {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0.7rem 1.5rem;
	display: flex;
	align-items: center;
	gap: 1rem;
}
.nav__brand { font-weight: 700; font-size: 1.05rem; color: var(--ink-strong); text-decoration: none; letter-spacing: -0.02em; }
.nav__links { display: flex; gap: 1.4rem; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav__links a { color: var(--nav-link); font-weight: 500; font-size: 0.95rem; text-decoration: none; }
.nav__links a:hover { color: var(--ink-strong); }

/* Theme toggle */
.theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	margin-left: 0.35rem;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: transparent;
	color: var(--nav-link);
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { color: var(--ink-strong); border-color: var(--hover-border); }
.theme-toggle__ic { width: 1rem; height: 1rem; display: block; }
/* Show the icon for the theme you would switch *to*. */
.theme-toggle__ic--sun { display: none; }
:root[data-theme="dark"] .theme-toggle__ic--sun { display: block; }
:root[data-theme="dark"] .theme-toggle__ic--moon { display: none; }

/* --- Hero --------------------------------------------------------------- */
.hero { padding: 2.5rem 0 2.25rem; }
.hero__inner { display: flex; gap: 2.5rem; align-items: center; }
.hero__photo { flex: 0 0 246px; }
.hero__photo img { width: 100%; height: auto; border-radius: 50%; }
.hero__body { flex: 1; min-width: 0; }
.hero h1 { font-size: 2.25rem; font-weight: 600; letter-spacing: -0.03em; margin: 0 0 0.55rem; }
.hero__lead { font-size: 1.08rem; font-weight: 600; color: var(--hero-lead); margin: 0 0 0.9rem; letter-spacing: -0.01em; }
.hero p { margin: 0 0 0.9rem; font-size: 0.95rem; }
.hero__links { font-weight: 600; }

/* --- Research cards ----------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 4px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { border-color: var(--hover-border); box-shadow: var(--card-shadow); }
.card__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-img); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 1.1rem 1.25rem 1.35rem; }
.card__label {
	margin: 0 0 0.4rem;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
}
.card__title { font-size: 1.1rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; margin: 0 0 0.55rem; }
.card p { margin: 0; font-size: 0.94rem; color: var(--body-text); }
/* Link row pins to the bottom so it lines up across cards of unequal length. */
.card .card__links { margin-top: auto; padding-top: 0.85rem; font-size: 0.88rem; color: var(--muted); }

/* --- Publications (narrower reading column) ----------------------------- */
.pubs .container { max-width: 820px; }
.scholar-link { font-weight: 600; margin: 0 0 1.5rem; }

.pub-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.pub-list li { margin: 0 0 1.35rem; padding-bottom: 1.35rem; border-bottom: 1px solid var(--line); color: var(--ink); }
.pub-list li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }

/* Line 1 — title: darkest, bold, most readable (carries the content) */
.pub-title-line { display: block; }
.pub-title { font-weight: 700; font-size: 1.06em; line-height: 1.4; letter-spacing: -0.015em; color: var(--ink-strong); }
a.pub-title { color: var(--ink-strong); text-decoration: none; }
a.pub-title:hover { color: var(--ink-strong); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }

/* Line 2 — authors */
.pub-authors-line { display: block; margin-top: 0.22rem; font-size: 0.92em; line-height: 1.5; color: var(--authors); }
.pub-authors strong { color: var(--ink); font-weight: 700; }

/* Line 3 — venue + PDF */
.pub-venue-line { display: block; margin-top: 0.1rem; font-size: 0.92em; line-height: 1.5; color: var(--muted); }
.pub-venue { font-style: italic; }
.pdf-link { display: inline-block; text-decoration: none; }

.subhead {
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--ink-strong);
	margin: 2.5rem 0 1.25rem;
	padding-top: 1.75rem;
	border-top: 1px solid var(--rule);
}

.pdf-ic { width: 0.95em; height: 0.95em; color: var(--muted); vertical-align: -0.1em; margin-left: 0.25rem; transition: color 0.15s ease; }
a:hover .pdf-ic { color: var(--ink-strong); }

/* --- Press & media grid ------------------------------------------------- */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.media-tile {
	display: block;
	border: 1px solid var(--line);
	border-radius: 4px;
	overflow: hidden;
	background: var(--surface);
	text-decoration: none;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.media-tile:hover { border-color: var(--hover-border); box-shadow: var(--card-shadow); }
.media-thumb { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: top center; background: var(--surface-img); }

/* --- Contact / footer --------------------------------------------------- */
.contact { background: var(--footer-bg); color: var(--footer-text); text-align: center; padding: 3.25rem 0; }
.contact h2 { color: #fff; font-size: 1.5rem; font-weight: 700; margin: 0 0 1.25rem; }
.contact img, .contact__anim { display: inline-block; width: 100%; max-width: 280px; height: auto; border-radius: 4px; margin: 0 auto 1.25rem; }
.contact a { color: #fff; text-decoration-color: #777; }
.contact a:hover { color: #fff; text-decoration-color: #fff; }
.contact__copy { font-size: 0.85rem; color: var(--footer-copy); margin-top: 1.75rem; }
.contact__copy a { color: #b0b0b0; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
	.cards, .media-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
	html { font-size: 103%; }
	.hero__inner { flex-direction: column; align-items: stretch; }
	.hero__photo { flex: 0 0 auto; align-self: center; max-width: 220px; }
	.cards, .media-grid { grid-template-columns: 1fr; }
	.section { padding: 2.75rem 0; }
	.section__title { font-size: 1.7rem; }
	.nav__brand { display: none; }
	.nav__links { gap: 1rem; }
	.nav__links a { font-size: 0.88rem; }
}
