/* ==========================================================================
   NGScopes — stylesheet
   One file, no build step, no dependencies.
   Edit the custom properties in :root to restyle the whole site.
   ========================================================================== */

/* --- Fonts (self-hosted, no external requests) --------------------------- */

@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 300 800;
	font-display: swap;
	src: url('../fonts/inter-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
		U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
		U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 300 800;
	font-display: swap;
	src: url('../fonts/inter-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
		U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
		U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Design tokens ------------------------------------------------------- */

:root {
	--bg:           #0f2027;
	--bg-deep:      #0a1519;
	--surface:      rgba(255, 255, 255, 0.04);
	--surface-hi:   rgba(255, 255, 255, 0.07);
	--border:       rgba(255, 255, 255, 0.10);
	--border-hi:    rgba(0, 224, 198, 0.45);

	--text:         #eef5f6;
	--text-muted:   rgba(238, 245, 246, 0.68);
	--text-faint:   rgba(238, 245, 246, 0.45);

	--accent:       #00e0c6;
	--accent-deep:  #00b39e;
	--accent-glow:  rgba(0, 224, 198, 0.35);
	--warn:         #ff9478;

	--font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
	                Roboto, Helvetica, Arial, sans-serif;

	--wrap:         1120px;
	--wrap-narrow:  760px;
	--radius:       14px;
	--radius-lg:    20px;

	--space-section: clamp(4rem, 9vw, 7rem);
	--header-h:      68px;
}

/* --- Reset --------------------------------------------------------------- */

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 1rem);
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	/* Column layout with a growing <main>: on short pages the footer sits at
	   the bottom of the viewport instead of floating mid-screen. */
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	font-family: var(--font);
	font-weight: 300;
	font-size: 17px;
	line-height: 1.7;
	color: var(--text);
	background: var(--bg);
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
	margin: 0 0 0.6em;
	text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

p  { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

a {
	color: var(--accent);
	text-decoration: none;
	transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover { color: var(--text); }

ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.5em; }

strong { font-weight: 600; }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

/* --- Ambient background glow ---------------------------------------------
   A plain radial gradient, deliberately without filter: blur(). A large
   blurred layer forces an expensive repaint on every scroll frame; a gradient
   costs nothing and looks the same. Only opacity/transform are animated, so
   the compositor handles it.
   ------------------------------------------------------------------------ */

.glow {
	position: fixed;
	inset: -20vh -10vw auto -10vw;
	height: 120vh;
	background:
		radial-gradient(60% 55% at 50% 22%, rgba(0, 224, 198, 0.20), transparent 70%),
		radial-gradient(80% 60% at 50% 0%, rgba(32, 58, 67, 0.75), transparent 75%);
	pointer-events: none;
	will-change: opacity;
	z-index: 0;
	animation: glowPulse 16s ease-in-out infinite alternate;
}

@keyframes glowPulse {
	from { opacity: 0.75; }
	to   { opacity: 1; }
}

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

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

/* A narrow reading column that keeps the same left gutter as full-width
   sections: the outer box stays as wide as .wrap, the content inside is
   constrained. Without this, narrow sections sit further right than wide
   ones and the page edge looks ragged. */
.wrap--narrow > * { max-width: var(--wrap-narrow); }

/* Constrains a text column without re-centring it inside a full-width wrap. */
.measure { max-width: 68ch; }

main {
	position: relative;
	z-index: 1;
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
}

.section { padding-block: var(--space-section); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

.section--alt {
	background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.22) 12%, rgba(0, 0, 0, 0.22) 88%, transparent);
}

.section__label {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 1rem;
}

.lead {
	font-size: clamp(1.05rem, 2vw, 1.25rem);
	color: var(--text-muted);
	max-width: 62ch;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--accent);
	color: var(--bg);
	padding: 0.7rem 1.2rem;
	font-weight: 600;
}
.skip-link:focus { left: 0; }

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

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	height: var(--header-h);
	display: flex;
	align-items: center;
	background: rgba(15, 32, 39, 0.82);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--border);
}

