/* ==========================================================================
   Design refinements layered on top of theme.css
   ========================================================================== */

:root {
	--ink: #111214;
	--body: #55585d;      /* 7:1 on white; theme's #838485 fails WCAG AA */
	--muted: #7a7d82;
	--line: rgba(0, 0, 0, 0.08);
	--soft: #f5f6f8;
	--radius: 0.75rem;
}

/* ---------- Readability ---------- */
body { color: var(--body); }
body a:not([class*='button'], .link-decoration, .nav-link) { color: var(--body); }
body a:not([class*='button'], .link-decoration, .nav-link):hover { color: var(--ink); }
::selection { background: var(--ink); color: #fff; }

:focus-visible {
	outline: 2px dashed currentColor;
	outline-offset: 3px;
	border-radius: 4px;
}

.section-box h2 { letter-spacing: -0.01em; }

/* ---------- Portfolio grid: consistent tiles ---------- */
.portfolio-box {
	aspect-ratio: 16 / 10;
	background: var(--soft);
	border: 1px solid var(--line);
}
.portfolio-box > img,
.portfolio-box > video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}
.portfolio-box:after { background-image: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 60%); }
.portfolio-box .portfolio-category { background: rgba(0, 0, 0, 0.45); }

/* Touch screens have no hover: keep captions visible */
@media (hover: none) {
	.portfolio-box:after { opacity: 1; }
	.portfolio-box .portfolio-caption { visibility: visible; opacity: 1; margin-bottom: 0; }
}

.portfolio-more { margin-top: 2rem; }

/* ---------- Left nav: case study sub-list ---------- */
.section-nav ul.nav-sub {
	margin: 0.1rem 0 0.5rem 0.15rem;
	padding: 0 0 0 0.9rem;
	border-left: 1px dashed rgba(255, 255, 255, 0.25);
}
.section-nav ul.nav-sub li a {
	padding: 0.32rem 0;
	font-size: 0.72rem;
	letter-spacing: 0.3px;
	color: rgba(255, 255, 255, 0.5);
}
.section-nav ul.nav-sub li a:hover,
.section-nav ul.nav-sub li a.current { color: #fff; }
.section-nav ul.nav-sub li a.current:before {
	content: '';
	position: absolute;
	top: 50%;
	left: -1.05rem;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #fff;
	transform: translateY(-50%);
}
@media (max-width: 991.98px) {
	.section-nav ul.nav-sub { display: none; }
}

/* ---------- Case study: hero ---------- */
.cs-hero h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.cs-lead {
	max-width: 62ch;
	color: var(--ink);
	font-size: 1.125rem;
	line-height: 1.65;
}
.cs-meta {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 1px;
	margin: 2rem 0 1.5rem;
	background: var(--line);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}
.cs-meta div { background: #fff; padding: 1rem 1.15rem; }
.cs-meta span {
	display: block;
	margin-bottom: 0.3rem;
	color: var(--muted);
	font-family: "Roboto Mono", monospace;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.6px;
}
.cs-meta strong { color: var(--ink); font-weight: 500; font-size: 0.95rem; line-height: 1.45; }
.cs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.cs-actions .list-inline-pills { margin: 0; }
.cs-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.65em 1.2em;
	border-radius: 2em;
	background: var(--ink);
	color: #fff !important;
	font-family: "Roboto Mono", monospace;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: transform 0.15s ease-out;
}
.cs-link:hover { transform: translateY(-2px); }
.cs-cover {
	display: block;
	width: 100%;
	max-height: 460px;
	object-fit: cover;
	object-position: center 35%;
	margin-top: 2rem;
	border-radius: var(--radius);
	border: 1px solid var(--line);
}

/* ---------- Case study: body ---------- */
.cs-section + .cs-section { margin-top: 3.25rem; }
.cs-eyebrow {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--muted);
	font-family: "Roboto Mono", monospace;
	font-size: 0.75rem;
	letter-spacing: 0.6px;
}
.cs-section p, .cs-section li { max-width: 70ch; }
.cs-section ul.cs-list { padding-left: 1.1rem; }
.cs-section ul.cs-list li { margin-bottom: 0.4rem; }

