/* PortfolioMo – Template 5 (bento)
   Colors come from the chosen palette (--pm-*). Everything sits in rounded cards
   laid out on a 12-column grid, with a floating pill menu.
   Text size rule for every template: nothing smaller than 16px, except the footer (15px). */

:root {
	--pm-bg: #0E1116;
	--pm-surface: #171B22;
	--pm-text: #F2F4F7;
	--pm-muted: #A7B0BF;
	--pm-primary: #7CE0C6;
	--pm-accent: #3F8CFF;
	--pm-on-primary: #08120F;
	--pm-primary-text: #7CE0C6;

	--pm-font-heading: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--pm-font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--p5-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--pm-line: color-mix(in srgb, var(--pm-text) 14%, transparent);
	--pm-line-strong: color-mix(in srgb, var(--pm-text) 26%, transparent);
	--pm-tint: color-mix(in srgb, var(--pm-primary) 14%, transparent);
	--p5-card: color-mix(in srgb, var(--pm-surface) 88%, var(--pm-bg));
	--p5-radius: 22px;
	--p5-gap: 20px;
	--p5-shadow: 0 20px 46px -34px color-mix(in srgb, var(--pm-text) 70%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; -webkit-text-size-adjust: 100%; background: var(--pm-bg); }
body.pm5 {
	margin: 0;
	min-height: 100vh;
	background:
		radial-gradient(1000px 520px at 78% -8%, color-mix(in srgb, var(--pm-primary) 16%, transparent), transparent 70%),
		radial-gradient(760px 420px at 6% 12%, color-mix(in srgb, var(--pm-accent) 14%, transparent), transparent 72%),
		var(--pm-bg);
	background-attachment: fixed;
	color: var(--pm-text);
	font-family: var(--pm-font-body);
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
:where(.pm5) :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure) { margin: 0; padding: 0; }
:where(.pm5) :where(ul, ol) { list-style: none; }
:where(.pm5) img { max-width: 100%; height: auto; display: block; }
:where(.pm5) a { color: inherit; }
:where(.pm5) button { font: inherit; color: inherit; }
.pm5 h1, .pm5 h2, .pm5 h3, .pm5 h4 { font-family: var(--pm-font-heading); font-weight: 600; color: var(--pm-text); line-height: 1.2; letter-spacing: -0.01em; }
.pm5 :focus-visible { outline: 3px solid var(--pm-primary); outline-offset: 3px; border-radius: 10px; }
.pm-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.p5-skip { position: fixed; left: 16px; top: -60px; z-index: 1000; padding: 10px 16px; background: var(--pm-primary); color: var(--pm-on-primary); border-radius: 10px; text-decoration: none; }
.p5-skip:focus { top: 12px; }
.pm-brand-icon { font-family: "Font Awesome 6 Brands"; font-style: normal; font-weight: 400; line-height: 1; display: inline-block; -webkit-font-smoothing: antialiased; }

.p5-wrap { width: min(1400px, 100% - 40px); margin-inline: auto; }
.p5-mono { font-family: var(--p5-mono); font-size: 16px; letter-spacing: -0.02em; color: var(--pm-muted); }

/* ---------- Floating pill bar ---------- */

.p5-bar { position: fixed; top: 18px; left: 0; right: 0; z-index: 60; display: flex; justify-content: center; padding: 0 20px; transition: transform .35s ease; }
.admin-bar .p5-bar { top: 50px; }
.p5-bar.is-hidden { transform: translateY(-140%); }
.p5-bar-inner {
	display: flex;
	align-items: center;
	gap: 18px;
	width: min(1400px, 100%);
	padding: 10px 10px 10px 18px;
	border: 1px solid var(--pm-line);
	border-radius: 999px;
	background: color-mix(in srgb, var(--pm-surface) 80%, transparent);
	backdrop-filter: blur(14px);
	transition: box-shadow .3s, background-color .3s;
}
.p5-bar.is-stuck .p5-bar-inner { background: color-mix(in srgb, var(--pm-surface) 94%, transparent); box-shadow: var(--p5-shadow); }
.p5-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--pm-font-heading); font-weight: 600; }
.p5-logo img { max-height: 34px; width: auto; }
.p5-logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--pm-primary); color: var(--pm-on-primary); font-size: 16px; }
.p5-nav { margin-left: auto; }
.p5-nav ul { display: flex; gap: 4px; }
.p5-nav a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--pm-muted); text-decoration: none; transition: background-color .25s, color .25s; }
.p5-nav a:hover, .p5-nav a.is-active { background: var(--pm-tint); color: var(--pm-text); }
.p5-bar-actions { display: flex; align-items: center; gap: 8px; }
.p5-bar-cta { min-height: 42px; padding: 0 20px; }
.p5-menu-btn { display: none; place-items: center; width: 42px; height: 42px; border: 1px solid var(--pm-line); border-radius: 50%; background: none; cursor: pointer; }
.p5-menu-btn span { line-height: 0; }
.p5-menu-close { display: none; }
.p5-menu-btn[aria-expanded="true"] .p5-menu-open { display: none; }
.p5-menu-btn[aria-expanded="true"] .p5-menu-close { display: inline; }

