/* Pentagon XIT: portfolio + blog. Builds on landing.css and home.css (same tokens, cards and buttons). */

.ppdf [hidden] { display: none !important; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hm-links a.on { color: var(--cyan); }

/* Page hero (smaller than the home hero, same grid + glow) */
.pg-hero { position: relative; padding: 46px 0 40px; overflow: hidden; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(47, 107, 255, .07), transparent); }
.pg-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 75% 0%, #000 0%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 75% 0%, #000 0%, transparent 70%); opacity: .35; pointer-events: none; }
.pg-hero .wrap { position: relative; }
.pg-hero .g1 { width: 420px; height: 420px; top: -240px; right: -120px; opacity: .35; }
.pg-hero .sub { max-width: 720px; }

.crumbs ol { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 14px; color: var(--muted); }
.crumbs li { display: flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: rgba(154, 168, 204, .6); }
.crumbs a { color: #c3cdec; text-decoration: none; }
.crumbs a:hover { color: var(--cyan); }
.crumbs li[aria-current] { color: var(--muted); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* Chips (category, tags) */
.chip { display: inline-flex; align-items: center; font-family: var(--en); font-size: 12.5px; font-weight: 600; letter-spacing: .3px; color: var(--cyan); background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .3); border-radius: 999px; padding: 2px 11px; text-decoration: none; line-height: 1.7; transition: background .15s, border-color .15s; }
a.chip:hover { background: rgba(34, 211, 238, .16); border-color: var(--cyan); }
.chip-amber { color: #04101f; background: var(--amber); border-color: var(--amber); }
.pf-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pf-meta time { color: var(--muted); font-size: 14px; }

/* Filter bar */
.pf-sec { padding-top: 44px; }
.pf-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.pf-filter a { font-family: var(--en); font-weight: 600; font-size: 14.5px; text-decoration: none; color: #c3cdec; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; transition: all .15s; }
.pf-filter a:hover { border-color: rgba(34, 211, 238, .5); color: #fff; }
.pf-filter a.on { background: var(--grad); color: #04101f; border-color: transparent; box-shadow: 0 8px 22px -10px rgba(34, 211, 238, .6); }

/* Portfolio cards */
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 8px; }
.pf-card { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; }
.pf-card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, .45); box-shadow: 0 24px 50px -24px rgba(34, 211, 238, .35); }
.pf-card.is-featured { border-color: rgba(251, 191, 36, .45); }
.pf-shot { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--panel2); overflow: hidden; border-bottom: 1px solid var(--line); cursor: zoom-in; }
.pf-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s ease; }
.pf-card:hover .pf-shot img { transform: scale(1.04); }
.pf-zoom { position: absolute; right: 10px; bottom: 10px; font-size: 13px; font-weight: 600; color: #fff; background: rgba(6, 11, 26, .78); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.pf-shot:hover .pf-zoom, .pf-shot:focus-visible .pf-zoom { opacity: 1; transform: none; }
.pf-noimg { display: flex; align-items: center; justify-content: center; cursor: pointer; background: radial-gradient(circle at 50% 40%, rgba(47, 107, 255, .25), var(--panel2) 70%); }
.pf-noimg img { width: 64px; height: 64px; border-radius: 14px; opacity: .8; }
.pf-badge { position: absolute; top: 12px; left: 12px; z-index: 2; font-size: 13px; font-weight: 700; color: #04101f; background: var(--amber); border-radius: 999px; padding: 2px 12px; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .6); }
.pf-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.pf-title { font-size: 20px; line-height: 1.4; margin: 10px 0 6px; }
.pf-title a { text-decoration: none; }
.pf-title a:hover { color: var(--cyan); }
.pf-desc { color: var(--muted); font-size: 15.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 16px; }
.pf-btn { font-family: var(--en); font-size: 14px; font-weight: 600; text-decoration: none; color: var(--cyan); border: 1px solid rgba(34, 211, 238, .35); border-radius: 10px; padding: 7px 14px; transition: all .15s; }
.pf-btn:hover { background: rgba(34, 211, 238, .1); border-color: var(--cyan); }
.pf-live { color: #04101f; background: var(--grad); border-color: transparent; }
.pf-live:hover { background: var(--grad); filter: brightness(1.08); }
.pf-wide { grid-column: span 2; }
.pf-wide .pf-shot { aspect-ratio: 16 / 8; }
.pf-wide .pf-title { font-size: 24px; }
.pf-more { margin-top: 34px; }

.pf-empty { text-align: center; max-width: 640px; margin: 0 auto; background: var(--panel); border: 1px dashed rgba(140, 170, 255, .3); border-radius: var(--radius); padding: 40px 24px; }
.pf-empty-ic { font-size: 40px; display: block; margin-bottom: 8px; }
.pf-empty h2 { font-size: 22px; margin-bottom: 8px; }
.pf-empty p { color: var(--muted); margin-bottom: 20px; }
.pf-empty a:not(.btn) { color: var(--cyan); }
.pf-grid + .pf-empty { margin-top: 10px; }

/* Home: portfolio + blog sections */
.hm-pf { background: radial-gradient(ellipse at top, rgba(47, 107, 255, .14), transparent 60%); }
.hm-pf .pf-grid, .hm-blog .bl-grid { margin-top: 40px; }

/* Project details */
.pd-tags { margin-bottom: 12px; }
.pd-title { font-size: clamp(28px, 4.4vw, 46px); line-height: 1.25; font-weight: 700; letter-spacing: -.2px; }
.pd-hero .lead { max-width: 760px; }
.pd-sec { padding-top: 40px; }
.pd-proof { margin: 0 0 40px; }
.pd-proof a { position: relative; display: block; border-radius: 20px; overflow: hidden; border: 1px solid rgba(59, 130, 246, .4); box-shadow: 0 30px 80px -30px rgba(47, 107, 255, .5); cursor: zoom-in; background: var(--panel2); }
.pd-proof img { width: 100%; max-height: 640px; object-fit: cover; object-position: top center; }
.pd-proof a:hover .pf-zoom, .pd-proof a:focus-visible .pf-zoom { opacity: 1; transform: none; }
.pd-proof figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 10px; }
.pd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; align-items: start; }
.pd-h { font-size: 26px; margin: 0 0 14px; }
.pd-main > .pd-h:not(:first-child) { margin-top: 40px; }
.pd-csr { display: grid; gap: 14px; margin-top: 30px; }
.pd-c { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--blue2); border-radius: 14px; padding: 18px 20px; }
.pd-c h3 { font-size: 19px; margin-bottom: 6px; }
.pd-c p { color: #c3cdec; }
.pd-c p + p { margin-top: 8px; }
.pd-challenge { border-left-color: var(--red); }
.pd-solution { border-left-color: var(--cyan); }
.pd-result { border-left-color: var(--teal); background: linear-gradient(90deg, rgba(45, 212, 191, .07), var(--panel)); }
.pd-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.pd-gallery a { display: block; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--panel2); cursor: zoom-in; transition: border-color .2s, transform .2s; }
.pd-gallery a:hover { border-color: var(--cyan); transform: translateY(-3px); }
.pd-gallery img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.pd-aside { position: sticky; top: 90px; }
.pd-info { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid rgba(59, 130, 246, .4); border-radius: var(--radius); padding: 22px; }
.pd-info h2 { font-size: 19px; margin-bottom: 10px; }
.pd-info dl { margin: 0 0 16px; }
.pd-info dl div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.pd-info dt { color: var(--muted); }
.pd-info dd { margin: 0; text-align: right; font-weight: 600; word-break: break-word; }
.pd-info dd a { color: var(--cyan); text-decoration: none; }
.pd-info > p { color: #c3cdec; font-size: 15px; margin-bottom: 14px; }
.pd-call { display: block; text-align: center; margin-top: 12px; color: #c3cdec; font-size: 15px; text-decoration: none; }
.pd-call:hover { color: var(--cyan); }

/* Article body text (portfolio full description + blog posts) */
.prose { color: #cdd6f1; font-size: 18px; line-height: 1.85; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: 27px; line-height: 1.35; color: #fff; margin-top: 1.7em; scroll-margin-top: 90px; }
.prose h3 { font-size: 22px; line-height: 1.4; color: #fff; margin-top: 1.4em; scroll-margin-top: 90px; }
.prose h4 { font-size: 19px; color: #fff; margin-top: 1.3em; }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.prose strong, .prose b { color: #fff; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--cyan); }
.prose img { border-radius: 12px; height: auto; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption { color: var(--muted); font-size: 14px; text-align: center; margin-top: 8px; }
.prose blockquote, .prose .wp-block-quote { margin-left: 0; margin-right: 0; padding: 14px 20px; border-left: 3px solid var(--cyan); background: rgba(34, 211, 238, .06); border-radius: 0 12px 12px 0; color: #e3eaff; font-size: 19px; }
.prose blockquote cite { display: block; font-size: 14px; color: var(--muted); font-style: normal; margin-top: 6px; }
.prose code { font-family: Consolas, Menlo, monospace; font-size: .88em; background: rgba(255, 255, 255, .08); border-radius: 6px; padding: 1px 6px; }
.prose pre { background: #050914; border: 1px solid var(--line); border-radius: 12px; padding: 16px; overflow-x: auto; font-size: 15px; line-height: 1.6; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose .wp-block-table { overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--panel2); color: #fff; }
.prose iframe, .prose video { max-width: 100%; border-radius: 12px; }
.prose .wp-block-embed iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.prose .wp-block-button__link, .prose .wp-element-button { display: inline-block; background: var(--grad); color: #04101f; font-weight: 700; text-decoration: none; border-radius: 12px; padding: 11px 20px; }
.prose .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.prose .wp-block-columns { display: flex; flex-wrap: wrap; gap: 20px; }
.prose .wp-block-column { flex: 1 1 240px; min-width: 0; }

/* Blog cards */
.bl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.bl-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; }
.bl-card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, .45); box-shadow: 0 24px 50px -24px rgba(34, 211, 238, .35); }
.bl-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel2); border-bottom: 1px solid var(--line); }
.bl-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.bl-card:hover .bl-img img { transform: scale(1.04); }
.bl-noimg { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, rgba(47, 107, 255, .25), var(--panel2) 70%); }
.bl-noimg img { width: 56px !important; height: 56px !important; border-radius: 12px; opacity: .8; }
.bl-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.bl-title { font-size: 19.5px; line-height: 1.45; margin: 10px 0 8px; }
.bl-title a { text-decoration: none; }
.bl-title a:hover { color: var(--cyan); }
.bl-ex { color: var(--muted); font-size: 15.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bl-more { margin-top: auto; padding-top: 14px; color: var(--cyan); font-weight: 700; text-decoration: none; }
.bl-more:hover { text-decoration: underline; }

.bl-search { display: flex; gap: 8px; max-width: 520px; margin-top: 22px; }
.bl-search input { flex: 1; min-width: 0; font: 16px var(--bn); color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.bl-search input:focus { outline: 0; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .15); }
.bl-search .btn { box-shadow: none; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }
.pager .page-numbers { min-width: 44px; text-align: center; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: #c3cdec; text-decoration: none; font-weight: 600; }
.pager a.page-numbers:hover { border-color: var(--cyan); color: #fff; }
.pager .current { background: var(--grad); color: #04101f; border-color: transparent; }
.pager .dots { background: none; border: 0; }

/* Blog article */
.ar-head { padding-bottom: 34px; }
.ar-title { font-size: clamp(28px, 4.4vw, 44px); line-height: 1.3; font-weight: 700; letter-spacing: -.2px; margin-top: 14px; }
.ar-head .lead { font-size: 19px; }
.ar-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 20px; color: var(--muted); font-size: 15px; }
.ar-author-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 600; }
.ar-author-link img { width: 36px; height: 36px; border-radius: 50%; }
.ar-body { padding-top: 34px; padding-bottom: 70px; }
.ar-hero { margin: 0 0 30px; }
.ar-hero img { width: 100%; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8); }
.toc { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; margin-bottom: 30px; }
.toc summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.toc ol { margin: 0 0 14px; padding-left: 1.3em; display: grid; gap: 4px; }
.toc a { color: #c3cdec; text-decoration: none; }
.toc a:hover { color: var(--cyan); }
.toc .toc-l3 { margin-left: 1em; list-style: circle; font-size: 15.5px; }
.ar-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 36px; color: var(--muted); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); }
.sh { font: 600 14px var(--en); color: #fff; text-decoration: none; border: 0; border-radius: 10px; padding: 7px 14px; cursor: pointer; }
.sh.fb { background: #1877f2; }
.sh.wa { background: #16a34a; }
.sh.li { background: #0a66c2; }
.sh.cp { background: rgba(255, 255, 255, .1); border: 1px solid var(--line); font-family: var(--bn); }
.sh.cp.ok { background: #16a34a; }
.ar-author { display: flex; gap: 18px; align-items: flex-start; margin-top: 30px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.ar-author img { width: 72px; height: 72px; border-radius: 50%; flex: none; }
.ar-author .kicker { margin-bottom: 0; font-size: 13px; }
.ar-author h2 { font-size: 20px; }
.ar-author h2 a { text-decoration: none; }
.ar-author p:not(.kicker) { color: var(--muted); font-size: 15.5px; margin-top: 4px; }
.ar-cta { margin-top: 30px; text-align: center; background: linear-gradient(160deg, rgba(47, 107, 255, .22), rgba(14, 24, 51, 1) 70%); border: 1px solid rgba(59, 130, 246, .5); border-radius: 20px; padding: 30px 24px; }
.ar-cta h2 { font-size: 24px; }
.ar-cta p { color: #c9d4f2; margin-top: 8px; }
.ar-cta .cta-row { justify-content: center; }
.rd-prog { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; pointer-events: none; }
.rd-prog i { display: block; height: 100%; width: 0; background: var(--grad); }
.admin-bar .rd-prog { top: 32px; }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 100000; display: none; overflow: auto; background: rgba(3, 6, 15, .94); padding: 56px 16px 24px; }
.lb.open { display: flex; }
html.lb-on { overflow: hidden; }
.lb figure { margin: auto; max-width: min(1200px, 100%); }
.lb img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.lb figcaption { text-align: center; color: #c3cdec; font-size: 15px; margin-top: 12px; }
.lb button { position: fixed; z-index: 2; display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: rgba(14, 24, 51, .9); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.lb button:hover { border-color: var(--cyan); }
.lb-x { top: 12px; right: 12px; }
.lb-p { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-n { right: 12px; top: 50%; transform: translateY(-50%); }
.lb.lb-single .lb-p, .lb.lb-single .lb-n { display: none; }

/* Mobile nav toggle (used on every company page) */
.nav-tg { display: none; position: relative; width: 42px; height: 42px; flex: none; border-radius: 10px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); cursor: pointer; }
.nav-tg span, .nav-tg span::before, .nav-tg span::after { position: absolute; left: 11px; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
.nav-tg span { top: 19px; }
.nav-tg span::before, .nav-tg span::after { content: ""; left: 0; }
.nav-tg span::before { top: -6px; }
.nav-tg span::after { top: 6px; }
.nav-open .nav-tg span { background: transparent; }
.nav-open .nav-tg span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-tg span::after { transform: translateY(-6px) rotate(-45deg); }

/* Responsive */
@media (max-width: 1020px) {
	.nav-tg { display: inline-flex; }
	.hm .nav-in .nav-cta { margin-left: auto; }
	.nav-open .hm-links { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; padding: 6px 20px 14px; background: rgba(6, 11, 26, .98); border-bottom: 1px solid var(--line); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .8); }
	.nav-open .hm-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
	.nav-open .hm-links a:last-child { border-bottom: 0; }
	.pd-layout { grid-template-columns: 1fr; }
	.pd-aside { position: static; }
}
@media (max-width: 960px) {
	.pf-grid, .bl-grid { grid-template-columns: 1fr 1fr; }
	.pf-wide { grid-column: auto; }
	.pf-wide .pf-shot { aspect-ratio: 16 / 10; }
	.pf-wide .pf-title { font-size: 20px; }
}
@media (max-width: 640px) {
	.pg-hero { padding: 30px 0 30px; }
	.pf-grid, .bl-grid { grid-template-columns: 1fr; gap: 18px; }
	.pf-filter { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 24px; padding: 0 16px 6px; scrollbar-width: none; }
	.pf-filter::-webkit-scrollbar { display: none; }
	.pf-filter a { flex: none; }
	.pf-zoom { opacity: 1; transform: none; font-size: 12px; }
	.pd-gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
	.pd-proof { margin-bottom: 30px; }
	.pd-proof a { border-radius: 14px; }
	.prose { font-size: 17px; }
	.prose h2 { font-size: 23px; }
	.prose h3 { font-size: 20px; }
	.ar-meta { gap: 6px 14px; font-size: 14px; }
	.ar-author { flex-direction: column; }
	.ar-cta .cta-row .btn { width: 100%; }
	.crumbs li[aria-current] { max-width: 22ch; }
	.lb { padding: 56px 8px 16px; }
	.lb-p, .lb-n { top: auto; bottom: 12px; transform: none; }
}
@media (max-width: 420px) {
	.hm .nav-in .nav-cta { display: none; }
	.nav-tg { margin-left: auto; }
}
@media (max-width: 782px) {
	.admin-bar .rd-prog { top: 46px; }
}
@media (prefers-reduced-motion: reduce) {
	.pf-shot img, .bl-img img { transition: none; }
}
