/* PortfolioMo – Template 2
   Colors come from the chosen palette (--pm-*). The side menu uses the flipped
   (darker) palette on light themes, set by the .pm-invert class.
   Text size rule for every template: nothing smaller than 16px, except the footer (15px). */

:root {
	--pm-bg: #F4F9FF;
	--pm-surface: #FFFFFF;
	--pm-text: #10233F;
	--pm-muted: #50627A;
	--pm-primary: #1D4ED8;
	--pm-accent: #93C5FD;
	--pm-on-primary: #FFFFFF;
	--pm-primary-text: #1D4ED8;
	--pm-inv-bg: #10233F;
	--pm-inv-surface: #1F3049;
	--pm-inv-text: #F4F9FF;
	--pm-inv-muted: #AAB6C6;
	--pm-inv-primary: #7FA3F0;
	--pm-inv-primary-text: #7FA3F0;
	--pm-inv-on-primary: #111111;

	--pm-font-heading: "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--pm-font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--p2-side-w: 300px;
	--p2-radius: 12px;
}

:root, .pm-invert {
	--pm-line: color-mix(in srgb, var(--pm-text) 12%, transparent);
	--pm-line-strong: color-mix(in srgb, var(--pm-text) 22%, transparent);
	--pm-tint: color-mix(in srgb, var(--pm-primary) 12%, transparent);
	--pm-hover: color-mix(in srgb, var(--pm-text) 8%, transparent);
}

.pm-invert {
	--pm-bg: var(--pm-inv-bg);
	--pm-surface: var(--pm-inv-surface);
	--pm-text: var(--pm-inv-text);
	--pm-muted: var(--pm-inv-muted);
	--pm-primary: var(--pm-inv-primary);
	--pm-on-primary: var(--pm-inv-on-primary);
	--pm-primary-text: var(--pm-inv-primary-text);
	color: var(--pm-text);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.pm2 {
	margin: 0;
	background: var(--pm-bg);
	color: var(--pm-text);
	font-family: var(--pm-font-body);
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
:where(.pm2) :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure) { margin: 0; padding: 0; }
:where(.pm2) :where(ul, ol) { list-style: none; }
:where(.pm2) img { max-width: 100%; height: auto; display: block; }
:where(.pm2) a { color: inherit; }
:where(.pm2) button { font: inherit; color: inherit; }
.pm2 h1, .pm2 h2, .pm2 h3, .pm2 h4 { font-family: var(--pm-font-heading); color: var(--pm-text); line-height: 1.25; }
.pm2 :focus-visible { outline: 3px solid var(--pm-primary); outline-offset: 3px; border-radius: 6px; }
.pm-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.p2-skip { position: fixed; left: 16px; top: -60px; z-index: 1000; padding: 10px 16px; background: var(--pm-primary); color: var(--pm-on-primary); border-radius: 8px; text-decoration: none; }
.p2-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; }

/* ---------- Layout: side menu + main ---------- */

.p2-side {
	position: fixed;
	inset: 0 auto 0 0;
	z-index: 100;
	width: var(--p2-side-w);
	background: var(--pm-bg);
	border-right: 1px solid var(--pm-line);
	overflow-y: auto;
	transition: transform .3s ease;
}
.p2-side:not(.pm-invert) { background: var(--pm-surface); }
.admin-bar .p2-side { top: 32px; }
.p2-side-inner { display: flex; flex-direction: column; align-items: center; min-height: 100%; padding: 28px 20px 32px; }
.p2-profile { display: flex; flex-direction: column; align-items: center; gap: 14px; text-decoration: none; text-align: center; }
.p2-avatar { display: grid; place-items: center; width: 124px; height: 124px; border-radius: 50%; overflow: hidden; border: 8px solid color-mix(in srgb, var(--pm-text) 14%, transparent); background: var(--pm-surface); font-family: var(--pm-font-heading); font-size: 36px; font-weight: 700; color: var(--pm-primary-text); }
.p2-avatar img { width: 100%; height: 100%; object-fit: cover; }
.p2-name { font-family: var(--pm-font-heading); font-size: 24px; font-weight: 700; line-height: 1.25; color: var(--pm-text); }
.p2-logo-img img { max-height: 54px; width: auto; max-width: 100%; }