.cs-highlights {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.cs-highlights li {
	max-width: none;
	padding: 1.15rem 1.25rem;
	background: var(--soft);
	border-radius: var(--radius);
	color: var(--ink);
	line-height: 1.55;
}
.cs-highlights i { display: block; margin-bottom: 0.5rem; font-size: 1.25rem; }

.cs-flow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
}
.cs-flow li {
	max-width: none;
	padding: 0.55em 1em;
	border: 1px dashed var(--ink);
	border-radius: 2em;
	color: var(--ink);
	font-family: "Roboto Mono", monospace;
	font-size: 0.8rem;
	text-transform: uppercase;
}
.cs-flow li.is-me { background: var(--ink); color: #fff; border-style: solid; }
.cs-flow li.arrow { padding: 0; border: 0; color: var(--muted); }

.cs-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.5rem;
	margin-top: 1.25rem;
}
.cs-gallery.cols-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.cs-gallery figure { margin: 0; }
.cs-gallery img {
	width: 100%;
	border-radius: var(--radius);
	border: 1px solid var(--line);
}
.cs-gallery figcaption {
	margin-top: 0.6rem;
	color: var(--muted);
	font-size: 0.85rem;
	line-height: 1.5;
}
.cs-gallery figcaption b {
	display: block;
	color: var(--ink);
	font-family: "Roboto Mono", monospace;
	font-size: 0.72rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.cs-video { width: 100%; margin-top: 1.25rem; border-radius: var(--radius); border: 1px solid var(--line); }

.cs-note {
	margin-top: 1.25rem;
	padding: 0.9rem 1.1rem;
	border-left: 3px solid var(--ink);
	background: var(--soft);
	border-radius: 0 var(--radius) var(--radius) 0;
	font-size: 0.9rem;
}

/* services-list reused for steps: tighten inside case studies */
.cs-section .services-list { margin: 1.25rem 0 0; padding: 0; }

/* ---------- Next case study ---------- */
.cs-next {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 2.25em 3em;
	border-radius: 0.5em;
	background: var(--ink);
	color: #fff !important;
	transition: transform 0.2s ease-out;
}
.cs-next:hover { transform: translateY(-3px); }
.cs-next span {
	display: block;
	margin-bottom: 0.4rem;
	color: rgba(255, 255, 255, 0.6);
	font-family: "Roboto Mono", monospace;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.6px;
}
.cs-next strong { color: #fff; font-family: "Poppins", sans-serif; font-size: clamp(1.3rem, 2.5vw, 1.75rem); font-weight: 600; }
.cs-next i { font-size: 2rem; transition: transform 0.2s ease-out; }
.cs-next:hover i { transform: translateX(6px); }
@media (max-width: 767.98px) { .cs-next { padding: 1.75em 1.5em; } }

/* ---------- Case studies index ---------- */
.cs-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
	margin-top: 2rem;
}
.cs-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	color: inherit !important;
	transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.cs-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(22, 24, 26, 0.1); }
.cs-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; background: var(--soft); }
.cs-card div { display: flex; flex: 1; flex-direction: column; padding: 1.25rem 1.35rem 1.4rem; }
.cs-card span {
	color: var(--muted);
	font-family: "Roboto Mono", monospace;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.cs-card h3 { margin: 0.45rem 0 0.4rem; color: var(--ink); font-size: 1.3rem; }
.cs-card p { flex: 1; margin-bottom: 1rem; font-size: 0.92rem; line-height: 1.55; }
.cs-card em {
	color: var(--ink);
	font-family: "Roboto Mono", monospace;
	font-size: 0.75rem;
	font-style: normal;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* ==========================================================================
   Recruiter-facing homepage
   ========================================================================== */

/* Availability badge */
.open-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	margin-bottom: 0.9rem;
	padding: 0.4em 0.95em;
	border: 1px solid rgba(22, 128, 61, 0.25);
	border-radius: 2em;
	background: #effaf3;
	color: #146c37;
	font-family: "Roboto Mono", monospace;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}
.open-badge i {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #1f9d55;
	box-shadow: 0 0 0 0 rgba(31, 157, 85, 0.5);
	animation: pulse 2s infinite;
}
@keyframes pulse {
	70% { box-shadow: 0 0 0 7px rgba(31, 157, 85, 0); }
	100% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0); }
}
@media (prefers-reduced-motion: reduce) { .open-badge i { animation: none; } }

/* Calls to action */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.5rem; }
.cs-link-outline { background: transparent; border: 1px solid var(--ink); color: var(--ink) !important; }
.icon-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px dashed var(--ink);
	border-radius: 50%;
	color: var(--ink) !important;
	font-size: 1.05rem;
	transition: background 0.15s, color 0.15s;
}
.icon-link:hover { background: var(--ink); color: #fff !important; }
.about-facts { margin: 2rem 0 0.5rem; }

/* UX Journey timeline */
.journey { position: relative; margin: 2.25rem 0 0; padding: 0; list-style: none; }
.journey:before {
	content: '';
	position: absolute;
	top: 0.5rem;
	bottom: 0.5rem;
	left: 132px;
	border-left: 1px dashed rgba(0, 0, 0, 0.25);
}
.journey li { position: relative; display: flex; gap: 2.5rem; padding-bottom: 1.75rem; }
.journey li:last-child { padding-bottom: 0; }
.journey li:before {
	content: '';
	position: absolute;
	top: 0.45rem;
	left: 128px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--ink);
}
.journey li:first-child:before { background: var(--ink); }
.journey-date {
	flex: 0 0 110px;
	padding-top: 0.1rem;
	color: var(--muted);
	font-family: "Roboto Mono", monospace;
	font-size: 0.8rem;
}
.journey-stage {
	display: inline-block;
	margin-bottom: 0.3rem;
	color: var(--muted);
	font-family: "Roboto Mono", monospace;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.6px;
}
.journey h5 { margin-bottom: 0.35rem; }
.journey h5 small { color: var(--muted); font-size: 0.85em; font-weight: 400; }
.journey p { max-width: 62ch; margin: 0; }
.journey a { color: var(--ink) !important; text-decoration: underline; text-underline-offset: 3px; }
.journey-follow { margin: 2rem 0 0; font-size: 0.9rem; }
@media (max-width: 767.98px) {
	.journey:before { left: 4px; }
	.journey li { flex-direction: column; gap: 0.3rem; padding-left: 1.75rem; }
	.journey li:before { left: 0; }
	.journey-date { flex-basis: auto; }
}

