/*
Theme Name: Naccache Lab
Theme URI: https://nanoparticlelab.com/
Description: Block theme for the Naccache Carbon and Hybrid Nanomaterials Research Group (Concordia University). Spectrum palette derived from the lab logo, editable entirely from the WordPress Site Editor. Includes a one-click starter site (pages, team, research, publications, equipment, menu, logo).
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: naccache-lab
*/

/* ---------- Global ---------- */
:root {
	--nl-spectrum: var(--wp--preset--gradient--spectrum);
	--nl-radius: 14px;
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { height: auto; }
.wp-site-blocks > * + * { margin-block-start: 0; }
:where(.wp-site-blocks) :focus-visible { outline: 2px solid var(--wp--preset--color--primary); outline-offset: 2px; }

.skip-link.screen-reader-text:focus { background: #fff; color: #000; z-index: 100000; }

/* Spectrum rule: thin rainbow line taken from the logo */
.nl-spectrum-rule {
	height: 3px;
	background: var(--nl-spectrum);
	border: 0;
	margin: 0;
}
hr.wp-block-separator.is-style-spectrum {
	border: 0;
	height: 3px;
	width: 100% !important;
	opacity: 1;
	background: var(--nl-spectrum) no-repeat 0 0 / 96px 3px;
}
.has-text-align-center + hr.wp-block-separator.is-style-spectrum { background-position: 50% 0; }

/* Kicker / eyebrow text */
.nl-kicker {
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
}
.nl-lead { font-size: var(--wp--preset--font-size--large); line-height: 1.55; }

/* Spectrum text (headings) */
.nl-spectrum-text {
	background: var(--nl-spectrum);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
}

/* ---------- Header ---------- */
.nl-header { border-bottom: 1px solid rgba(255,255,255,.06); }
.nl-header .wp-block-site-logo img { display: block; }
.nl-header .wp-block-site-title a { color: var(--wp--preset--color--base); }
.nl-header .nl-site-sub { margin: 0; line-height: 1.2; }
.nl-header .wp-block-navigation a:where(:not(.wp-element-button)) { text-decoration: none; }
.nl-header .wp-block-navigation .wp-block-navigation-item__content { padding: .35rem 0; border-bottom: 2px solid transparent; }
.nl-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.nl-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content { border-bottom-color: var(--wp--preset--color--primary-light); }
.nl-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--ink) !important; color: var(--wp--preset--color--on-dark) !important; }

/* ---------- Page title banner ---------- */
.nl-page-banner { position: relative; overflow: hidden; }
.nl-page-banner::after {
	content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--nl-spectrum);
}
.nl-page-banner::before {
	content: ""; position: absolute; width: 520px; height: 520px; right: -140px; top: -260px;
	background: radial-gradient(closest-side, rgba(123,77,255,.35), rgba(42,107,255,.12) 55%, transparent);
	pointer-events: none;
}

/* ---------- Hero ---------- */
.nl-hero .wp-block-cover__inner-container { max-width: 1200px; }
.nl-hero h1 { max-width: 20ch; }
.nl-hero .nl-lead { max-width: 56ch; }

/* ---------- Stats strip ---------- */
.nl-stats .nl-stat-number {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 600; line-height: 1; margin-bottom: .35rem;
}
.nl-stats .wp-block-column { border-left: 3px solid var(--wp--preset--color--line); padding-left: 1rem; }
.nl-stats .wp-block-column:nth-child(1) { border-color: var(--wp--preset--color--blue); }
.nl-stats .wp-block-column:nth-child(2) { border-color: var(--wp--preset--color--green); }
.nl-stats .wp-block-column:nth-child(3) { border-color: var(--wp--preset--color--orange); }
.nl-stats .wp-block-column:nth-child(4) { border-color: var(--wp--preset--color--magenta); }

/* ---------- Cards ---------- */
.is-style-nl-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--nl-radius);
	box-shadow: var(--wp--preset--shadow--card);
	overflow: hidden;
}
.is-style-nl-card > .wp-block-image:first-child { margin: 0; }
.is-style-nl-card > .wp-block-image:first-child img { border-radius: 0; width: 100%; }

/* Research theme cards: coloured top border via accent classes */
.nl-accent-blue    { border-top: 4px solid var(--wp--preset--color--blue) !important; }
.nl-accent-teal    { border-top: 4px solid var(--wp--preset--color--teal) !important; }
.nl-accent-green   { border-top: 4px solid var(--wp--preset--color--green) !important; }
.nl-accent-yellow  { border-top: 4px solid var(--wp--preset--color--yellow) !important; }
.nl-accent-orange  { border-top: 4px solid var(--wp--preset--color--orange) !important; }
.nl-accent-red     { border-top: 4px solid var(--wp--preset--color--red) !important; }
.nl-accent-magenta { border-top: 4px solid var(--wp--preset--color--magenta) !important; }
.nl-accent-violet  { border-top: 4px solid var(--wp--preset--color--violet) !important; }
.nl-theme-card img { aspect-ratio: 16 / 10; object-fit: cover; }
.nl-theme-card h3 a, .nl-research-section h2 a { text-decoration: none; color: inherit; }
.nl-theme-card h3 a:hover { color: var(--wp--preset--color--primary); }

/* Research theme sections */
.nl-research-section { scroll-margin-top: 90px; }
.nl-research-section .nl-dot {
	display: inline-block; width: .7em; height: .7em; border-radius: 50%; margin-right: .45em; vertical-align: .05em;
}
.nl-people-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.nl-people-tags p { margin: 0; }

