/* ---------------------------------------------------------------
   Chia-chun Liang (Anna), personal site
   Single stylesheet, no external dependencies.
   --------------------------------------------------------------- */

:root {
	--bg:          #fbfaf8;
	--surface:     #ffffff;
	--border:      #e5e1da;
	--text:        #232323;
	--text-muted:  #6b6862;
	--accent:      #7a5c3e;
	--accent-soft: #f0eae2;
	--radius:      10px;
	--maxw:        780px;
	--serif:       "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
	--sans:        -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC",
	               "Microsoft JhengHei", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg:          #171614;
		--surface:     #1f1e1b;
		--border:      #35322d;
		--text:        #eae7e1;
		--text-muted:  #a29d94;
		--accent:      #d3ab7f;
		--accent-soft: #2a2622;
	}
}

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.7;
	overflow-wrap: break-word;
}

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { border-bottom-color: var(--accent); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; }

/* --- Layout ------------------------------------------------------ */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

section { padding: 3rem 0; border-top: 1px solid var(--border); }
section:first-of-type { border-top: 0; }

section > h2 {
	margin: 0 0 1.5rem;
	font-size: 1.05rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--text-muted);
	font-family: var(--sans);
	font-weight: 600;
}

/* --- Header ------------------------------------------------------ */

header.hero { padding: 5rem 0 3rem; }

.hero h1 { margin: 0 0 .35rem; font-size: 2.5rem; letter-spacing: -.015em; }
.hero .role { margin: 0; color: var(--text-muted); font-size: 1.05rem; }
.hero .affiliation { margin: .2rem 0 0; color: var(--text-muted); font-size: 1.05rem; }

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

.links a {
	display: inline-block;
	padding: .3rem .8rem;
	font-size: .88rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text-muted);
	background: var(--surface);
	transition: color .15s, border-color .15s;
}

.links a:hover { color: var(--accent); border-color: var(--accent); }

/* --- Prose ------------------------------------------------------- */

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

.lead { font-size: 1.06rem; }

/* --- Research interest cards ------------------------------------- */

.topics { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.topic {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.15rem 1.25rem;
}

.topic h3 { margin: 0 0 .4rem; font-size: 1.08rem; }
.topic p  { margin: 0; font-size: .95rem; color: var(--text-muted); }

/* --- Publications / projects ------------------------------------- */

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

.entries > li { padding: 1.1rem 0; border-bottom: 1px solid var(--border); }
.entries > li:first-child { padding-top: 0; }
.entries > li:last-child  { border-bottom: 0; padding-bottom: 0; }

.entry-title { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; display: block; }
.entry-meta  { font-size: .92rem; color: var(--text-muted); }
.entry-meta em { font-style: italic; }

.tags { margin-top: .45rem; display: flex; flex-wrap: wrap; gap: .35rem; }

.tag {
	font-size: .76rem;
	letter-spacing: .04em;
	padding: .12rem .55rem;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--text-muted);
}

/* --- Footer ------------------------------------------------------ */

footer {
	border-top: 1px solid var(--border);
	padding: 2.5rem 0 3.5rem;
	font-size: .87rem;
	color: var(--text-muted);
}

footer p { margin: 0 0 .4rem; }

/* --- Small screens ----------------------------------------------- */

@media (max-width: 560px) {
	body { font-size: 16px; }
	header.hero { padding: 3.25rem 0 2rem; }
	.hero h1 { font-size: 2rem; }
	section { padding: 2.5rem 0; }
}