.p2-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px !important; }
.p2-social a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--pm-text) 10%, transparent); color: var(--pm-text); text-decoration: none; font-size: 16px; font-weight: 700; transition: background-color .25s, color .25s, transform .25s; }
.p2-social a:hover { background: var(--pm-primary); color: var(--pm-on-primary); transform: translateY(-2px); }
.p2-social .pm-icon { width: 18px; height: 18px; }
.p2-social .pm-link-letter { font-size: 16px; }

.p2-nav { width: 100%; margin-top: 30px; }
.p2-nav ul { display: flex; flex-direction: column; gap: 4px; }
.p2-nav a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 11px 16px;
	border-radius: 10px;
	color: var(--pm-muted);
	font-size: 16px;
	text-decoration: none;
	transition: background-color .25s, color .25s;
}
.p2-nav a .pm-icon { flex: none; transition: color .25s; }
.p2-nav a:hover { background: var(--pm-hover); color: var(--pm-text); }
.p2-nav a:hover .pm-icon, .p2-nav a.is-active .pm-icon { color: var(--pm-primary-text); }
.p2-nav a.is-active { color: var(--pm-text); font-weight: 600; background: var(--pm-hover); }

.p2-main { margin-left: var(--p2-side-w); }
.p2-wrap { width: min(1400px, 100% - 64px); margin-inline: auto; }

.p2-menu-btn {
	position: fixed;
	top: 14px;
	right: 14px;
	z-index: 120;
	display: none;
	place-items: center;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: var(--pm-primary);
	color: var(--pm-on-primary);
	box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .4);
	cursor: pointer;
}
.p2-menu-btn span { line-height: 0; }
.p2-menu-close { display: none; }
.p2-menu-btn[aria-expanded="true"] .p2-menu-open { display: none; }
.p2-menu-btn[aria-expanded="true"] .p2-menu-close { display: inline; }

/* ---------- Buttons and links ---------- */

.p2-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.p2-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 26px;
	border-radius: 50px;
	border: 2px solid transparent;
	font-weight: 600;
	font-size: 16px;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .25s, color .25s, border-color .25s, transform .25s, box-shadow .25s;
}
.p2-btn-primary { background: var(--pm-primary); color: var(--pm-on-primary); }
.p2-btn-primary:hover { background: var(--pm-text); color: var(--pm-bg); transform: translateY(-2px); box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--pm-text) 70%, transparent); }
.p2-btn-ghost { border-color: var(--pm-line-strong); color: var(--pm-text); background: color-mix(in srgb, var(--pm-surface) 70%, transparent); }
.p2-btn-ghost:hover { border-color: var(--pm-primary); background: var(--pm-primary); color: var(--pm-on-primary); transform: translateY(-2px); }
.p2-btn-block { width: 100%; }
.p2-link { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; color: var(--pm-primary-text); text-decoration: none; border-radius: 4px; transition: background-color .25s; }
.p2-link:hover { background: var(--pm-tint); }

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

