/* Fonts are loaded non-render-blocking via <link> in _includes/head.html. */

/* Variables */
:root {
	--color-primary: rgb(199, 0, 109);
	--color-secondary: rgb(255, 102, 0);
	--color-dark: rgb(26, 26, 26);
	--color-white: #fff;
	--color-light: #f5f5f5;
	--color-gray: rgb(128, 128, 128);
	--color-body: var(--color-dark);
	--color-strong: var(--color-dark);
	--color-title: var(--color-dark);
	--color-link: rgb(0, 76, 255);
	--color-shadow: rgba(0, 0, 0, 0.5);

	/* Theme-aware surfaces (remapped for dark mode below) */
	--color-bg: #ffffff;         /* page background */
	--color-surface: #ffffff;    /* elevated chips/pills on light areas */
	--color-muted: var(--color-light);  /* subtle fills: code, cards */
	--color-border: #ededed;     /* hairline separators */

	/* Terminal (skills) panel — dark on the light page, high contrast */
	--term-bg: #15171e;
	--term-bar: #1d2028;
	--term-border: #2a2e39;
}

/* ── Dark theme ──────────────────────────────────────────────────────────
   Values applied when the OS prefers dark (unless the user forced light),
   or when the user explicitly picks dark via the toggle. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--color-bg: #131316;
		--color-surface: #1c1c21;
		--color-muted: #26262e;
		--color-border: #33333c;
		--color-body: #e7e7ec;
		--color-strong: #ffffff;
		--color-title: #f4f4f7;
		--color-gray: #9b9ba6;
		--color-link: #7ea6ff;
		--color-shadow: rgba(0, 0, 0, 0.7);
		/* Lighter than the page so the terminal stands out in dark mode */
		--term-bg: #23262f;
		--term-bar: #2c303c;
		--term-border: #3d4250;
	}
}
:root[data-theme="dark"] {
	--color-bg: #131316;
	--color-surface: #1c1c21;
	--color-muted: #26262e;
	--color-border: #33333c;
	--color-body: #e7e7ec;
	--color-strong: #ffffff;
	--color-title: #f4f4f7;
	--color-gray: #9b9ba6;
	--color-link: #7ea6ff;
	--color-shadow: rgba(0, 0, 0, 0.7);
	/* Lighter than the page so the terminal stands out in dark mode */
	--term-bg: #23262f;
	--term-bar: #2c303c;
	--term-border: #3d4250;
}

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

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: var(--color-body);
	background: var(--color-bg);
	margin: 0;
	padding: 0;
	transition: background-color 0.2s ease, color 0.2s ease;
}

strong,
b {
	color: var(--color-strong);
	font-weight: 700;
}

a {
	color: var(--color-link);
	text-decoration: none !important;
}

figure {
	margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.5em;
}

/* Layout */
/* .section owns vertical rhythm only; .container owns the single site width
   and the horizontal gutter, so every region lines up to the same margins. */
.section {
	padding: 3rem 0;
}

.container {
	margin: 0 auto;
	max-width: 1152px;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

/* Breathing room between stacked sections */
main > section + section {
	margin-top: 3.5rem;
}

/* Typography */
.title {
	font-family: "Space Grotesk", sans-serif;
	font-size: 2.4rem;
	font-weight: 700;
	letter-spacing: -0.015em;
	color: var(--color-title);
	line-height: 1.1;
	margin-bottom: 0.5em;
}

/* Rich text — applies to any element with the .content class */
.content {
	line-height: 1.6;
}

.content p {
	margin-bottom: 1em;
}

.content h2,
.content h3 {
	margin-top: 2rem;
}

.content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.content blockquote {
	margin: 1.5em 0;
	padding: 0.5em 1.25em;
	border-left: 4px solid var(--color-primary);
	color: var(--color-gray);
}

.content pre {
	background: var(--color-dark);
	color: var(--color-light);
	padding: 1rem 1.25rem;
	border-radius: 12px;
	overflow-x: auto;
}

.content code {
	font-family: "JetBrains Mono", monospace;
	font-size: 0.85em;
	background: var(--color-muted);
	padding: 0.15em 0.4em;
	border-radius: 6px;
}

.content pre code {
	background: none;
	padding: 0;
	color: inherit;
}

/* Skills — a single terminal window (dark panel, theme-aware shade) */
.term {
	background: var(--term-bg);
	border: 1px solid var(--term-border);
	border-radius: 12px;
	overflow: hidden;
	font-family: "JetBrains Mono", monospace;
	box-shadow: 0 20px 45px -26px rgba(0, 0, 0, 0.75);
}

.term-bar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	background: var(--term-bar);
	border-bottom: 1px solid var(--term-border);
}

