/*
Theme Name: Manish Sah
Theme URI: https://manishsah.com/
Author: Manish K Sah
Description: Personal block theme for manishsah.com. Blue and yellow, editorial type, scroll-driven hero, Himalaya-to-Rockies skyline, and an Insights blog.
Version: 2.0.1
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: manishsah
*/

:root {
	--ms-blue: #0B2A78;
	--ms-yellow: #FFC93C;
	--ms-ochre: #8F6200;
	--ms-mist: #BFCDF2;
	--ms-line: #E2E0DA;
	--ms-muted: #6B7488;
	--ms-tone: #727C92;
}

body { -webkit-font-smoothing: antialiased; }
a { text-underline-offset: 0.2em; }
.wp-site-blocks { position: relative; }

/* ---------- Shared bits ---------- */
.ms-eyebrow {
	font-size: 0.8125rem !important;
	font-weight: 600;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--ms-ochre);
	margin-bottom: 1rem;
}
.ms-dark .ms-eyebrow, .ms-dark.ms-eyebrow { color: var(--ms-yellow); }
.ms-tone { color: var(--ms-tone); }
.ms-dark .ms-tone { color: var(--ms-mist); }
.ms-dark { background: var(--ms-blue); color: #fff; }
.ms-dark a { color: #fff; }
.ms-dark a:hover { color: var(--ms-yellow); }
.ms-serif { font-family: var(--wp--preset--font-family--serif); font-style: italic; }
.ms-outline {
	color: transparent !important;
	-webkit-text-stroke: 1.5px currentColor;
	-webkit-text-stroke-color: #fff;
	font-weight: 400 !important;
}
.ms-btn-light .wp-block-button__link { background: #fff; color: var(--ms-blue); }
.ms-btn-light .wp-block-button__link:hover { background: var(--ms-yellow); }
.ms-btn-line .wp-block-button__link { background: transparent; color: var(--ms-blue); border: 1.5px solid var(--ms-blue); }

/* ---------- Header ---------- */
.ms-header { position: relative; z-index: 10; }
.ms-brand { display: flex; flex-direction: column; line-height: 1; gap: 0.25rem !important; }
.ms-brand .wp-block-site-title { font-size: 1.1rem; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase; }
.ms-brand .wp-block-site-title a { text-decoration: none; }
.ms-brand p:not(.wp-block-site-title) { margin: 0; font-family: var(--wp--preset--font-family--serif); font-style: italic; color: var(--ms-yellow); letter-spacing: 0.08em; font-size: 1rem; }
.ms-brand .wp-block-site-title { margin: 0; font-family: var(--wp--preset--font-family--sans); font-style: normal; color: #fff; }
.ms-brand .wp-block-site-title a { color: #fff; }
.ms-header .wp-block-navigation a { text-decoration: none; }
.ms-header .wp-block-navigation-item.ms-nav-cta a {
	background: #fff; color: var(--ms-blue); padding: 0.7rem 1.3rem; border-radius: 999px; font-weight: 500;
}
.ms-header .wp-block-navigation-item.ms-nav-cta a:hover { background: var(--ms-yellow); color: var(--ms-blue); }

/* ---------- Hero ---------- */
.ms-hero { position: relative; overflow: hidden; min-height: 680px; padding-bottom: 220px !important; }
.ms-hero > .ms-hero-art { position: absolute; inset: 0; margin: 0 !important; max-width: none !important; width: 100%; height: 100%; }
.ms-hero-art svg { width: 100%; height: 100%; display: block; }
.ms-hero > *:not(.ms-hero-art):not(.ms-wordmark) { position: relative; z-index: 2; }
.ms-hero h1 { font-size: clamp(2.9rem, 6.4vw, 5.75rem); line-height: 0.98; }
.ms-hero .ms-lead { color: #E1E8FB; font-weight: 300; font-size: 1.25rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.ms-wordmark {
	position: absolute; left: 0; right: 0; bottom: 96px; margin: 0 !important; max-width: none !important;
	text-align: center; white-space: nowrap; pointer-events: none; z-index: 1;
	font-size: clamp(5rem, 12vw, 12rem); line-height: 1; letter-spacing: 0.06em;
	color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.55);
}
.ms-wordmark .ms-serif { position: absolute; left: 0; right: 0; bottom: -0.55em; font-size: 0.24em; letter-spacing: 0; color: #fff; -webkit-text-stroke: 0; }

/* ---------- Statement + monogram ---------- */
.ms-statement { font-size: clamp(1.75rem, 3.4vw, 2.9rem) !important; line-height: 1.18; font-weight: 500; letter-spacing: -0.01em; }
.ms-monogram svg { width: 320px; max-width: 100%; height: auto; display: block; margin: 0 auto; }

/* ---------- Journey ---------- */
.ms-journey { list-style: none; padding: 0 !important; margin: 0; counter-reset: step; }
.ms-journey li {
	counter-increment: step; display: block; position: relative; padding: 1.4rem 0 1.4rem 3.25rem; border-bottom: 1px solid var(--ms-line);
	font-size: clamp(1.5rem, 2.3vw, 1.9rem); line-height: 1.35; font-weight: 500;
}
.ms-journey li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 2rem; font-size: 0.8125rem; font-weight: 400; color: var(--ms-tone); }
.ms-portrait img { border-radius: 4px; max-width: 400px; width: 100%; }

/* ---------- Ventures ---------- */
.ms-vrow { border-top: 1px solid #2A4FA8; padding-top: 1.75rem !important; padding-bottom: 1.75rem !important; }
.ms-vrow:last-of-type { border-bottom: 1px solid #2A4FA8; }
.ms-vnum {
	flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid #6683D6; border-radius: 50%;
	display: flex; align-items: center; justify-content: center; font-size: 0.75rem; color: #D6E0FA; margin: 0;
}
.ms-vdesc { color: #D6E0FA; font-size: 1rem; max-width: 300px; margin: 0; }
.ms-big { font-size: clamp(2.9rem, 5.6vw, 5.25rem) !important; line-height: 1 !important; letter-spacing: -0.02em; color: #C9D6F7; font-weight: 500; margin: 0; transition: color .3s ease; }
.ms-vrow:hover .ms-big { color: #fff; }
.ms-badge { display: inline-block; margin-left: 0.5rem; padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--ms-yellow); color: var(--ms-blue); letter-spacing: 0.12em; }

/* ---------- Insights lists ---------- */
.ms-irows .wp-block-post-template { margin: 0; padding: 0; }
.ms-irows .wp-block-post {
	display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem 2.5rem;
	padding: 1.4rem 0; border-top: 1px solid var(--ms-line);
}
.ms-irows .wp-block-post:last-child { border-bottom: 1px solid var(--ms-line); }
.ms-irows .wp-block-post-terms { flex: 0 0 200px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
.ms-irows .wp-block-post-terms a { color: var(--ms-ochre); text-decoration: none; }
.ms-irows .wp-block-post-title { flex: 999 1 480px; margin: 0; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; }
.ms-irows .wp-block-post-title a { text-decoration: none; }
.ms-irows .wp-block-post-title a:hover { color: var(--ms-ochre); }
.ms-irows .wp-block-post-date { flex: 0 0 auto; margin: 0; }

.ms-cards .wp-block-post {
	background: #fff; border: 1px solid var(--ms-line); border-radius: 4px; overflow: hidden;
	display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.ms-cards .wp-block-post:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(11, 42, 120, .1); }
.ms-cards .ms-card-body { padding: 1.6rem !important; }
.ms-cards .wp-block-post-terms { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.ms-cards .wp-block-post-terms a { color: var(--ms-ochre); text-decoration: none; }
.ms-cards .wp-block-post-title { font-size: 1.45rem; line-height: 1.2; margin: 0.5rem 0; }
.ms-cards .wp-block-post-title a { text-decoration: none; }
.ms-cards .wp-block-post-excerpt { color: #555C75; font-size: 1rem; }
.ms-cards .wp-block-post-excerpt__more-text { display: none; }

/* Abstract thumbnails: a different shape set for each card */
.ms-thumb { height: 170px; position: relative; overflow: hidden; margin: 0 !important; background: #E9EDFB; }
.ms-thumb::before, .ms-thumb::after { content: ""; position: absolute; }
.wp-block-post:nth-child(6n+1) .ms-thumb { background: #E9EDFB; }
.wp-block-post:nth-child(6n+1) .ms-thumb::before { width: 140px; height: 140px; border-radius: 50%; background: var(--ms-blue); left: 30px; top: 30px; }
.wp-block-post:nth-child(6n+1) .ms-thumb::after { width: 90px; height: 90px; border-radius: 50%; background: var(--ms-yellow); left: 130px; top: 70px; }
.wp-block-post:nth-child(6n+2) .ms-thumb { background: var(--ms-blue); }
.wp-block-post:nth-child(6n+2) .ms-thumb::before { width: 46%; height: 6px; border-radius: 3px; background: var(--ms-yellow); left: 30px; top: 50px; box-shadow: 0 30px 0 #2A5CD0; }
.wp-block-post:nth-child(6n+2) .ms-thumb::after { width: 30%; height: 6px; border-radius: 3px; background: #2A5CD0; left: 30px; top: 110px; }
.wp-block-post:nth-child(6n+3) .ms-thumb { background: #FFF1CC; }
.wp-block-post:nth-child(6n+3) .ms-thumb::before { width: 120px; height: 120px; border-radius: 20px; background: var(--ms-yellow); left: 40px; top: 25px; transform: rotate(-10deg); }
.wp-block-post:nth-child(6n+3) .ms-thumb::after { width: 108px; height: 108px; border-radius: 20px; border: 6px solid var(--ms-blue); left: 120px; top: 35px; transform: rotate(8deg); }
.wp-block-post:nth-child(6n+4) .ms-thumb { background: #E3F4F1; }
.wp-block-post:nth-child(6n+4) .ms-thumb::before { width: 40px; height: 95px; background: var(--ms-blue); left: 40px; bottom: 0; border-radius: 8px 8px 0 0; box-shadow: 52px -35px 0 var(--ms-blue); }
.wp-block-post:nth-child(6n+4) .ms-thumb::after { width: 40px; height: 140px; background: var(--ms-yellow); left: 144px; bottom: 0; border-radius: 8px 8px 0 0; }
.wp-block-post:nth-child(6n+5) .ms-thumb { background: var(--ms-blue); }
.wp-block-post:nth-child(6n+5) .ms-thumb::before { width: 208px; height: 208px; border-radius: 50%; border: 6px solid var(--ms-yellow); left: 50%; top: 40px; transform: translateX(-50%); }
.wp-block-post:nth-child(6n+6) .ms-thumb { background: #E9EDFB; }
.wp-block-post:nth-child(6n+6) .ms-thumb::before { width: 100px; height: 100px; border-radius: 50% 50% 50% 8px; background: var(--ms-yellow); left: 36px; top: 36px; }
.wp-block-post:nth-child(6n+6) .ms-thumb::after { width: 80px; height: 80px; border-radius: 50% 50% 8px 50%; background: var(--ms-blue); left: 150px; top: 56px; }

/* ---------- Single article ---------- */
.ms-article-art { height: 380px; border-radius: 4px; background: var(--ms-blue); position: relative; overflow: hidden; }
.ms-article-art::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: var(--ms-yellow); right: 8%; top: -120px; }
.ms-article-art::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 36px; background: #2A5CD0; left: 10%; bottom: -80px; transform: rotate(14deg); }
.ms-prose { font-size: 1.2rem; line-height: 1.75; }
.ms-prose h2 { font-size: 1.9rem; line-height: 1.2; margin-top: 3rem; }
.ms-avatar img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.ms-author-box { background: #fff; border: 1px solid var(--ms-line); border-radius: 4px; }

/* ---------- Footer / contact ---------- */
.ms-talk { font-size: clamp(4.5rem, 10vw, 10rem) !important; line-height: 0.9 !important; }
.ms-talk.ms-outline { color: var(--ms-blue) !important; -webkit-text-stroke: 3px #fff; paint-order: stroke fill; }
.ms-contact-label { font-size: 0.75rem !important; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ms-mist); margin-bottom: 0.25rem; }
.ms-contact-value { font-size: 1.35rem !important; margin-top: 0; }

/* ---------- Sticky skyline ---------- */
.ms-skyline { position: sticky; bottom: 0; height: 64px; margin: -64px 0 0 !important; max-width: none !important; pointer-events: none; z-index: 20; }
.ms-skyline svg { width: 100%; height: 64px; display: block; }

/* ---------- Scroll effects (modern browsers only; content is fully visible without them) ---------- */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.ms-wordmark { animation: ms-drift linear both; animation-timeline: scroll(); animation-range: 0 700px; }
		@keyframes ms-drift { to { transform: scale(1.18); opacity: .15; letter-spacing: .14em; } }
		.ms-lit { animation: ms-lit linear both; animation-timeline: view(); animation-range: entry 30% cover 45%; }
		.ms-lit.ms-lit2 { animation-range: entry 45% cover 52%; }
		.ms-lit.ms-lit3 { animation-range: entry 60% cover 58%; }
		@keyframes ms-lit { from { color: #C9CED8; } to { color: var(--ms-blue); } }
		.ms-rise, .ms-journey li { animation: ms-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
		@keyframes ms-rise { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: none; } }
	}
}

/* ---------- Small screens ---------- */
@media (max-width: 781px) {
	.ms-hero { min-height: 600px; padding-bottom: 180px !important; }
	.ms-irows .wp-block-post-terms { flex-basis: 100%; }
	.ms-big { flex-basis: 100%; }
}
