/* Fonts are loaded via <link> tags in each page head so the fetch is not serialized behind this stylesheet. */

/* ---------- Base tokens & elements ---------- */

:root {
	font-family: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
	color: var(--ink);
	background: var(--background);
	color-scheme: light;
	--background: #f7fbff;
	--surface: #ffffff;
	--surface-muted: #eaf3ff;
	--surface-translucent: rgba(255, 255, 255, 0.86);
	--panel-bg: rgba(255, 255, 255, 0.82);
	--header-bg: rgba(247, 251, 255, 0.84);
	--ink: #102033;
	--muted: #4d6685;
	--primary: #1f6feb;
	--primary-strong: #0a52bd;
	--on-primary: #ffffff;
	--focus: #0b70ff;
	--line: rgba(31, 111, 235, 0.2);
	--glow-primary: rgba(31, 111, 235, 0.18);
	--shadow: 0 24px 70px rgba(16, 32, 51, 0.14);
	--motion-fast: 160ms ease;
	--motion-theme: 260ms ease;
	--hero-ink: #ffffff;
	--hero-muted: rgba(255, 255, 255, 0.86);
	--hero-accent: #9dccff;
	--hero-border: rgba(255, 255, 255, 0.72);
	--hero-overlay-start: rgba(5, 33, 72, 0.86);
	--hero-overlay-mid: rgba(5, 64, 132, 0.62);
	--hero-overlay-end: rgba(5, 64, 132, 0.08);
	--paper: var(--surface);
	--mist: var(--surface-muted);
	--sage: var(--primary);
	--oxblood: var(--primary-strong);
	--brass: var(--focus);
	--blueprint: var(--muted);
}

:root[data-theme='dark'] {
	color-scheme: dark;
	--background: #050507;
	--surface: #101014;
	--surface-muted: #1b131b;
	--surface-translucent: rgba(16, 16, 20, 0.86);
	--panel-bg: rgba(18, 16, 22, 0.88);
	--header-bg: rgba(5, 5, 7, 0.82);
	--ink: #fff5fb;
	--muted: #d8b9cc;
	--primary: #ff4fa3;
	--primary-strong: #ff7ac2;
	--on-primary: #1d0611;
	--focus: #ff8ec8;
	--line: rgba(255, 79, 163, 0.28);
	--glow-primary: rgba(255, 79, 163, 0.22);
	--shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
	--hero-ink: #fff5fb;
	--hero-muted: rgba(255, 245, 251, 0.84);
	--hero-accent: #ff9bd0;
	--hero-border: rgba(255, 245, 251, 0.72);
	--hero-overlay-start: rgba(5, 5, 7, 0.92);
	--hero-overlay-mid: rgba(52, 10, 32, 0.72);
	--hero-overlay-end: rgba(255, 79, 163, 0.1);
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-width: 320px;
	background:
		radial-gradient(circle at 12% 0%, var(--glow-primary), transparent 30rem),
		linear-gradient(120deg, var(--background) 0%, var(--surface) 54%, var(--surface-muted) 100%);
	color: var(--ink);
	transition:
		background var(--motion-theme),
		color var(--motion-theme);
}

a {
	color: inherit;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.24em;
	transition:
		background-color var(--motion-fast),
		border-color var(--motion-fast),
		color var(--motion-fast);
}

button {
	transition:
		background-color var(--motion-fast),
		border-color var(--motion-fast),
		box-shadow var(--motion-fast),
		color var(--motion-fast),
		opacity var(--motion-fast),
		transform var(--motion-fast);
}

a:focus-visible,
button:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 4px;
}

h1,
h2,
h3 {
	font-family: 'Fraunces', Georgia, serif;
	letter-spacing: 0;
	/* Sub-1 line-height makes stacked Vietnamese diacritics collide on wrapped headings. */
	line-height: 1.08;
}