.term-dot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	flex: 0 0 auto;
}

.term-title {
	margin-left: 0.6rem;
	min-width: 0;
	flex: 1;
	color: #8b909c;
	font-size: 0.8rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.term-title b {
	color: #98c379;   /* filename — "string" green */
	font-weight: 400;
}

.term-body {
	padding: 1.4rem 1.5rem 1.5rem;
	font-size: 0.9rem;
}

/* Category groups flow into balanced columns without splitting */
.uni-body {
	column-count: 2;
	column-gap: 3rem;
}

.uni-group {
	break-inside: avoid;
	margin-bottom: 1.6rem;
}

.uni-group-title {
	color: #c678dd;   /* category header — "keyword" purple */
	font-size: 0.82rem;
	margin: 0 0 0.7rem;
}

.term-line {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.term-line + .term-line {
	margin-top: 0.7rem;
}

.term-prompt {
	color: #98c379;   /* prompt — green */
}

.term-name {
	color: #61afef;   /* skill name — "function" blue */
	font-weight: 600;
}

.term-icon {
	margin-left: auto;
	padding-left: 0.6rem;
	width: 1.7rem;
	height: 1.7rem;
	object-fit: contain;
	flex: 0 0 auto;
}

.term-comment {
	display: block;
	flex: 1 1 100%;
	padding-left: 1.3rem;
	margin-top: 0.15rem;
	color: #7d8799;   /* comment — muted gray */
	font-style: italic;
	font-size: 0.82rem;
}

.term-cursor {
	margin-top: 0.4rem;
}

.cursor {
	display: inline-block;
	width: 0.55rem;
	height: 1rem;
	background: #98c379;
	vertical-align: -2px;
	animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
	50% { opacity: 0; }
}

@media screen and (max-width: 680px) {
	.uni-body { column-count: 1; }
}

/* Footer */
.footer {
	position: relative;
	background: linear-gradient(to bottom, var(--color-muted), transparent);
	margin-top: 1.5rem;
	padding-bottom: 1.25rem;   /* copyright sits close to the bottom */
}

/* Subtle branded accent line across the top of the footer */
.footer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(90deg, var(--color-primary), transparent 55%);
}

/* Heading with an accent "connect" icon */
.footer-title {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.footer-title-icon {
	width: 1.6rem;
	height: 1.6rem;
	flex: 0 0 auto;
	background-color: var(--color-primary);
	-webkit-mask: url('../images/icons/social-connect.svg') center / contain no-repeat;
	mask: url('../images/icons/social-connect.svg') center / contain no-repeat;
}

/* Friendly call-to-action under the heading */
.footer-lead {
	margin: 0.5rem 0 1.5rem;   /* bottom gap sets the space before the chips */
	color: var(--color-gray);
	font-size: 0.98rem;
	max-width: 34rem;
}

/* Copyright: separated from the contact block and kept discreet */
.footer-copy {
	margin: 3.5rem 0 0;
	font-size: 0.8rem;
	color: var(--color-gray);
}

/* Contact chips sit on the footer: readable surface variant with magenta hover */
.footer .pill {
	background: var(--color-surface);
	color: var(--color-title) !important;
	border-color: var(--color-border);
	box-shadow: 0 10px 25px -20px var(--color-shadow);
}

.footer .pill:hover {
	background: var(--color-surface);
	border-color: var(--color-primary);
	color: var(--color-primary) !important;
}

/* Stacked label inside the contact pill: name over a small gray handle */
.footer .pill .pill-text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
	text-align: left;
}

.footer .pill .pill-name {
	font-weight: 600;
}

.footer .pill .pill-handle {
	font-family: "JetBrains Mono", monospace;
	font-size: 0.75rem;
	font-weight: 400;
	color: var(--color-gray);
}

/* Real brand icons, tinted via CSS mask so they follow the theme and the
   pill's magenta hover instead of being locked to a fixed logo color. */
.footer .pill-icon {
	width: 1.2rem;
	height: 1.2rem;
	flex: 0 0 auto;
	background-color: currentColor;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

/* Utility: Text */
.has-text-weight-semibold {
	font-weight: 600;
}

/* Utility: Spacing */
.mt-3 {
	margin-top: 0.75rem;
}

/* Site header (shared wordmark) */
.site-header {
	text-align: center;
	padding-bottom: 1rem;
}

.site-title {
	display: inline-block;
	font-family: "JetBrains Mono", monospace;
	font-weight: 700;
	letter-spacing: -0.04em;
	line-height: 1.05;
	color: var(--color-title) !important;
}

/* Wordmark pivot: the extra P that turns MAPED (MAttia PEDone) into MAPPED */
.site-title .wm-pivot {
	color: var(--color-primary);
}

/* Theme toggle — fixed top-right on every page */
.theme-toggle {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 100;
	width: 2.75rem;
	height: 2.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	line-height: 1;
	border-radius: 999px;
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	color: var(--color-title);
	box-shadow: 0 8px 20px -12px var(--color-shadow);
	cursor: pointer;
	transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
	transform: translateY(-1px);
	border-color: var(--color-primary);
}

.theme-toggle:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

/* Pull-quote — centered statement piece, distinct from .content blockquote */
.pull-quote {
	margin: 3rem auto;
	max-width: 42rem;
	padding: 0;
	border: 0;
	text-align: center;
}

.pull-quote blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	color: var(--color-title);
	font-family: "IBM Plex Sans", sans-serif;
	font-size: clamp(1.4rem, 3.5vw, 2rem);
	font-weight: 500;
	font-style: italic;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.pull-quote blockquote::before {
	content: "\201C";
	display: block;
	font-family: "Space Grotesk", sans-serif;
	font-style: normal;
	font-size: 3.5rem;
	line-height: 0.5;
	margin-bottom: 1rem;
	color: var(--color-primary);
}

.pull-quote figcaption {
	margin-top: 1.25rem;
	font-family: "JetBrains Mono", monospace;
	font-size: 0.8rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--color-gray);
}

.pull-quote figcaption::before {
	content: "— ";
}

.site-header--large .site-title {
	font-size: clamp(50px, 12vw, 110px);
}

.site-header--small .site-title {
	font-size: 32px;
}

.site-subtitle {
	margin-top: 0.5rem;
	color: var(--color-gray);
	font-weight: 600;
}

/* Home introduction (content lives in _includes/intro.md) */
.intro {
	font-size: 1.15rem;
	color: var(--color-body);
}

/* Pill button (project hero actions) */
.pill {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem 1.1rem;
	border-radius: 999px;
	font-weight: 600;
	background: rgba(255, 255, 255, 0.18);
	color: var(--color-white) !important;
	border: 1px solid rgba(255, 255, 255, 0.35);
	transition:
		background 0.15s ease,
		transform 0.15s ease;
}

.pill:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: translateY(-2px);
}