/* ---------- Cards and bento grid ---------- */

.p5-section { padding: 52px 0; }
.p5-hero { padding-top: 132px; }
.p5-card {
	position: relative;
	padding: 28px;
	border: 1px solid var(--pm-line);
	border-radius: var(--p5-radius);
	background: var(--p5-card);
	box-shadow: var(--p5-shadow);
}
.p5-bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--p5-gap); }
.p5-bento > * { grid-column: span 4; min-width: 0; }

.p5-head { margin-bottom: 28px; max-width: 760px; }
.p5-label { font-family: var(--p5-mono); font-size: 16px; color: var(--pm-primary-text); margin-bottom: 8px !important; }
.p5-head h1, .p5-head h2 { font-size: clamp(28px, 3.2vw, 40px); }
.p5-intro { margin-top: 10px !important; color: var(--pm-muted); }
.p5-card-title { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 18px !important; padding-bottom: 14px; border-bottom: 1px solid var(--pm-line); }
.p5-card-title .pm-icon { color: var(--pm-primary-text); }

.p5-prose { color: var(--pm-muted); }
.p5-prose p + p, .p5-prose p + ul, .p5-prose ul + p, .p5-prose h3 + ul { margin-top: 12px; }
.p5-prose h3 { margin-top: 20px; font-size: 19px; }
.p5-prose ul, .p5-prose ol { padding-left: 20px; }
.p5-prose ul { list-style: disc; }
.p5-prose ol { list-style: decimal; }
.p5-prose li + li { margin-top: 4px; }
.p5-prose li::marker { color: var(--pm-primary); }
.p5-prose strong { color: var(--pm-text); }
.p5-prose a { color: var(--pm-primary-text); }

.p5-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 22px;
	border: 1px solid var(--pm-line-strong);
	border-radius: 999px;
	font-family: var(--pm-font-heading);
	font-size: 16px;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .25s, color .25s, border-color .25s, transform .25s;
}
.p5-btn:hover { background: var(--pm-tint); transform: translateY(-2px); }
.p5-btn-primary { background: var(--pm-primary); border-color: var(--pm-primary); color: var(--pm-on-primary); }
.p5-btn-primary:hover { background: color-mix(in srgb, var(--pm-primary) 84%, var(--pm-text)); }
.p5-btn-block { width: 100%; }
.p5-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.p5-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--pm-primary-text); text-decoration: none; }
.p5-link:hover { text-decoration: underline; }
.p5-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.p5-chip { display: inline-block; padding: 5px 14px; border: 1px solid var(--pm-line); border-radius: 999px; background: color-mix(in srgb, var(--pm-text) 5%, transparent); }
.p5-chiprow { margin-top: 10px !important; }

/* Hero */
.p5-hero-main { grid-column: span 7; display: flex; flex-direction: column; justify-content: center; padding: 40px; }
.p5-badge { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 5px 14px; border-radius: 999px; background: var(--pm-tint); color: var(--pm-text); font-family: var(--p5-mono); font-size: 16px; }
.p5-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pm-primary); box-shadow: 0 0 0 0 color-mix(in srgb, var(--pm-primary) 70%, transparent); animation: p5-pulse 2.4s infinite; }
@keyframes p5-pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.p5-hero-main h1 { margin-top: 18px; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.05; }
.p5-hello { display: block; font-size: 16px; color: var(--pm-primary-text); margin-bottom: 6px; }
.p5-hero-role { margin-top: 14px !important; font-family: var(--pm-font-heading); font-size: 20px; color: var(--pm-muted); }
.p5-hero-lead { margin-top: 14px !important; max-width: 46ch; color: var(--pm-muted); }
.p5-photo-card { grid-column: span 5; padding: 0; overflow: hidden; }
.p5-photo-card img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; object-position: center top; }
.p5-stat { grid-column: span 3; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.p5-stat strong { font-family: var(--pm-font-heading); font-size: 38px; line-height: 1.1; }
.p5-stat-sm strong { font-size: 26px; }
.p5-links-card { grid-column: span 6; display: flex; flex-direction: column; gap: 14px; }
.p5-links { display: flex; flex-wrap: wrap; gap: 10px; }
.p5-links a { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--pm-line); border-radius: 14px; color: var(--pm-text); text-decoration: none; font-size: 17px; transition: background-color .25s, transform .25s, border-color .25s; }
.p5-links a:hover { background: var(--pm-primary); border-color: var(--pm-primary); color: var(--pm-on-primary); transform: translateY(-3px); }
.p5-links .pm-icon { width: 20px; height: 20px; }