/* Expertise cards */
.xp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1rem;
	margin-top: 2rem;
}
.xp-card {
	display: flex;
	flex-direction: column;
	padding: 1.4rem 1.4rem 1.25rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	transition: border-color 0.15s, transform 0.15s;
}
.xp-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.xp-card > i { margin-bottom: 0.85rem; color: var(--ink); font-size: 1.5rem; }
.xp-card h5 { margin-bottom: 0.45rem; font-size: 1.05rem; }
.xp-card p { flex: 1; margin-bottom: 0.9rem; font-size: 0.92rem; line-height: 1.55; }
.xp-card span { color: var(--muted); font-family: "Roboto Mono", monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.4px; }
.xp-card span a { color: var(--ink) !important; }

/* Credentials */
.credentials h5 { margin-bottom: 0.75rem; font-size: 1.05rem; }
.credentials .cs-list { padding-left: 1.1rem; }
.credentials .cs-list li { margin-bottom: 0.35rem; font-size: 0.93rem; }

/* ==========================================================================
   SEO heading outline: converted tags keep the theme's look
   ========================================================================== */
.h1:not(.font-family-mono), .title-heading { color: black; }
.h1:not(.font-family-mono) { font-family: "Poppins", sans-serif; font-weight: 600; letter-spacing: -0.3px; }
p.title-heading { margin-top: 0; }
h3.mono-heading { margin: 0; }
.home-link, .home-link:hover { color: inherit !important; text-decoration: none; }

/* Recruiter FAQ */
.faq { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
	position: relative;
	padding: 1rem 2.25rem 1rem 0;
	color: var(--ink);
	font-family: "Poppins", sans-serif;
	font-weight: 500;
	cursor: pointer;
	list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:after {
	content: '+';
	position: absolute;
	top: 50%;
	right: 0.25rem;
	transform: translateY(-50%);
	font-family: "Roboto Mono", monospace;
	font-size: 1.25rem;
}
.faq-item[open] summary:after { content: '–'; }
.faq-item p { max-width: 70ch; margin: -0.25rem 0 1.1rem; }

/* ==========================================================================
   Mobile: the icon nav has 9 items; keep it on one row on small phones
   ========================================================================== */
@media (max-width: 991.98px) {
	.section-nav ul { flex-wrap: nowrap; }
}
@media (max-width: 420px) {
	.section-nav { padding: 0.55em 0.4em; }
	.section-nav ul li a, .section-nav ul li button { width: 32px; height: 32px; line-height: 32px; font-size: 0.8rem; }
	.nav-wrapper { height: 50px; }
	.cs-next { flex-direction: row; }
	.cs-meta { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575.98px) {
	.cta-row .cs-link { flex: 1 1 auto; justify-content: center; }
	.journey h5 small { display: block; margin-top: 0.15rem; }
}

/* ==========================================================================
   LinkedIn recommendations (two-column masonry of quote cards)
   ========================================================================== */
.rec-grid { columns: 2 300px; column-gap: 1.25rem; margin-top: 2rem; }
.rec {
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
	margin: 0 0 1.25rem;
	padding: 1.5rem 1.5rem 1.25rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	break-inside: avoid;
	transition: border-color 0.15s;
}
.rec:hover { border-color: var(--ink); }
.rec blockquote { position: relative; margin: 0; padding-top: 1.4rem; color: var(--ink); font-size: 0.95rem; line-height: 1.65; }
.rec blockquote:before {
	content: '\201C';
	position: absolute;
	top: -0.6rem;
	left: -0.1rem;
	color: rgba(0, 0, 0, 0.15);
	font-family: "Poppins", sans-serif;
	font-size: 3.2rem;
	line-height: 1;
}
.rec blockquote p { margin: 0 0 0.7rem; }
.rec blockquote p:last-child { margin-bottom: 0; }
.rec figcaption { display: flex; align-items: center; gap: 0.8rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.rec-avatar {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--ink);
	color: #fff;
	font-family: "Roboto Mono", monospace;
	font-size: 0.8rem;
	letter-spacing: 0.5px;
}
.rec-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.rec-who a { color: var(--ink) !important; font-family: "Poppins", sans-serif; font-weight: 600; }
.rec-who a:hover { text-decoration: underline; }
.rec-role { color: var(--body); font-size: 0.82rem; }
.rec-meta { color: var(--muted); font-family: "Roboto Mono", monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.3px; }


/* ==========================================================================
   Single-page views: a case study shows alone when its #anchor is targeted
   ========================================================================== */
.case-view { display: none; scroll-margin-top: 24px; }
.case-view:target { display: block; }
body:has(.case-view:target) .home-view { display: none; }