/*
Theme Name: Ranjit Nethi
Theme URI: https://ranjitnethi.com
Author: Ranjit Nethi
Description: Executive thought-leadership theme for ranjitnethi.com. Apple-style system typography, black, white and grey with signal-yellow accents. Block theme with front page, insights, frameworks, speaking, media kit and newsletter patterns.
Requires at least: 6.5
Tested up to: 7.2
Requires PHP: 7.4
Version: 1.4.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ranjitnethi
Tags: block-patterns, full-site-editing, one-column, wide-blocks, blog, portfolio
*/

/* ---------- Base polish ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
::selection { background: #e9c46a; color: #000; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
img { height: auto; }
a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }

/* ---------- Header: Apple-style translucent bar ---------- */
.rn-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(0, 0, 0, 0.82);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-bar .rn-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .rn-header { top: 46px; } }
.rn-header .wp-block-site-title a { color: #f5f5f7; }
.rn-header .wp-block-navigation a,
.rn-header .wp-block-navigation .wp-block-navigation-item__content { color: #d2d2d7 !important; transition: color .2s ease; }
.rn-header .wp-block-navigation a:hover,
.rn-header .wp-block-navigation .current-menu-item > a { color: #ffffff; }
.rn-header .wp-block-navigation__responsive-container.is-menu-open { background: #000 !important; color: #f5f5f7 !important; }
.rn-header .wp-block-navigation__responsive-container-open svg,
.rn-header .wp-block-navigation__responsive-container-close svg { fill: #f5f5f7; }
.rn-brand img { display:block; height:auto; width:108px; margin:-6px 0; }
.rn-footer-signature img { display:block; height:auto; width:150px; margin-bottom:.5rem; }
.rn-header .rn-monogram { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:7px; background:#e9c46a; color:#000; font-weight:800; font-size:12px; letter-spacing:-0.02em; margin-right:10px; }
.rn-header .wp-block-button__link { padding: .45em 1.05em; font-size: .8125rem; }
.rn-header .wp-block-social-links .wp-social-link { background: transparent !important; color: #d2d2d7 !important; }
.rn-header .wp-block-social-links .wp-social-link:hover { color: #e9c46a !important; }

/* ---------- Typography helpers ---------- */
.rn-eyebrow { text-transform: uppercase; letter-spacing: 0.12em !important; font-weight: 600; font-size: 0.8125rem; color: #6e6e73; }
.has-black-background-color .rn-eyebrow,
.has-graphite-background-color .rn-eyebrow,
.rn-dark .rn-eyebrow { color: #a1a1a6; }
.rn-eyebrow-yellow { color: #8a6815 !important; }
.rn-dark .rn-eyebrow-yellow, .has-black-background-color .rn-eyebrow-yellow, .has-graphite-background-color .rn-eyebrow-yellow { color: #e9c46a !important; }

.rn-lead { font-size: var(--wp--preset--font-size--large); line-height: 1.38; letter-spacing: -0.02em; color: #6e6e73; }
.rn-dark .rn-lead, .has-black-background-color .rn-lead, .has-graphite-background-color .rn-lead { color: #a1a1a6; }

/* Yellow highlighter bar behind words (Jeff Winter–style name bar) */
mark.rn-mark, .rn-mark {
	background: linear-gradient(180deg, transparent 58%, #e9c46a 58%, #e9c46a 92%, transparent 92%);
	color: inherit; padding: 0 .06em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.rn-dark mark.rn-mark, .has-black-background-color mark.rn-mark {
	background: linear-gradient(180deg, transparent 60%, rgba(233,196,106,.9) 60%, rgba(233,196,106,.9) 90%, transparent 90%);
}
/* Underline accent for key words in statements */
.rn-underline { text-decoration: underline; text-decoration-color: #e9c46a; text-decoration-thickness: .09em; text-underline-offset: .14em; }
.rn-yellow { color: #e9c46a; }
.rn-grey { color: #6e6e73; }

/* ---------- Sections ---------- */
.rn-hero { position: relative; overflow: hidden; }
.rn-hero .rn-hero-portrait img { border-radius: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.rn-hero h1 { font-weight: 800; letter-spacing: -0.04em; }
.rn-angle-bottom { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4vw), 0 100%); padding-bottom: calc(var(--wp--preset--spacing--60) + 4vw) !important; }
.rn-angle-top { clip-path: polygon(0 4vw, 100% 0, 100% 100%, 0 100%); padding-top: calc(var(--wp--preset--spacing--60) + 4vw) !important; margin-top: -4vw !important; }
.rn-statement { font-weight: 700; letter-spacing: -0.035em; line-height: 1.06; }

/* ---------- Cards ---------- */
.rn-card { border-radius: 18px; transition: transform .25s ease, box-shadow .25s ease; height: 100%; }
.rn-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.10); }
.rn-card-dark { border: 1px solid rgba(255,255,255,.1); }
.rn-card-dark:hover { border-color: rgba(233,196,106,.55); box-shadow: none; }
.rn-step-num { font-variant-numeric: tabular-nums; font-weight: 700; color: #e9c46a; letter-spacing: 0; }
.rn-card .rn-step-num { font-size: .875rem; }
.wp-block-columns.rn-equal > .wp-block-column { display: flex; flex-direction: column; }
.wp-block-columns.rn-equal > .wp-block-column > .rn-card { flex: 1; }

/* Query cards */
.rn-query .wp-block-post-template { gap: 1.5rem; }
.rn-post-card { border-radius: 18px; overflow: hidden; background: #f5f5f7; height: 100%; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.rn-post-card:hover { transform: translateY(-4px); box-shadow: 0 16px 44px rgba(0,0,0,.12); }
.rn-post-card .wp-block-post-featured-image { margin: 0; }
.rn-post-card .wp-block-post-featured-image img { aspect-ratio: 16/9; object-fit: cover; width: 100%; display:block; }
.rn-post-card .rn-post-card-body { padding: 1.5rem 1.5rem 1.75rem; flex: 1; display:flex; flex-direction:column; gap: .6rem; }
.rn-post-card .wp-block-post-title { font-size: 1.3125rem; line-height: 1.2; letter-spacing: -0.022em; margin: 0; }
.rn-post-card .wp-block-post-title a:hover { color: #6e6e73; }
.rn-post-card .wp-block-post-terms a { color: #8a6815; text-decoration: none; }
.rn-post-card .wp-block-post-date { margin-top: auto; }
.rn-dark .rn-post-card { background: #1d1d1f; }
.rn-dark .rn-post-card .wp-block-post-terms a { color: #e9c46a; }
.rn-dark .rn-post-card .wp-block-post-excerpt { color: #a1a1a6; }

/* Category filter pills */
.rn-pills .wp-block-categories-list { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; justify-content: center; }
.rn-pills .wp-block-categories-list li a { display:inline-block; padding: .45rem 1rem; border-radius: 980px; background: #f5f5f7; color: #1d1d1f; text-decoration: none; font-size: .875rem; }
.rn-pills .wp-block-categories-list li a:hover { background: #e9c46a; }

/* ---------- Buttons ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button .wp-block-button__link.is-style-outline {
	background: transparent; border: 1px solid currentColor; color: inherit;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: rgba(233,196,106,.12); border-color: #e9c46a; }
.rn-link-arrow a { text-decoration: none; font-weight: 600; }
.rn-link-arrow a::after { content: " →"; transition: margin .2s ease; }
.rn-link-arrow a:hover::after { margin-left: .2em; }
.rn-dark .rn-link-arrow a, .has-black-background-color .rn-link-arrow a { color: #e9c46a; }

/* ---------- Stats ---------- */
.rn-stat-num { font-weight: 800; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.rn-stat-label { color: #6e6e73; font-size: .9375rem; line-height: 1.4; }
.rn-dark .rn-stat-label { color: #a1a1a6; }

/* ---------- Single post reading experience ---------- */
.rn-article .wp-block-post-content { font-size: 1.1875rem; line-height: 1.6; letter-spacing: -0.012em; }
.rn-article .wp-block-post-content > p:first-of-type { font-size: 1.375rem; line-height: 1.45; letter-spacing: -0.02em; color: #1d1d1f; }
.rn-article .wp-block-post-content h2 { margin-top: 2.75rem; font-size: 1.875rem; }
.rn-article .wp-block-post-content h3 { margin-top: 2rem; }
.rn-article .wp-block-post-content ul, .rn-article .wp-block-post-content ol { padding-left: 1.25em; }
.rn-article .wp-block-post-content li { margin-bottom: .5em; }
.rn-article .wp-block-post-content li::marker { color: #8a6815; font-weight: 700; }
.rn-article .wp-block-post-content strong { font-weight: 650; }
.rn-article .wp-block-post-content blockquote.wp-block-quote { margin: 2.5rem 0; }
.rn-article .wp-block-post-content blockquote.wp-block-quote p { font-size: 1.625rem; line-height: 1.25; }
.rn-sources { font-size: .9375rem; color: #6e6e73; }
.rn-sources a { color: #1d1d1f; }
.rn-article-hero .wp-block-post-terms a { color: #e9c46a; text-decoration: none; }
.rn-article-hero .wp-block-post-featured-image img { border-radius: 18px; }

.rn-rule {
	border-left: 4px solid #e9c46a; background: #fbf3de; border-radius: 0 14px 14px 0;
	padding: 1.25rem 1.5rem !important;
}
.rn-rule p { margin: 0; font-weight: 600; }

/* Author box */
.rn-author { border-top: 1px solid #d2d2d7; }
.rn-author .wp-block-image img { border-radius: 50%; }

/* ---------- Video frame placeholder ---------- */
.rn-video-frame { aspect-ratio: 16/9; border-radius: 18px; background: radial-gradient(ellipse at 30% 20%, #3a3a3c, #1d1d1f 60%, #000); display: flex; align-items: center; justify-content: center; position: relative; }
.rn-video-frame .rn-play { width: 76px; height: 76px; border-radius: 50%; background: #e9c46a; display:flex; align-items:center; justify-content:center; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.rn-video-frame .rn-play::before { content:""; border-left: 22px solid #000; border-top: 13px solid transparent; border-bottom: 13px solid transparent; margin-left: 6px; }

/* ---------- Footer ---------- */
.rn-footer { font-size: .8125rem; color: #6e6e73; }
.rn-footer a { color: #424245; text-decoration: none; }
.rn-footer a:hover { color: #000; text-decoration: underline; }
.rn-footer h2, .rn-footer h3, .rn-footer h4 { font-size: .8125rem; font-weight: 600; color: #1d1d1f; letter-spacing: -0.01em; margin-bottom: .5rem; }
.rn-footer ul { list-style: none; padding: 0; margin: 0; }
.rn-footer li { margin: .45rem 0; }
.rn-footer .rn-footer-legal { border-top: 1px solid #d2d2d7; }

/* ---------- Misc ---------- */
.rn-hairline-top { border-top: 1px solid #d2d2d7; }
.rn-dark .rn-hairline-top { border-top-color: rgba(255,255,255,.12); }
.rn-check-list { list-style: none; padding-left: 0 !important; }
.rn-check-list li { position: relative; padding-left: 1.75em; }
.rn-check-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: .7em; height: .7em; border-radius: 50%; background: #e9c46a; }
.rn-numbered h3 .rn-step-num { margin-right: .5rem; }
.rn-placeholder-note { font-size: .8125rem; color: #6e6e73; border: 1px dashed #d2d2d7; border-radius: 12px; padding: .75rem 1rem; }

@media (max-width: 781px) {
	.rn-hide-mobile { display: none !important; }
	.rn-angle-bottom { clip-path: none; padding-bottom: var(--wp--preset--spacing--50) !important; }
	.rn-angle-top { clip-path: none; margin-top: 0 !important; padding-top: var(--wp--preset--spacing--50) !important; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- AI Engineering field guide ---------- */
.rn-figure img { border-radius: 18px; border: 1px solid #e5e5ea; display: block; width: 100%; }
.rn-figure figcaption, .rn-figure .wp-element-caption { font-size: .875rem; color: #6e6e73; text-align: center; margin-top: .75rem; }
.rn-article .wp-block-post-content .rn-figure { margin: 2.5rem 0; }
.rn-table table { border-collapse: collapse; width: 100%; font-size: .9375rem; }
.wp-block-table.rn-table th, .wp-block-table.rn-table td { border-left: 0; border-right: 0; border-top: 0; }
.wp-block-table.rn-table thead { border-bottom: 0; }
.rn-table thead th { text-align: left; font-weight: 600; color: #1d1d1f; border-bottom: 2px solid #e9c46a; padding: .85rem 1rem; background: #f5f5f7; }
.rn-table tbody td { border-bottom: 1px solid #e5e5ea; padding: .9rem 1rem; vertical-align: top; color: #3a3a3c; }
.rn-table tbody td:first-child { font-weight: 600; color: #1d1d1f; }
.rn-table tbody tr:hover td { background: #fdf8ec; }
.rn-check-dark li { color: #d2d2d7; }
@media (max-width: 781px) { .rn-table { overflow-x: auto; } .rn-table table { min-width: 640px; } }
.rn-chapter-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.rn-chapter-list a { display: flex; gap: .9rem; align-items: center; background: #fff; border-radius: 14px; padding: 1rem 1.15rem; text-decoration: none; font-weight: 600; letter-spacing: -0.015em; color: #1d1d1f; transition: transform .2s ease, box-shadow .2s ease; }
.rn-chapter-list a:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.08); }
@media (max-width: 600px) { .rn-chapter-list { grid-template-columns: 1fr; } }

/* Plain-language callout */
.rn-article .wp-block-post-content p.rn-plain { background: #fbf3de; border-left: 4px solid #e9c46a; border-radius: 0 14px 14px 0; padding: 1rem 1.25rem; font-size: 1.0625rem; line-height: 1.5; color: #1d1d1f; margin: 1.5rem 0; }

/* Subtitle under the post title */
.rn-subtitle { color: #e9c46a; font-size: clamp(1.125rem, 2vw, 1.5rem); font-weight: 600; letter-spacing: -.01em; line-height: 1.3; margin: .75rem 0 0; }