/* About */
.p5-about-main { grid-column: span 8; }
.p5-about-bento .p5-photo-card { grid-column: span 4; }
.p5-details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; margin-top: 24px !important; padding-top: 22px; border-top: 1px solid var(--pm-line); }
.p5-details > div { min-width: 0; }
.p5-details .p5-detail-email { grid-column: 1 / -1; }
.p5-details dd { overflow-wrap: anywhere; }
.p5-details a { text-decoration: none; }
.p5-details a:hover { color: var(--pm-primary-text); }

/* Services */
.p5-service { display: flex; flex-direction: column; transition: transform .3s, border-color .3s; }
.p5-service:hover { transform: translateY(-4px); border-color: var(--pm-primary); }
.p5-service-lead { grid-column: span 6; }
.p5-icon { display: inline-grid; place-items: center; width: 54px; height: 54px; margin-bottom: 16px; border-radius: 16px; background: var(--pm-tint); color: var(--pm-primary-text); }
.p5-icon .pm-fa { font-size: 24px; line-height: 1; }
.p5-service h3 { font-size: 20px; margin-bottom: 10px; }
.p5-price { margin-top: auto !important; padding-top: 14px; color: var(--pm-primary-text); }

/* Resume, credentials */
.p5-resume-bento > * { grid-column: span 6; }
.p5-rows ol { display: flex; flex-direction: column; gap: 22px; }
.p5-rows li { padding-left: 18px; border-left: 2px solid var(--pm-tint); }
.p5-row-date { margin-bottom: 2px !important; }
.p5-rows h4 { font-size: 18px; }
.p5-row-where { color: var(--pm-muted); }
.p5-rows .p5-prose { margin-top: 8px; }

/* Skills */
.p5-skills-bento > * { grid-column: span 4; }
.p5-skill-card .p5-chips { gap: 10px; }

/* Projects */
.p5-works > * { grid-column: span 4; }
.p5-work-wide { grid-column: span 8; }
.p5-work-link { display: flex; flex-direction: column; height: 100%; padding: 12px; text-decoration: none; overflow: hidden; transition: transform .3s, border-color .3s; }
.p5-work-link:hover { transform: translateY(-5px); border-color: var(--pm-primary); }
.p5-work-media { position: relative; display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--pm-tint); }
.p5-work-wide .p5-work-media { aspect-ratio: 16 / 8; }
.p5-work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.p5-work-link:hover .p5-work-media img { transform: scale(1.05); }
.p5-letter { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--pm-font-heading); font-size: 56px; color: var(--pm-primary-text); }
.p5-work-count { position: absolute; left: 12px; bottom: 12px; padding: 2px 12px; border-radius: 999px; background: color-mix(in srgb, var(--pm-bg) 82%, transparent); color: var(--pm-text); }
.p5-work-play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: var(--pm-primary); color: var(--pm-on-primary); }
.p5-work-play .pm-icon { margin-left: 3px; }
.p5-work-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 18px 14px 12px; }
.p5-work-title { font-family: var(--pm-font-heading); font-size: 19px; font-weight: 600; }
.p5-work-summary { color: var(--pm-muted); }
.p5-work-more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; color: var(--pm-primary-text); }
.p5-work-link:hover .p5-work-more .pm-icon { transform: translate(2px, -2px); }
.p5-work-more .pm-icon { transition: transform .25s; }

/* References */
.p5-refs > * { grid-column: span 6; }
.p5-ref-head { display: flex; align-items: center; gap: 14px; }
.p5-avatar { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--pm-tint); color: var(--pm-primary-text); font-family: var(--pm-font-heading); font-weight: 600; font-size: 18px; }
.p5-ref h3 { font-size: 18px; }
.p5-ref-head p { color: var(--pm-muted); line-height: 1.5; }
.p5-ref-contact { margin-top: 16px !important; padding-top: 14px; border-top: 1px solid var(--pm-line); display: flex; flex-direction: column; gap: 6px; }
.p5-ref-contact li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.p5-ref-contact .pm-icon { flex: none; color: var(--pm-primary-text); }
.p5-ref-contact a { text-decoration: none; overflow-wrap: anywhere; }
.p5-ref-contact a:hover { color: var(--pm-primary-text); }