.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.brand { display: flex; align-items: center; }
.brand img { height: 26px; width: auto; }

.site-nav ul {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 2.4vw, 2rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav li { margin: 0; }

.site-nav a {
	color: var(--text-muted);
	font-size: 0.92rem;
	font-weight: 400;
	white-space: nowrap;
}

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

.site-nav a[aria-current="page"] {
	color: var(--text);
	font-weight: 600;
}

.site-nav .nav-cta {
	border: 1px solid var(--border-hi);
	border-radius: 30px;
	padding: 0.4rem 1.05rem;
	color: var(--accent);
	font-weight: 600;
}

.site-nav .nav-cta:hover {
	background: var(--accent);
	color: var(--bg);
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.85rem 1.8rem;
	border-radius: 30px;
	border: 1px solid var(--accent);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--accent);
	background: transparent;
	cursor: pointer;
	transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
	background: var(--accent);
	color: var(--bg);
	box-shadow: 0 0 24px var(--accent-glow);
}

.btn--solid { background: var(--accent); color: var(--bg); }
.btn--solid:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--bg); }

.btn--ghost { border-color: var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--surface-hi); color: var(--text); box-shadow: none; }

.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 2rem;
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
	position: relative;
	padding-block: clamp(4rem, 11vw, 8rem) var(--space-section);
	text-align: center;
}

/* The landing page is a single screen: the hero takes whatever height is
   left over, and the footer closes the page without a scrollbar. */
.hero--full {
	flex: 1 0 auto;
	display: flex;
	align-items: center;
	padding-block: clamp(2.5rem, 7vw, 5rem);
}

.hero--full .wrap { width: 100%; }

.page--landing .site-footer { margin-top: 0; }

.hero__logo {
	height: clamp(46px, 8vw, 70px);
	width: auto;
	margin: 0 auto 2.2rem;
}

.hero h1 { max-width: 20ch; margin-inline: auto; }

.hero .lead { margin-inline: auto; text-align: center; }

.hero .btn-row { justify-content: center; }

.accent { color: var(--accent); }

/* --- Cards --------------------------------------------------------------- */

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

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.75rem;
	transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.card:hover { border-color: var(--border-hi); background: var(--surface-hi); }

.card h3 { margin-bottom: 0.5rem; }

.card p { color: var(--text-muted); font-size: 0.97rem; }

.card__step {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	color: var(--accent);
	margin-bottom: 0.9rem;
}

/* --- Job listings -------------------------------------------------------- */

.job-list { list-style: none; margin: 0; padding: 0; }
.job-list li { margin: 0 0 1rem; }

.job {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.4rem 1.75rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: border-color 0.25s ease, background 0.25s ease;
}

.job:hover { border-color: var(--border-hi); background: var(--surface-hi); }

.job__title { font-size: 1.1rem; font-weight: 600; color: var(--text); margin: 0 0 0.3rem; }

.job__meta {
	font-size: 0.85rem;
	color: var(--text-faint);
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
	margin: 0;
}

.job__cta { font-weight: 600; font-size: 0.92rem; white-space: nowrap; }

/* --- Empty state --------------------------------------------------------- */

.empty-state {
	border: 1px dashed var(--border);
	border-radius: var(--radius);
	padding: clamp(2rem, 5vw, 3rem);
	text-align: center;
	color: var(--text-muted);
}

.empty-state h3 { color: var(--text); }

/* --- Callouts ------------------------------------------------------------ */

.callout {
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent);
	border-radius: var(--radius);
	background: var(--surface);
	padding: 1.5rem 1.75rem;
	color: var(--text-muted);
	font-size: 0.97rem;
}

.callout h3 { color: var(--text); font-size: 1.05rem; }

/* --- Article / legal pages ----------------------------------------------- */

.page-head { padding-block: clamp(3rem, 7vw, 5rem) 1rem; }
.page-head h1 { margin-bottom: 0.5rem; }

/* .prose sits on the same element as .wrap--narrow, which already limits
   the measure of each child — no max-width here, or the whole column would
   shrink and re-centre. */