h1 {
	max-width: 11ch;
	margin: 0;
	font-size: clamp(3.4rem, 11vw, 8.8rem);
}

h2 {
	margin: 0 0 1rem;
	font-size: clamp(2rem, 5vw, 4.8rem);
}

h3 {
	margin: 0 0 0.75rem;
	font-size: clamp(1.35rem, 3vw, 2.1rem);
}

p {
	line-height: 1.7;
}

ul {
	margin: 0;
	padding-left: 1.25rem;
}

li + li {
	margin-top: 0.65rem;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 1ms !important;
		scroll-behavior: auto !important;
		transition-duration: 1ms !important;
	}
}

@media (max-width: 720px) {
	h1 {
		font-size: clamp(3rem, 18vw, 5rem);
	}
}

/* ---------- Layout: header, nav, theme switch ---------- */

.skip-link {
	position: fixed;
	left: 1rem;
	top: 1rem;
	z-index: 20;
	transform: translateY(-140%);
	background: var(--primary);
	color: var(--on-primary);
	padding: 0.75rem 1rem;
	border-radius: 8px;
}

.skip-link:focus {
	transform: translateY(0);
}

.site-shell {
	width: min(1120px, calc(100% - 32px));
	margin-inline: auto;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1rem;
	border-bottom: 1px solid var(--line);
	background: var(--header-bg);
	backdrop-filter: blur(18px);
	transition:
		background-color var(--motion-theme),
		border-color var(--motion-theme),
		box-shadow var(--motion-theme);
}

.brand-mark,
nav {
	display: flex;
	align-items: center;
	gap: 0.8rem;
}

.brand-mark {
	font-weight: 700;
	line-height: 1.1;
	text-decoration: none;
}

.brand-seal {
	display: grid;
	width: 2.25rem;
	height: 2.25rem;
	place-items: center;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: var(--paper);
	color: var(--primary);
	font-family: 'Fraunces', Georgia, serif;
	transition:
		background-color var(--motion-theme),
		border-color var(--motion-theme),
		color var(--motion-theme);
}

.header-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 1rem;
	flex-wrap: wrap;
}

nav a {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	padding: 0.55rem 0.72rem;
	border: 1px solid transparent;
	border-radius: 8px;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
}

nav a:hover {
	background: var(--surface-muted);
	border-color: var(--line);
}

nav a.active {
	background: var(--primary);
	color: var(--on-primary);
}

.preference-controls {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.segmented-control {
	display: flex;
	gap: 0.2rem;
	padding: 0.2rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface-translucent);
	box-shadow: 0 1px 0 var(--line);
	transition:
		background-color var(--motion-theme),
		border-color var(--motion-theme),
		box-shadow var(--motion-theme);
}

.segmented-control button {
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--ink);
	cursor: pointer;
	font: inherit;
	font-size: 1.08rem;
	font-weight: 700;
	line-height: 1;
	touch-action: manipulation;
}

.segmented-control button:hover {
	background: var(--surface-muted);
}

.segmented-control button:active {
	transform: scale(0.96);
}

.segmented-control button.active {
	background: var(--primary);
	color: var(--on-primary);
	box-shadow: 0 10px 24px var(--glow-primary);
}

.emoji-icon {
	font-family:
		'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', sans-serif;
}

@media (max-width: 720px) {
	.site-header {
		align-items: flex-start;
		flex-direction: column;
	}

	.header-actions,
	.preference-controls {
		width: 100%;
		justify-content: space-between;
	}

	nav {
		max-width: 100%;
		flex-wrap: wrap;
	}
}

/* ---------- Shared content blocks ---------- */

/* Big section titles for the JD and CV blocks on the single-page layout:
   smaller than the home h1 but clearly above regular h2 headings. */
.page-title {
	max-width: 12ch;
	margin: 0;
	font-size: clamp(2.8rem, 8vw, 6.4rem);
}

/* Keep anchor targets clear of the sticky header when navigating with #hash links. */
section[id] {
	scroll-margin-top: 5.5rem;
}