/* ---------- Team ---------- */
.nl-team-card { height: 100%; }
.nl-team-card .wp-block-image img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.nl-team-card h3 { margin-bottom: .1rem; }
.nl-role {
	display: inline-block; font-size: var(--wp--preset--font-size--x-small); font-weight: 600; letter-spacing: .06em;
	text-transform: uppercase; color: var(--wp--preset--color--primary); margin: 0;
}
.nl-team-card .wp-block-details { border-top: 1px solid var(--wp--preset--color--line); padding-top: .6rem; }
.nl-team-card .wp-block-details summary { cursor: pointer; font-weight: 600; }
.nl-team-card .wp-block-details[open] summary { margin-bottom: .5rem; }
.nl-pi-photo img { border-radius: var(--nl-radius); aspect-ratio: 1; object-fit: cover; }

/* Alumni */
.nl-alumni-list { list-style: none; padding-left: 0; }
.nl-alumni-list li { padding: .7rem 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.nl-alumni-list li strong { font-weight: 600; }
.nl-compact-list { columns: 2 260px; column-gap: 2rem; padding-left: 1.1rem; }
.nl-compact-list li { break-inside: avoid; margin-bottom: .35rem; }

/* ---------- Publications ---------- */
.nl-pub-list { padding-left: 0; list-style: none; counter-reset: none; }
.nl-pub-list li {
	overflow-wrap: anywhere;
	padding: .9rem 0 .9rem 0; border-bottom: 1px solid var(--wp--preset--color--line);
	font-size: var(--wp--preset--font-size--small); line-height: 1.55;
}
.nl-pub-list li strong { font-size: var(--wp--preset--font-size--medium); font-weight: 600; color: var(--wp--preset--color--contrast); display: block; margin: .15rem 0; }
.nl-badge {
	display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
	padding: .1rem .5rem; border-radius: 999px; background: var(--wp--preset--color--mist);
	color: var(--wp--preset--color--violet); border: 1px solid #d9d0ff; margin-left: .35rem; vertical-align: .1em;
}
.nl-year-heading { scroll-margin-top: 90px; }
.nl-year-nav { display: flex; flex-wrap: wrap; gap: .35rem .9rem; }
.nl-year-nav a { text-decoration: none; font-weight: 600; }

/* ---------- Equipment ---------- */
.nl-equip-card img { aspect-ratio: 4 / 3; object-fit: cover; }
.nl-gallery img { border-radius: 10px; }

/* ---------- Dark sections ---------- */
.has-ink-background-color a:where(:not(.wp-element-button)),
.has-ink-2-background-color a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--primary-light); }
.has-ink-background-color .wp-element-button,
.has-ink-2-background-color .wp-element-button {
	background: var(--wp--preset--color--base); color: var(--wp--preset--color--ink);
}
.has-ink-background-color .is-style-outline .wp-element-button,
.has-ink-2-background-color .is-style-outline .wp-element-button,
.wp-block-cover .is-style-outline .wp-element-button {
	background: transparent; color: var(--wp--preset--color--base); border: 1.5px solid rgba(255,255,255,.6);
}
.wp-block-cover .wp-element-button { background: var(--wp--preset--color--base); color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-outline .wp-element-button { border-width: 1.5px; }
.has-ink-background-color .wp-element-button:hover,
.has-ink-2-background-color .wp-element-button:hover,
.wp-block-cover .wp-element-button:hover { background: var(--wp--preset--color--primary-light); color: var(--wp--preset--color--ink); }

/* ---------- News ---------- */
.nl-news-card .wp-block-post-featured-image img { aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 25%; }
.nl-news-card .wp-block-post-title a { color: inherit; }

/* ---------- Footer ---------- */
.nl-footer a { color: var(--wp--preset--color--on-dark); }
.nl-footer a:hover { color: var(--wp--preset--color--primary-light); }
.nl-footer .wp-block-navigation a { text-decoration: none; }

/* ---------- Small screens ---------- */
@media (max-width: 781px) {
	.nl-stats.wp-block-columns.wp-block-columns { flex-wrap: wrap !important; }
	.nl-stats.wp-block-columns.wp-block-columns > .wp-block-column.wp-block-column { flex-basis: calc(50% - 0.75rem) !important; flex-grow: 0; }
	.nl-hero h1 { max-width: none; }
}

/* Journal covers */
.nl-covers .wp-block-image { margin: 0; }
.nl-covers .wp-block-image img { width: 100%; height: auto; aspect-ratio: 760 / 994; object-fit: cover; border-radius: 4px; box-shadow: 0 1px 2px rgba(11,7,22,.12), 0 8px 24px -8px rgba(11,7,22,.35); transition: transform .2s ease, box-shadow .2s ease; }
.nl-covers .wp-block-image a:hover img, .nl-covers .wp-block-image a:focus-visible img { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(11,7,22,.12), 0 16px 32px -10px rgba(11,7,22,.45); }
.nl-covers .wp-element-caption { font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--muted); margin-top: .6rem; line-height: 1.35; text-align: left; }
@media (prefers-reduced-motion: reduce) { .nl-covers .wp-block-image img { transition: none; } }
@media (max-width: 781px) {
	.nl-covers.wp-block-columns.wp-block-columns { flex-wrap: wrap !important; column-gap: 0.75rem; row-gap: 1.25rem; }
	.nl-covers.wp-block-columns.wp-block-columns > .wp-block-column.wp-block-column { flex-basis: calc((100% - 1.5rem) / 3) !important; flex-grow: 0; }
	.nl-covers.wp-block-columns > .wp-block-column:empty { display: none; }
}