/* Contact */
.p5-contact-bento .p5-contact-info { grid-column: span 4; display: flex; flex-direction: column; gap: 22px; }
.p5-contact-info a, .p5-contact-info span { text-decoration: none; overflow-wrap: anywhere; }
.p5-contact-info a:hover { color: var(--pm-primary-text); }
.p5-contact-bento .p5-form, .p5-contact-bento .p5-cta { grid-column: span 8; }
.p5-cta { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; }
.p5-cta h2, .p5-cta h3 { font-size: 24px; }
.p5-cta p { color: var(--pm-muted); margin-bottom: 10px !important; }
.p5-cta-wide { grid-column: span 12; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.p5-cta-wide p { margin-bottom: 0 !important; }

.p5-form .wpcf7-form p { margin: 0 0 18px; }
.p5-form .wpcf7-form label { display: block; font-family: var(--p5-mono); font-size: 16px; color: var(--pm-muted); }
.p5-form .wpcf7-form br { display: none; }
.p5-form .wpcf7-form-control-wrap { display: block; margin-top: 6px; }
.p5-form input[type="text"], .p5-form input[type="email"], .p5-form input[type="tel"], .p5-form input[type="url"],
.p5-form input[type="number"], .p5-form input[type="date"], .p5-form select, .p5-form textarea {
	width: 100%;
	min-height: 50px;
	padding: 12px 16px;
	border: 1px solid var(--pm-line);
	border-radius: 14px;
	background: color-mix(in srgb, var(--pm-text) 5%, transparent);
	color: var(--pm-text);
	font: inherit;
	font-size: 16px;
	transition: border-color .2s, box-shadow .2s;
}
.p5-form textarea { height: 150px; min-height: 110px; resize: vertical; }
.p5-form input:focus, .p5-form select:focus, .p5-form textarea:focus { outline: none; border-color: var(--pm-primary); box-shadow: 0 0 0 3px var(--pm-tint); }
.p5-form .wpcf7-submit { min-height: 50px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--pm-primary); color: var(--pm-on-primary); font-family: var(--pm-font-heading); font-size: 16px; font-weight: 500; cursor: pointer; transition: transform .25s, background-color .25s; }
.p5-form .wpcf7-submit:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--pm-primary) 84%, var(--pm-text)); }
.p5-form .wpcf7-spinner { vertical-align: middle; margin-left: 12px; }
.p5-form .wpcf7-not-valid-tip { margin-top: 6px; font-size: 16px; color: #FF8A8A; }
.p5-form .wpcf7-response-output { margin: 18px 0 0 !important; padding: 12px 16px !important; border-radius: 12px; border-width: 1px !important; font-size: 16px; }

/* ---------- Project page ---------- */

.p5-article { padding-top: 132px; }
.p5-crumbs { display: flex; gap: 8px; margin-bottom: 18px; }
.p5-crumbs a { text-decoration: none; color: var(--pm-primary-text); }
.p5-article-bento > * { grid-column: span 12; }
.p5-article-main { display: flex; flex-direction: column; gap: var(--p5-gap); grid-column: span 8 !important; }
.p5-article-info { grid-column: span 4 !important; position: sticky; top: 108px; align-self: start; }
.p5-article-info dl { display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px !important; }
.p5-media-card { padding: 12px; overflow: hidden; }
.p5-media-card > img { width: 100%; border-radius: 14px; }
.p5-video img { width: 100%; height: 100%; object-fit: cover; }
/* The box keeps its shape after the picture is swapped for the video. */
.p5-video { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #000; border-radius: 14px; overflow: hidden; cursor: pointer; }
.p5-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 14px; }
.p5-play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: var(--pm-primary); color: var(--pm-on-primary); transition: transform .25s; }
.p5-play .pm-icon { margin-left: 4px; }
.p5-video:hover .p5-play { transform: scale(1.07); }
.p5-slider { position: relative; }
.p5-slides { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; }
.p5-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .4s ease; }
.p5-slide.is-active { opacity: 1; }
.p5-slide img { width: 100%; height: 100%; object-fit: contain; }
.p5-slider-btn { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--pm-surface) 90%, transparent); color: var(--pm-text); font-size: 24px; line-height: 1; cursor: pointer; }
.p5-slider-btn:hover { background: var(--pm-primary); color: var(--pm-on-primary); }
.p5-slider-prev { left: 22px; }
.p5-slider-next { right: 22px; }
.p5-slider-dots { position: absolute; left: 0; right: 0; bottom: 24px; display: flex; justify-content: center; gap: 8px; }
.p5-slider-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--pm-text) 35%, transparent); cursor: pointer; }
.p5-slider-dot.is-active { background: var(--pm-primary); }
.p5-entry { font-size: 17px; }

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