.p2-hero {
	position: relative;
	min-height: min(720px, 88vh);
	display: flex;
	align-items: center;
	overflow: hidden;
	background:
		radial-gradient(ellipse at 20% 20%, color-mix(in srgb, var(--pm-accent) 30%, transparent), transparent 55%),
		radial-gradient(ellipse at 80% 70%, color-mix(in srgb, var(--pm-primary) 22%, transparent), transparent 60%),
		color-mix(in srgb, var(--pm-primary) 8%, var(--pm-bg));
}
.admin-bar .p2-hero { min-height: min(720px, calc(88vh - 32px)); }
.p2-network { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.p2-network-lines line { stroke: var(--pm-primary); stroke-opacity: .16; stroke-width: 1.2; }
.p2-network-dots circle { fill: var(--pm-primary); fill-opacity: .18; }
.p2-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; padding: 64px 0; }
.p2-hero-text { align-self: center; }
.p2-hero h1 { font-size: clamp(40px, 5.2vw, 68px); font-weight: 800; letter-spacing: -0.01em; line-height: 1.08; }
.p2-hero-role { margin-top: 14px !important; font-family: var(--pm-font-heading); font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; color: var(--pm-text); }
.p2-typed { position: relative; color: var(--pm-primary-text); border-right: 3px solid var(--pm-primary); padding-right: 4px; white-space: nowrap; }
.p2-typed::after { content: ""; position: absolute; left: 0; right: 4px; bottom: -8px; height: 3px; border-radius: 2px; background: var(--pm-primary); }
.pm-js .p2-typed { animation: p2-caret 1s steps(1) infinite; }
@keyframes p2-caret { 50% { border-right-color: transparent; } }
.p2-hero-lead { margin-top: 28px !important; max-width: 52ch; font-size: 17px; color: var(--pm-muted); }
.p2-hero-photo {
	position: relative;
	justify-self: center;
	align-self: center;
	width: min(100%, 400px);
}
/* Same frame as the About photo: rounded picture with an offset outline behind it. */
.p2-hero-photo::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 3px solid var(--pm-primary); border-radius: var(--p2-radius); }
.p2-hero-photo img { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--p2-radius); box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--pm-text) 55%, transparent); }
.p2-hero-nophoto .p2-hero-grid { grid-template-columns: 1fr; }
.p2-hero-nophoto .p2-hero-text { text-align: center; max-width: 820px; margin-inline: auto; }
.p2-hero-nophoto .p2-hero-lead { margin-inline: auto; }
.p2-hero-nophoto .p2-actions { justify-content: center; }

/* ---------- Sections ---------- */

.p2-section { padding: 88px 0; }
.p2-section-tight { padding-top: 24px; }
.p2-tight-top { padding-top: 0; }
.p2-alt { background: color-mix(in srgb, var(--pm-primary) 5%, var(--pm-bg)); }
.p2-title { margin-bottom: 40px; }
.p2-title h2 { position: relative; font-size: clamp(28px, 3vw, 34px); font-weight: 700; padding-bottom: 18px; }
.p2-title h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 50px; height: 3px; border-radius: 2px; background: var(--pm-primary); }
.p2-title p { margin-top: 16px !important; max-width: 70ch; color: var(--pm-muted); }

.p2-card { background: var(--pm-surface); border: 1px solid var(--pm-line); border-radius: var(--p2-radius); box-shadow: 0 6px 24px -18px color-mix(in srgb, var(--pm-text) 60%, transparent); }
.p2-cards { --gap: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.p2-cards > li { flex: 0 1 calc((100% - 2 * var(--gap)) / 3); min-width: 0; }

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

/* About */
.p2-about { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; align-items: center; }
.p2-about-nophoto { grid-template-columns: 1fr; }
.p2-about-photo { position: relative; }
.p2-about-photo::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 3px solid var(--pm-primary); border-radius: var(--p2-radius); }
.p2-about-photo img { position: relative; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--p2-radius); }
.p2-about-text h3 { font-size: 26px; font-weight: 700; color: var(--pm-primary-text); margin-bottom: 14px; }
.p2-details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; margin-top: 24px !important; }
.p2-details li { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.p2-details .p2-detail-email { grid-column: 1 / -1; }
.p2-details .pm-icon { flex: none; color: var(--pm-primary-text); align-self: center; }
.p2-details strong { flex: none; }
.p2-details a, .p2-details span { color: var(--pm-muted); text-decoration: none; overflow-wrap: anywhere; }
.p2-details a:hover { color: var(--pm-primary-text); }


/* Services */
.p2-service { padding: 32px 28px; text-align: center; transition: transform .3s, box-shadow .3s, border-color .3s; }
.p2-service:hover { transform: translateY(-6px); border-color: var(--pm-primary); box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--pm-primary) 70%, transparent); }
.p2-service-icon { display: inline-grid; place-items: center; width: 68px; height: 68px; margin-bottom: 20px; border-radius: 50%; background: var(--pm-primary); color: var(--pm-on-primary); transition: transform .3s; }
.p2-service:hover .p2-service-icon { transform: rotate(-8deg) scale(1.06); }
.p2-service-icon .pm-fa { font-size: 26px; line-height: 1; }
.p2-service h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.p2-service .p2-prose { text-align: left; }
.p2-price { margin-top: 16px !important; font-weight: 700; color: color-mix(in srgb, var(--pm-primary-text) 76%, var(--pm-text)); }