/* Pill variants for light backgrounds (project cards), driven by --brand.
   The bare .pill is white-on-translucent and only reads on colored cards. */
.pill.is-brand {
	background: var(--brand, var(--color-primary));
	color: var(--color-white) !important;
	border-color: var(--brand, var(--color-primary));
}

.pill.is-brand:hover {
	filter: brightness(0.92);
	transform: translateY(-2px);
}

.pill.is-ghost {
	background: transparent;
	color: var(--brand, var(--color-primary)) !important;
	border-color: var(--brand, var(--color-primary));
}

.pill.is-ghost:hover {
	background: var(--brand, var(--color-primary));
	color: var(--color-white) !important;
	transform: translateY(-2px);
}

.pill-list {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.pill-list li + li {
	margin-top: 0 !important;
}

/* Project cards — one per row. When a banner exists it becomes the card
   background, tinted with a minimal-opacity overlay of the project's --brand;
   bannerless cards fall back to a light surface with a brand accent stripe. */
.project-list {
	display: grid;
	grid-template-columns: 1fr;
	grid-auto-rows: 1fr;      /* every card matches the tallest one */
	gap: 1.5rem;
}

/* Column count is set by the template: 2 projects → 2 cols, 3+ → 3 cols,
   collapsing on narrower screens. */
.project-list.cols-2 { grid-template-columns: repeat(2, 1fr); }
.project-list.cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 900px) {
	.project-list.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
	.project-list.cols-2,
	.project-list.cols-3 { grid-template-columns: 1fr; }
}