.p5-footer { padding: 20px 0 42px; font-size: 15px; }
.p5-footer-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 22px; padding: 22px 28px; }
.p5-footer-name { font-family: var(--pm-font-heading); font-size: 17px; font-weight: 600; }
.p5-footer .p5-mono { font-size: 15px; }
.p5-social { display: flex; flex-wrap: wrap; gap: 8px; }
.p5-social a { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--pm-line); border-radius: 12px; text-decoration: none; font-size: 15px; transition: background-color .25s, color .25s; }
.p5-social a:hover { background: var(--pm-primary); color: var(--pm-on-primary); }
.p5-social .pm-icon { width: 17px; height: 17px; }
.p5-credit { color: var(--pm-muted); }
.p5-credit a { color: var(--pm-text); text-decoration: none; }

/* ---------- Fade in ---------- */

.pm-js :is(.p5-head, .p5-bento > *, .p5-article-main > *, .p5-article-info) {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity .7s ease, transform .7s ease;
	transition-delay: var(--pm-delay, 0s);
}
.pm-js :is(.p5-head, .p5-bento > *, .p5-article-main > *, .p5-article-info).is-visible { opacity: 1; transform: none; }

/* ---------- Tablet ---------- */

@media (max-width: 1080px) {
	.p5-hero-main, .p5-about-main { grid-column: span 12; }
	.p5-hero-bento .p5-photo-card, .p5-about-bento .p5-photo-card { grid-column: span 6; }
	.p5-stat { grid-column: span 3; }
	.p5-links-card { grid-column: span 6; }
	.p5-bento > *, .p5-works > *, .p5-skills-bento > * { grid-column: span 6; }
	.p5-work-wide, .p5-service-lead, .p5-service-photo { grid-column: span 12; }
	.p5-article-main, .p5-article-info { grid-column: span 12 !important; }
	.p5-article-info { position: static; }
}

/* ---------- Phone and small tablet ---------- */

@media (max-width: 980px) {
	.p5-menu-btn { display: grid; }
	.p5-bar-cta { display: none; }
	.p5-bar-inner { position: relative; }
	.p5-nav {
		position: absolute;
		top: calc(100% + 12px);
		left: 0;
		right: 0;
		display: none;
		padding: 12px;
		border: 1px solid var(--pm-line);
		border-radius: 20px;
		background: color-mix(in srgb, var(--pm-surface) 92%, var(--pm-bg));
		box-shadow: 0 26px 50px -20px color-mix(in srgb, var(--pm-bg) 90%, transparent);
	}
	.p5-nav.is-open { display: block; }
	.p5-nav ul { flex-direction: column; gap: 2px; }
	.p5-nav a { padding: 12px 14px; }
}

@media (max-width: 640px) {
	:root { --p5-gap: 14px; }
	.p5-wrap { width: min(1400px, 100% - 28px); }
	.p5-section { padding: 40px 0; }
	.p5-hero, .p5-article { padding-top: 112px; }
	.p5-bento > *, .p5-works > *, .p5-skills-bento > *, .p5-resume-bento > *, .p5-refs > *, .p5-stat,
	.p5-contact-bento .p5-contact-info, .p5-contact-bento .p5-form, .p5-contact-bento .p5-cta { grid-column: span 12; }
	.p5-card { padding: 22px; }
	.p5-hero-main { padding: 26px; }
	.p5-details { grid-template-columns: 1fr; }
	.p5-photo-card img { min-height: 220px; }
	.p5-slider-prev { left: 16px; }
	.p5-slider-next { right: 16px; }
	.p5-footer-card { flex-direction: column; text-align: center; }
	.p5-cta-wide { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.pm5 *, .pm5 *::before, .pm5 *::after { transition: none !important; animation: none !important; }
	.pm-js :is(.p5-head, .p5-bento > *, .p5-article-main > *, .p5-article-info) { opacity: 1; transform: none; }
}