/* Resume */
.p2-resume { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.p2-resume-col:only-child { grid-column: 1 / -1; max-width: 820px; }
.p2-resume-heading { font-size: 24px; font-weight: 700; margin: 0 0 22px !important; }
.p2-resume-item { position: relative; padding: 0 0 26px 24px; border-left: 2px solid var(--pm-primary); }
.p2-resume-item::before { content: ""; position: absolute; left: -9px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--pm-bg); border: 2px solid var(--pm-primary); }
.p2-alt .p2-resume-item::before { background: color-mix(in srgb, var(--pm-primary) 5%, var(--pm-bg)); }
.p2-resume-item:last-child { padding-bottom: 6px; }
.p2-resume-item h4 { font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: 1.35; }
.p2-level { font-size: 16px; font-weight: 600; color: var(--pm-muted); margin-bottom: 2px !important; }
.p2-date { display: inline-block; margin: 8px 0 !important; padding: 3px 14px; border-radius: 4px; background: var(--pm-tint); font-size: 16px; font-weight: 600; color: var(--pm-text); }
.p2-where { font-style: italic; color: var(--pm-muted); }
.p2-resume-item .p2-prose { margin-top: 10px; }
.p2-honors { display: flex; align-items: center; gap: 6px; margin-top: 8px !important; font-weight: 600; font-size: 16px; }
.p2-honors .pm-icon { color: var(--pm-primary-text); }
.p2-trainings { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.p2-trainings:has(> .p2-resume-item:only-child) { grid-template-columns: 1fr; max-width: 820px; }

/* Skills */
.p2-skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.p2-skills-1 { grid-template-columns: 1fr; }
.p2-skills-1 .p2-skill-group ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p2-skills-2 { grid-template-columns: 1fr 1fr; }
.p2-skill-group h3 { font-size: 16px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--pm-tint); }
.p2-skill-group ul { display: grid; gap: 10px 20px; }
.p2-skill-group li { display: flex; align-items: flex-start; gap: 10px; }
.p2-skill-group .pm-icon { flex: none; margin-top: 4px; width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--pm-primary); color: var(--pm-on-primary); stroke-width: 3; }

/* Certifications */
.p2-cert { display: flex; gap: 16px; padding: 22px; align-items: flex-start; }
.p2-cert-icon { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 12px; background: var(--pm-tint); color: var(--pm-primary-text); }
.p2-cert h3 { font-size: 16px; font-weight: 700; }
.p2-cert p { margin-top: 4px !important; font-size: 16px; color: var(--pm-muted); }
.p2-cert .p2-link { margin-top: 8px; }

/* Projects */
.p2-work-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--pm-surface); border: 1px solid var(--pm-line); border-radius: var(--p2-radius); overflow: hidden; transition: transform .3s, box-shadow .3s; }
.p2-work-link:hover { transform: translateY(-6px); box-shadow: 0 20px 40px -24px color-mix(in srgb, var(--pm-text) 70%, transparent); }
.p2-work-media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--pm-tint); }
.p2-work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.p2-work-link:hover .p2-work-media img { transform: scale(1.06); }
.p2-work-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--pm-primary) 55%, transparent), transparent 55%); opacity: 0; transition: opacity .3s; }
.p2-work-link:hover .p2-work-media::after { opacity: 1; }
.p2-work-letter { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--pm-font-heading); font-size: 64px; font-weight: 800; color: var(--pm-primary-text); }
.p2-work-count { position: absolute; left: 12px; bottom: 12px; z-index: 1; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--pm-bg) 85%, transparent); font-size: 16px; font-weight: 600; color: var(--pm-text); }
.p2-work-play { position: absolute; top: 50%; left: 50%; z-index: 1; display: grid; place-items: center; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: var(--pm-primary); color: var(--pm-on-primary); box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
.p2-work-play .pm-icon { margin-left: 3px; }
.p2-work-body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 20px 22px 22px; }
.p2-work-title { font-family: var(--pm-font-heading); font-size: 18px; font-weight: 700; color: var(--pm-text); line-height: 1.35; }
.p2-work-role { font-size: 16px; font-weight: 600; color: var(--pm-primary-text); }
.p2-work-summary { margin-top: 4px; font-size: 16px; color: var(--pm-muted); }
.p2-work-body .p2-link { margin-top: auto; padding-top: 12px; }