/* Project cards — browser-window style */
.pcard {
	--brand: var(--color-primary);
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--color-border);
	border-radius: 12px;
	overflow: hidden;
	background: var(--color-surface);
	box-shadow: 0 16px 36px -24px var(--color-shadow);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pcard:hover {
	transform: translateY(-3px);
	box-shadow: 0 24px 46px -24px var(--color-shadow);
}

.pcard-bar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 0.8rem;
	background: var(--color-muted);
	border-bottom: 1px solid var(--color-border);
}

.pcard-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex: 0 0 auto;
}

.pcard-addr {
	flex: 1;
	min-width: 0;
	margin-left: 0.5rem;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: 999px;
	padding: 0.25rem 0.75rem;
	font-family: "JetBrains Mono", monospace;
	font-size: 0.72rem;
	color: var(--color-gray);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pcard-view {
	position: relative;
	display: grid;
	place-items: center;
	height: 170px;
	background-color: var(--brand);
	background-size: cover;
	background-position: top center;
}

.pcard-logo {
	height: 48px;
	width: auto;
	max-width: 60%;
}

.pcard-badge {
	position: absolute;
	top: 0.7rem;
	right: 0.7rem;
	font-family: "JetBrains Mono", monospace;
	font-size: 0.62rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 0.3rem 0.6rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	backdrop-filter: blur(4px);
}

.pcard-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	padding: 1.1rem 1.2rem 1.2rem;
}

.pcard-title {
	font-family: "Space Grotesk", sans-serif;
	font-size: 1.4rem;
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.1;
	margin: 0 0 0.4rem;
}

.pcard-title a {
	color: var(--color-title) !important;
}

.pcard-title a:hover {
	color: var(--brand) !important;
}

.pcard-descr {
	font-size: 0.92rem;
	color: var(--color-body);
	margin: 0 0 1.1rem;
}

.pcard-foot {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-top: auto;
}

.pcard-meta {
	font-family: "JetBrains Mono", monospace;
	font-size: 0.66rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-gray);
}

.pcard-cta {
	margin-left: auto;
	font-family: "Space Grotesk", sans-serif;
	font-weight: 600;
	color: var(--brand);
	white-space: nowrap;
}

.pcard-collab {
	font-size: 0.82rem;
	color: var(--color-gray);
	margin: 0 0 1rem;
}

.pcard-collab a {
	color: var(--brand);
	font-weight: 600;
}

/* Project detail — browser-window hero */
.project-page-hero {
	margin-bottom: 2.5rem;
}

.pwin {
	border: 1px solid var(--color-border);
	border-radius: 12px;
	overflow: hidden;
	background: var(--color-surface);
	box-shadow: 0 22px 50px -28px var(--color-shadow);
}

.pwin-view {
	position: relative;
	background-color: var(--brand);
	background-size: cover;
	background-position: center;
}

.pwin-view img {
	display: block;
	width: 100%;
	height: auto;
}

.pwin-view--brand {
	display: grid;
	place-items: center;
	min-height: 260px;
}

.pwin-logo {
	height: 72px;
	width: auto;
	max-width: 55%;
}

.pwin-meta {
	margin-top: 1.6rem;
}

.pwin-meta .project-meta {
	margin-bottom: 0.9rem;
}

.project-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 1.2rem;
}

.projects-viewall {
	margin: 1.5rem 0 0;
	text-align: right;
	font-weight: 600;
}

.projects-viewall a {
	color: var(--color-link);
}

.projects-viewall a:hover {
	text-decoration: underline !important;
}

.project-card {
	--brand: var(--color-primary);
	position: relative;
	display: flex;
	min-height: 280px;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 14px 30px -20px var(--color-shadow);
}

.project-card.has-no-banner {
	background: var(--color-muted);
	border-left: 5px solid var(--brand);
}

.project-card.has-banner,
.project-hero.has-banner {
	background-color: var(--brand);
	background-image:
		linear-gradient(
			135deg,
			color-mix(in srgb, var(--brand) 60%, transparent),
			color-mix(in srgb, var(--brand) 38%, transparent)
		),
		var(--banner);
	background-size: cover;
	background-position: center;
	color: var(--color-white);
}


/* No banner but a brand color: fill with the brand color */
.project-card.has-brand-bg,
.project-hero.has-brand-bg {
	background: var(--brand);
	color: var(--color-white);
}