.eyebrow {
	margin: 0 0 1rem;
	/* --primary fails WCAG AA (4.46:1) on the light background at this size; --primary-strong passes in both themes. */
	color: var(--primary-strong);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.lead {
	max-width: 42rem;
	font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.button-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	margin-top: 2rem;
}

.button {
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 1.1rem;
	border: 1px solid var(--primary);
	border-radius: 8px;
	background: var(--primary);
	color: var(--on-primary);
	font-weight: 700;
	text-decoration: none;
	transition:
		transform 180ms ease,
		background 180ms ease;
}

.button:hover {
	transform: translateY(-2px);
	border-color: var(--primary-strong);
	background: var(--primary-strong);
	color: var(--on-primary);
}

.button.secondary {
	background: transparent;
	color: var(--primary-strong);
}

.page-section {
	padding-block: clamp(3rem, 8vw, 6.5rem);
}

.section-grid {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
	gap: clamp(2rem, 7vw, 6rem);
	align-items: start;
}

.panel-list {
	display: grid;
	gap: 1rem;
}

.panel {
	border-left: 4px solid var(--sage);
	border-radius: 8px;
	background: var(--panel-bg);
	padding: clamp(1.1rem, 3vw, 1.6rem);
	box-shadow: 0 1px 0 var(--line);
	transition:
		background-color var(--motion-theme),
		border-color var(--motion-theme),
		box-shadow var(--motion-theme),
		color var(--motion-theme);
}

.panel.strong {
	border-color: var(--oxblood);
	box-shadow: var(--shadow);
}

.meta-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1px;
	margin-top: 2rem;
	overflow: hidden;
	border-radius: 8px;
	background: var(--line);
	transition: background-color var(--motion-theme);
}

.meta-grid > div {
	background: var(--panel-bg);
	padding: 1rem;
	transition: background-color var(--motion-theme);
}

.meta-grid span {
	display: block;
	color: var(--muted);
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
}

@media (max-width: 720px) {
	.section-grid,
	.meta-grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- Home page ---------- */

.home-hero {
	min-height: min(760px, 82dvh);
	display: flex;
	align-items: center;
	margin-top: -5rem;
	padding-top: 6rem;
	background-position: center;
	background-size: cover;
	/* The image URL resolves relative to this stylesheet inside assets/. */
	background-image:
		linear-gradient(
			90deg,
			var(--hero-overlay-start),
			var(--hero-overlay-mid),
			var(--hero-overlay-end)
		),
		url('dating-application-hero-background.webp');
	color: var(--hero-ink);
}

.hero-copy {
	padding-block: clamp(5rem, 12vw, 8rem);
}

.hero-copy .lead {
	margin-top: 1.5rem;
	color: var(--hero-muted);
}

.hero-copy .eyebrow {
	color: var(--hero-accent);
}

.hero-copy .button.secondary {
	border-color: var(--hero-border);
	color: var(--hero-ink);
}

/* ---------- JD page ---------- */

.jd-hero {
	padding-top: clamp(4rem, 10vw, 8rem);
}

/* ---------- CV page ---------- */

.cv-hero {
	padding-top: clamp(4rem, 10vw, 8rem);
}

.facts-list {
	display: grid;
	gap: 1px;
	overflow: hidden;
	border-radius: 8px;
	background: var(--line);
	transition: background-color var(--motion-theme);
}

.facts-list div {
	display: grid;
	grid-template-columns: minmax(9rem, 0.7fr) 1fr;
	gap: 1rem;
	background: var(--panel-bg);
	padding: 1rem;
	transition: background-color var(--motion-theme);
}

.facts-list dt {
	color: var(--blueprint);
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
}

.facts-list dd {
	margin: 0;
	font-weight: 700;
}

@media (max-width: 620px) {
	.facts-list div {
		grid-template-columns: 1fr;
	}
}