/* References */
.p2-ref { padding: 28px; position: relative; }
.p2-ref-quote { position: absolute; top: 20px; right: 20px; color: var(--pm-tint); }
.p2-ref-quote .pm-icon { width: 40px; height: 40px; color: color-mix(in srgb, var(--pm-primary) 30%, transparent); }
.p2-ref h3 { font-size: 18px; font-weight: 700; padding-right: 40px; }
.p2-ref-job { margin-top: 2px !important; font-size: 16px; color: var(--pm-muted); }
.p2-ref-rel { display: inline-block; margin-top: 12px !important; padding: 2px 12px; border-radius: 999px; background: var(--pm-tint); font-size: 16px; font-weight: 600; }
.p2-ref-contact { margin-top: 16px !important; padding-top: 14px; border-top: 1px solid var(--pm-line); display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.p2-ref-contact li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.p2-ref-contact .pm-icon { flex: none; color: var(--pm-primary-text); }
.p2-ref-contact a { text-decoration: none; overflow-wrap: anywhere; }
.p2-ref-contact a:hover { color: var(--pm-primary-text); }
.p2-ref-upon { margin-top: 16px !important; padding-top: 14px; border-top: 1px solid var(--pm-line); font-size: 16px; color: var(--pm-muted); }

/* Contact */
.p2-contact { display: grid; grid-template-columns: 5fr 7fr; gap: 28px; align-items: start; }
.p2-contact-noform { grid-template-columns: 1fr 1fr; align-items: stretch; }
.p2-contact-info { padding: 30px; display: flex; flex-direction: column; gap: 24px; }
.p2-contact-info li { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.p2-contact-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--pm-tint); color: var(--pm-primary-text); transition: background-color .25s, color .25s; }
.p2-contact-info li:hover .p2-contact-icon { background: var(--pm-primary); color: var(--pm-on-primary); }
.p2-contact-info li > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.p2-contact-info strong { font-family: var(--pm-font-heading); font-size: 18px; font-weight: 700; }
.p2-contact-info a, .p2-contact-info li > span:last-child > span { color: var(--pm-muted); text-decoration: none; overflow-wrap: anywhere; }
.p2-contact-info a:hover { color: var(--pm-primary-text); }
.p2-cta { padding: 32px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; }
.p2-cta h3 { font-size: 24px; font-weight: 700; }
.p2-cta p { color: var(--pm-muted); margin-bottom: 8px !important; }
.p2-cta-wide { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.p2-cta-wide p { margin-bottom: 0 !important; }

.p2-form-card { padding: 32px; border-top: 3px solid var(--pm-primary); }
.p2-form-card .wpcf7-form p { margin: 0 0 18px; }
.p2-form-card .wpcf7-form label { display: block; font-size: 16px; font-weight: 600; }
.p2-form-card .wpcf7-form br { display: none; }
.p2-form-card .wpcf7-form-control-wrap { display: block; margin-top: 6px; }
.p2-form-card input[type="text"], .p2-form-card input[type="email"], .p2-form-card input[type="tel"], .p2-form-card input[type="url"],
.p2-form-card input[type="number"], .p2-form-card input[type="date"], .p2-form-card select, .p2-form-card textarea {
	width: 100%;
	min-height: 48px;
	padding: 11px 14px;
	border: 1px solid var(--pm-line-strong);
	border-radius: 8px;
	background: var(--pm-bg);
	color: var(--pm-text);
	font: inherit;
	font-size: 16px;
	transition: border-color .2s, box-shadow .2s;
}
.p2-form-card textarea { height: 160px; min-height: 110px; resize: vertical; }
.p2-form-card input:focus, .p2-form-card select:focus, .p2-form-card textarea:focus { outline: none; border-color: var(--pm-primary); box-shadow: 0 0 0 3px var(--pm-tint); }
.p2-form-card .wpcf7-submit { min-height: 50px; padding: 0 34px; border: 0; border-radius: 50px; background: var(--pm-primary); color: var(--pm-on-primary); font: inherit; font-weight: 600; cursor: pointer; transition: background-color .25s, color .25s, transform .25s; }
.p2-form-card .wpcf7-submit:hover { background: var(--pm-text); color: var(--pm-bg); transform: translateY(-2px); }
.p2-form-card .wpcf7-spinner { vertical-align: middle; margin-left: 12px; }
.p2-form-card .wpcf7-not-valid-tip { margin-top: 6px; font-size: 16px; font-weight: 600; color: #B42318; }
.p2-form-card .wpcf7-not-valid { border-color: #D92D20 !important; }
.p2-form-card .wpcf7-response-output { margin: 18px 0 0 !important; padding: 12px 16px !important; border-radius: 8px; border-width: 1px !important; font-size: 16px; }
.p2-form-card .wpcf7 form.sent .wpcf7-response-output { border-color: #22A06B !important; background: color-mix(in srgb, #22A06B 12%, transparent); }
.p2-form-card .wpcf7 form.invalid .wpcf7-response-output,
.p2-form-card .wpcf7 form.failed .wpcf7-response-output { border-color: #D92D20 !important; background: color-mix(in srgb, #D92D20 10%, transparent); }

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

.p2-page-head { position: relative; overflow: hidden; padding: 72px 0 56px; background: color-mix(in srgb, var(--pm-primary) 8%, var(--pm-bg)); }
.p2-page-head .p2-wrap { position: relative; z-index: 1; }
.p2-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 16px; color: var(--pm-muted); margin-bottom: 14px; }
.p2-crumbs a { color: var(--pm-primary-text); text-decoration: none; }
.p2-crumbs a:hover { text-decoration: underline; }
.p2-page-head h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; max-width: 22ch; }
.p2-page-head p { margin-top: 12px !important; max-width: 60ch; font-size: 17px; color: var(--pm-muted); }
.p2-project { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.p2-project-full { grid-template-columns: minmax(0, 860px); justify-content: center; }
.p2-media-box { position: relative; margin-bottom: 32px; border-radius: var(--p2-radius); overflow: hidden; background: var(--pm-surface); border: 1px solid var(--pm-line); }
.p2-media-box > img { width: 100%; }
.p2-video { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #000; cursor: pointer; }
.p2-video img { width: 100%; height: 100%; object-fit: cover; }
.p2-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.p2-play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: var(--pm-primary); color: var(--pm-on-primary); box-shadow: 0 0 0 10px color-mix(in srgb, var(--pm-primary) 30%, transparent); transition: transform .25s; }
.p2-play .pm-icon { margin-left: 4px; }
.p2-video:hover .p2-play { transform: scale(1.08); }
.p2-slides { position: relative; aspect-ratio: 3 / 2; }
.p2-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .4s ease; }
.p2-slide.is-active { opacity: 1; }
.p2-slide img { width: 100%; height: 100%; object-fit: contain; }
.p2-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) 85%, transparent); color: var(--pm-text); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); transition: background-color .2s, color .2s; }
.p2-slider-btn:hover { background: var(--pm-primary); color: var(--pm-on-primary); }
.p2-slider-prev { left: 12px; }
.p2-slider-next { right: 12px; }
.p2-slider-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 8px; }
.p2-slider-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--pm-text) 35%, transparent); cursor: pointer; transition: background-color .2s, transform .2s; }
.p2-slider-dot.is-active { background: var(--pm-primary); transform: scale(1.25); }
.p2-entry { font-size: 17px; }
.p2-project-info { padding: 28px; position: sticky; top: 24px; }
.p2-project-info h2 { font-size: 20px; font-weight: 700; padding-bottom: 14px; margin-bottom: 14px !important; border-bottom: 1px solid var(--pm-line); }
.p2-project-info ul { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px !important; }
.p2-project-info li { display: flex; flex-direction: column; font-size: 16px; }
.p2-project-info li strong { font-size: 16px; text-transform: uppercase; letter-spacing: .06em; color: var(--pm-muted); }
.p2-project-info li a { color: var(--pm-primary-text); overflow-wrap: anywhere; }

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