/* Two columns: main content + a dedicated meta section. Stacks on mobile. */
.project-card-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 1.5rem;
	padding: 1.75rem 2rem;
}

.project-card-main {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
}

/* Second column — metadata lives here as its own section, divided off */
.project-card-meta-col {
	flex: 0 0 auto;
	display: flex;
	align-items: flex-start;
}

/* Logo + title sit side by side as a single heading unit */
.project-card-heading {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
	max-width: 100%;
}

.project-card-logo {
	height: 3.5rem;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	flex: 0 1 auto;
	min-width: 0;
}

/* Secondary info (category badge + status indicator): a compact row placed
   below the description, kept visually subordinate to the title. */
.project-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin: 0;
}

/* In its own column the meta stacks vertically and small. */
.project-card-meta-col .project-meta {
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
}

.project-card .project-meta .project-category {
	font-size: 0.6rem;
	padding: 0.1rem 0.45rem;
}

.project-card .project-meta .project-status {
	font-size: 0.66rem;
	gap: 0.3rem;
}

.project-card .project-meta .project-status::before {
	width: 0.45rem;
	height: 0.45rem;
}

/* Category label — brand-tinted pill */
.project-category {
	font-family: "JetBrains Mono", monospace;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--brand, var(--color-primary));
	background: color-mix(in srgb, var(--brand, var(--color-primary)) 12%, transparent);
	border: 1px solid color-mix(in srgb, var(--brand, var(--color-primary)) 35%, transparent);
	border-radius: 999px;
	padding: 0.25rem 0.7rem;
}

/* Status indicator — a color-coded dot + label */
.project-status {
	--status-color: var(--color-gray);
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: capitalize;
	color: var(--color-gray);
}

.project-status::before {
	content: "";
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 999px;
	background: var(--status-color);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-color) 22%, transparent);
}

.project-status.is-active {
	--status-color: #2f9e5c;
}

.project-status.is-planned {
	--status-color: #e0a008;
}

.project-status.is-deprecated {
	--status-color: #b03636;
}

.project-card-title {
	font-family: "Space Grotesk", sans-serif;
	font-size: 2.5rem;
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.05;
	margin: 0;
	min-width: 0;
}

.project-card-title a {
	color: var(--color-title) !important;
}

.project-card-title a:hover {
	color: var(--brand) !important;
}

.project-card-descr {
	margin: 0 0 1.25rem;
	color: var(--color-body);
}

.project-card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

/* Filled overrides (banner image or solid brand background), shared by the
   card and the project-page hero: white, legible content. */
.is-filled .project-card-title a,
.is-filled .project-hero-title {
	color: var(--color-white) !important;
}

.is-filled .project-card-title a:hover {
	color: var(--color-white) !important;
	opacity: 0.85;
}

.is-filled .project-card-descr,
.is-filled .project-hero-descr {
	color: var(--color-white);
}

.is-filled .project-category {
	color: var(--color-white);
	background: rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.45);
}

.is-filled .project-status {
	color: var(--color-white);
}

/* Primary action flips to solid white (brand text) for contrast;
   the secondary action becomes a white outline. */
.is-filled .pill.is-brand {
	background: var(--color-white);
	color: var(--brand) !important;
	border-color: var(--color-white);
}

.is-filled .pill.is-brand:hover {
	filter: none;
	opacity: 0.9;
}

.is-filled .pill.is-ghost {
	color: var(--color-white) !important;
	border-color: rgba(255, 255, 255, 0.7);
}

.is-filled .pill.is-ghost:hover {
	background: var(--color-white);
	color: var(--brand) !important;
}

@media screen and (max-width: 768px) {
	.project-card {
		min-height: 240px;
	}

	/* Smaller title on narrow screens so long names don't blow up the card */
	.project-card-title {
		font-size: 1.9rem;
	}

	/* Stack the columns: meta drops to the bottom as its own section */
	.project-card-body {
		flex-direction: column;
		gap: 1rem;
	}

	.project-card-meta-col {
		padding-left: 0;
		padding-top: 1rem;
		border-left: none;
		border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
	}

	.project-card-meta-col .project-meta {
		flex-direction: row;
		flex-wrap: wrap;
	}
}

/* Project presentation page — hero with the core info over the banner,
   reusing the same fill/overlay treatment as the cards. */