.prose h2 { margin-top: 2.6rem; font-size: 1.35rem; }
.prose h3 { margin-top: 1.8rem; font-size: 1.05rem; }
.prose address { font-style: normal; color: var(--text-muted); margin-bottom: 1.2em; }
.prose ul { color: var(--text-muted); }
.prose > p { color: var(--text-muted); }

.prose dl { margin: 0 0 1.5rem; }
.prose dt { font-weight: 600; margin-top: 1rem; }
.prose dd { margin: 0 0 0 0; color: var(--text-muted); }

/* --- Contact page & form ------------------------------------------------- */

.contact-layout {
	display: grid;
	gap: 2.5rem;
	grid-template-columns: minmax(0, 1.35fr) minmax(240px, 1fr);
	align-items: start;
}

.contact-aside { display: grid; gap: 1rem; }

.contact-aside .card p { margin: 0; }
.contact-aside address { font-style: normal; color: var(--text-muted); font-size: 0.97rem; }

.contact-card__label {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 0.7rem;
}

.form {
	display: grid;
	gap: 1.25rem;
	max-width: 34rem;
}

.field { display: grid; gap: 0.45rem; }

.field label {
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: var(--text-muted);
}

.field__hint { font-weight: 400; color: var(--text-faint); }

.field input,
.field textarea {
	width: 100%;
	font: inherit;
	font-size: 0.97rem;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 0.75rem 0.9rem;
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.field textarea { resize: vertical; min-height: 8.5rem; }

.field input:hover,
.field textarea:hover { border-color: rgba(255, 255, 255, 0.2); }

.field input:focus,
.field textarea:focus {
	outline: none;
	border-color: var(--accent);
	background: var(--surface-hi);
	box-shadow: 0 0 0 3px rgba(0, 224, 198, 0.15);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--warn); }

/* Honeypot — off-screen for people, still in the DOM for bots. */
.field--trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form__note {
	margin: 0;
	font-size: 0.85rem;
	color: var(--text-faint);
}

.form button { justify-self: start; }

.form__status {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--text-muted);
}

.form__status--success { color: var(--accent); }
.form__status--error { color: var(--warn); }

/* --- CTA band ------------------------------------------------------------ */

.cta-band {
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: linear-gradient(135deg, rgba(0, 224, 198, 0.10), rgba(255, 255, 255, 0.03));
	padding: clamp(2rem, 5vw, 3.25rem);
	text-align: center;
}

.cta-band .lead { margin-inline: auto; }
.cta-band .btn-row { justify-content: center; }

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

.site-footer {
	position: relative;
	z-index: 1;
	flex: none;
	margin-top: var(--space-section);
	border-top: 1px solid var(--border);
	background: var(--bg-deep);
	padding-block: 1.75rem;
	font-size: 0.9rem;
}

.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 2rem;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.75rem;
}

.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }

.footer-meta {
	margin: 0;
	color: var(--text-faint);
	font-size: 0.82rem;
}

/* --- Status badge (preclinical) ------------------------------------------ */

.badge {
	display: inline-flex;
	/* flex-start, not center: when the text wraps to two lines on narrow
	   screens a centred dot floats away from the first line. */
	align-items: flex-start;
	gap: 0.5rem;
	padding: 0.35rem 0.9rem;
	border: 1px solid var(--border);
	border-radius: 30px;
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	color: var(--text-muted);
	background: var(--surface);
	margin-bottom: 1.75rem;
}

.badge::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--accent);
	flex: none;
	margin-top: 0.42em;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 860px) {
	.contact-layout { grid-template-columns: 1fr; }
	.job { flex-direction: column; align-items: flex-start; }
}

/* --- Print --------------------------------------------------------------- */

@media print {
	.glow, .site-header, .btn-row, .cta-band { display: none; }
	body { background: #fff; color: #000; }
}

/* --- Reduced motion ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.glow { animation: none; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* --- Initials avatar (fallback when no photo is available) ---------------- */

.person__photo--initials {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: var(--accent);
	flex: none;
}