.p2-footer { padding: 28px 0; border-top: 1px solid var(--pm-line); font-size: 15px; color: var(--pm-muted); }
.p2-footer .p2-wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; }
.p2-footer strong { color: var(--pm-text); }
.p2-credit a { color: var(--pm-text); text-decoration: none; }
.p2-credit a:hover { color: var(--pm-primary-text); }

/* ---------- Fade in on scroll ---------- */

.pm-js :is(.p2-title, .p2-about-photo, .p2-about-text, .p2-cards > li, .p2-resume-col, .p2-trainings, .p2-skill-group, .p2-contact > *, .p2-project-main, .p2-project-info) {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity .7s ease, transform .7s ease;
	transition-delay: var(--pm-delay, 0s);
}
.pm-js :is(.p2-title, .p2-about-photo, .p2-about-text, .p2-cards > li, .p2-resume-col, .p2-trainings, .p2-skill-group, .p2-contact > *, .p2-project-main, .p2-project-info).is-visible { opacity: 1; transform: none; }
.pm-js .p2-hero-text > * { animation: p2-rise .8s ease both; }
.pm-js .p2-hero-text > *:nth-child(2) { animation-delay: .12s; }
.pm-js .p2-hero-text > *:nth-child(3) { animation-delay: .24s; }
.pm-js .p2-hero-text > *:nth-child(4) { animation-delay: .36s; }
.pm-js .p2-hero-photo { animation: p2-rise 1s .2s ease both; }
@keyframes p2-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

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