.project-hero {
	margin-bottom: 2.5rem;
}

.project-hero .project-meta {
	margin-top: 1.25rem;
}

.project-hero.is-filled {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 520px;
	padding: 2.5rem;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 18px 36px -22px var(--color-shadow);
}

.project-hero-inner {
	width: 100%;
}

/* Logo + title sit side by side as a single heading unit */
.project-hero-heading {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0 0 0.5rem;
}

.project-hero-logo {
	display: block;
	height: 7rem;
	width: auto;
	max-width: 100%;
	flex: 0 1 auto;
}

.project-hero-title {
	margin: 0;
}

.project-hero-descr {
	font-size: 1.25rem;
	color: var(--color-gray);
	margin: 0;
	max-width: 60ch;
}

.project-hero-cta {
	margin-top: 1.25rem;
}

.project-page-cta {
	margin: 1rem 0 1.5rem;
}

/* Screen reader only */
.is-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ===== Blog ===== */

/* Shared meta line (date · read time) */
.post-meta {
	font-family: "JetBrains Mono", monospace;
	font-size: 0.8rem;
	color: var(--color-gray);
}

/* Article */
/* Only the prose body is constrained to a comfortable reading measure;
   the title, meta, image and further-reading keep the full container width. */
.article-body {
	max-width: 720px;
	margin: 0 auto;
}

.article-subtitle {
	font-size: 1.25rem;
	color: var(--color-gray);
	margin-top: -0.25rem;
}

.article-image {
	width: 100%;
	height: auto;
	border-radius: 12px;
	margin: 0.5rem 0 2rem;
}

.article-back {
	margin-top: 3rem;
	font-weight: 600;
}

/* Further reading */
.further-reading {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--color-border);
}

/* Post list */
.post-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.post-item + .post-item {
	margin-top: 2rem;
	padding-top: 2rem;
	border-top: 1px solid var(--color-border);
}

/* Article-list page: 2-column card grid */
.post-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2.5rem;
	max-width: none;
}

.post-grid .post-item + .post-item {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

@media screen and (max-width: 768px) {
	.post-grid {
		grid-template-columns: 1fr;
	}
}

.post-item-teaser {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 12px;
	margin-bottom: 0.75rem;
}

.post-item-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--color-title) !important;
}

.post-item-excerpt {
	margin-top: 0.5rem;
	color: var(--color-body);
}

/* Syntax highlighting — Rouge base16.dark; .content pre owns the container box */
.highlight table td { padding: 5px; }
.highlight table pre { margin: 0; }
.highlight, .highlight .w {
  color: #d0d0d0;
  background-color: #151515;
}
.highlight .err {
  color: #151515;
  background-color: #ac4142;
}
.highlight .c, .highlight .ch, .highlight .cd, .highlight .cm, .highlight .cpf, .highlight .c1, .highlight .cs {
  color: #505050;
}
.highlight .cp {
  color: #f4bf75;
}
.highlight .nt {
  color: #f4bf75;
}
.highlight .o, .highlight .ow {
  color: #d0d0d0;
}
.highlight .p, .highlight .pi {
  color: #d0d0d0;
}
.highlight .gi {
  color: #90a959;
}
.highlight .gd {
  color: #ac4142;
}
.highlight .gh {
  color: #6a9fb5;
  background-color: #151515;
  font-weight: bold;
}
.highlight .k, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kv {
  color: #aa759f;
}
.highlight .kc {
  color: #d28445;
}
.highlight .kt {
  color: #d28445;
}
.highlight .kd {
  color: #d28445;
}
.highlight .s, .highlight .sb, .highlight .sc, .highlight .dl, .highlight .sd, .highlight .s2, .highlight .sh, .highlight .sx, .highlight .s1 {
  color: #90a959;
}
.highlight .sa {
  color: #aa759f;
}
.highlight .sr {
  color: #75b5aa;
}
.highlight .si {
  color: #8f5536;
}
.highlight .se {
  color: #8f5536;
}
.highlight .nn {
  color: #f4bf75;
}
.highlight .nc {
  color: #f4bf75;
}
.highlight .no {
  color: #f4bf75;
}
.highlight .na {
  color: #6a9fb5;
}
.highlight .m, .highlight .mb, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .il, .highlight .mo, .highlight .mx {
  color: #90a959;
}
.highlight .ss {
  color: #90a959;
}
.highlight { background: transparent; }