@media (max-width: 1199px) {
	:root { --p2-side-w: 260px; }
	.p2-cards > li { flex-basis: calc((100% - var(--gap)) / 2); }
	.p2-skills { grid-template-columns: 1fr 1fr; }
	.p2-project { grid-template-columns: minmax(0, 1fr) 280px; }
}

/* ---------- Side menu becomes a slide-in panel ---------- */

@media (max-width: 991px) {
	.p2-menu-btn { display: grid; }
	.p2-side { transform: translateX(-100%); box-shadow: none; width: min(300px, 86vw); }
	.p2-side.is-open { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .35); }
	.p2-main { margin-left: 0; }
	.p2-wrap { width: min(1400px, 100% - 40px); }
	.p2-hero { min-height: 0; }
	.p2-hero-grid { grid-template-columns: 1fr; gap: 0; }
	.p2-hero-grid { padding: 88px 0 56px; gap: 40px; }
	.p2-hero-text { text-align: center; }
	.p2-hero-lead { margin-inline: auto; }
	.p2-actions { justify-content: center; }
	.p2-hero-photo { width: min(78vw, 340px); }
	.p2-about { grid-template-columns: 1fr; }
	.p2-about-photo { width: min(100%, 360px); margin: 0 auto 18px; }
	.p2-resume, .p2-trainings { grid-template-columns: 1fr; }
	.p2-contact, .p2-contact-noform { grid-template-columns: 1fr; }
	.p2-project { grid-template-columns: 1fr; }
	.p2-project-info { position: static; }
}
@media (max-width: 782px) {
	.admin-bar .p2-side { top: 46px; }
	.admin-bar .p2-menu-btn { top: 60px; }
}
@media (max-width: 600px) {
	.admin-bar .p2-side { top: 0; }
}

/* ---------- Phone ---------- */

@media (max-width: 640px) {
	body.pm2 { font-size: 16px; }
	.p2-section { padding: 64px 0; }
	.p2-section-tight { padding-top: 12px; }
	.p2-cards > li { flex-basis: 100%; }
	.p2-skills, .p2-skills-2 { grid-template-columns: 1fr; }
	.p2-skills-1 .p2-skill-group ul { grid-template-columns: 1fr 1fr; }
	.p2-details { grid-template-columns: 1fr; }
	.p2-contact-info, .p2-form-card, .p2-cta { padding: 22px; }
	.p2-form-card .wpcf7-submit { width: 100%; }
	.p2-footer .p2-wrap { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.pm2 *, .pm2 *::before, .pm2 *::after { transition: none !important; animation: none !important; }
	.pm-js :is(.p2-title, .p2-about-photo, .p2-about-text, .p2-cards > li, .p2-resume-col, .p2-trainings, .p2-skill-group, .p2-contact > *, .p2-project-main, .p2-project-info) { opacity: 1; transform: none; }
}
