/*
Theme Name: Ronak Karia
Author: Ronak Karia
Description: Portfolio and blog block theme.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: ronakkaria
*/

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
::selection { background-color: #ea580c; color: #fff; }
a:focus-visible, button:focus-visible { outline: 2px solid #2563eb; outline-offset: 4px; }

/* Paper texture: three noise layers, opacity baked into each SVG. Front end only (no .wp-site-blocks in the editor). */
.wp-site-blocks::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 9990;
	background-image:
		url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='6' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E"),
		url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E"),
		url("data:image/svg+xml,%3Csvg viewBox='0 0 150 150' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

/* Group: Glass / Card */
.is-style-glass,
.is-style-card {
	padding: 2rem;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 1rem;
	background: rgba(255, 255, 255, 0.6);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
}
.is-style-card { border-color: #d4d0c8; transition: border-color 0.3s; }
.is-style-card:hover { border-color: rgba(255, 105, 0, 0.3); }

/* Group: Hero — full-height, grid backdrop, decorative squares */
.is-style-hero {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: center;
	background-image:
		linear-gradient(rgba(26, 26, 26, 0.02) 1px, transparent 1px),
		linear-gradient(90deg, rgba(26, 26, 26, 0.02) 1px, transparent 1px);
	background-size: 60px 60px;
}
.is-style-hero > * { position: relative; z-index: 1; width: 100%; }
@media (min-width: 768px) {
	.is-style-hero::before,
	.is-style-hero::after { content: ""; position: absolute; pointer-events: none; }
	.is-style-hero::before { top: 5rem; right: 5rem; width: 16rem; height: 16rem; border: 1px solid rgba(212, 208, 200, 0.5); border-radius: 1.5rem; transform: rotate(12deg); }
	.is-style-hero::after { top: 7rem; right: 7rem; width: 12rem; height: 12rem; border: 1px solid rgba(234, 88, 12, 0.2); border-radius: 1rem; transform: rotate(-6deg); }
}

/* Group: Code window — first paragraph is the title bar, then a Code block */
.is-style-code-window {
	position: relative;
	border-radius: 1rem;
	background: #1a1a1a;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), -24px -24px 64px rgba(234, 88, 12, 0.1), 24px 24px 64px rgba(37, 99, 235, 0.1);
}
.is-style-code-window::before,
.is-style-code-window::after { content: ""; position: absolute; width: 2rem; height: 2rem; border: 2px solid rgba(234, 88, 12, 0.3); pointer-events: none; }
.is-style-code-window::before { top: -0.75rem; left: -0.75rem; border-right: 0; border-bottom: 0; border-top-left-radius: 0.5rem; }
.is-style-code-window::after { right: -0.75rem; bottom: -0.75rem; border-left: 0; border-top: 0; border-bottom-right-radius: 0.5rem; }
.is-style-code-window > p:first-child {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid #3d3d3d;
	border-radius: 1rem 1rem 0 0;
	background: #2d2d2d;
	color: #9a9a9a;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	line-height: 1rem;
}
.is-style-code-window > p:first-child::before { content: ""; flex-shrink: 0; width: 0.75rem; height: 0.75rem; margin-right: 2.25rem; border-radius: 50%; background: #ff5f57; box-shadow: 1.125rem 0 #febc2e, 2.25rem 0 #28c840; }
.is-style-code-window .wp-block-code { margin: 0; border: 0; border-radius: 0 0 1rem 1rem; overflow-x: auto; }

/* Paragraph: Step number (circle) / Rule (trailing hairline) */
.is-style-step-number {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	margin: 0;
	border: 1px solid #d4d0c8;
	border-radius: 50%;
	background: #ebe7e0;
	color: #ff6900;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.875rem;
	font-weight: 700;
}
.is-style-rule { display: flex; align-items: center; gap: 0.75rem; }
.is-style-rule::after { content: ""; flex: 1; height: 1px; background: rgba(212, 208, 200, 0.5); }

/* Image: Icon tile */
.wp-block-image.is-style-icon-tile { flex-shrink: 0; margin: 0; }
.wp-block-image.is-style-icon-tile img { box-sizing: border-box; width: 2.5rem; height: 2.5rem; padding: 0.625rem; border-radius: 0.5rem; background: rgba(255, 105, 0, 0.1); }

/* List markers */
.wp-block-list { padding-left: 1.25em; }
.wp-block-list li::marker { color: #ff6900; }
.wp-block-list li + li { margin-top: 0.5rem; }

/* Social links: Chip */
.wp-block-social-links.is-style-chip { gap: 1rem; }
.wp-block-social-links.is-style-chip .wp-social-link.wp-social-link { border: 1px solid #d4d0c8; border-radius: 0.75rem; transition: all 0.3s; }
.wp-block-social-links.is-style-chip .wp-social-link.wp-social-link:hover { transform: none; border-color: rgba(255, 105, 0, 0.3); background-color: #faf8f5 !important; }
.wp-block-social-links.is-style-chip .wp-block-social-link-anchor { gap: 0.5rem; padding: 0.75rem 1.5rem; font-family: var(--wp--preset--font-family--heading); font-size: 0.875rem; font-weight: 500; }
.wp-block-social-links.is-style-chip .wp-social-link span:not(.screen-reader-text) { margin: 0; color: #4a4a4a; font-size: inherit; }
.wp-block-social-links.is-style-chip svg { width: 1.25rem; height: 1.25rem; }

/* Button: Back to top */
.wp-block-button.is-style-back-to-top .wp-block-button__link {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 0;
	background: none;
	color: #9a9a9a;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	transition: color 0.3s;
}
.wp-block-button.is-style-back-to-top .wp-block-button__link::before {
	content: "";
	width: 1.25rem;
	height: 1.25rem;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 7-7 7 7'/%3E%3Cpath d='M12 19V5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 7-7 7 7'/%3E%3Cpath d='M12 19V5'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform 0.3s;
}
.wp-block-button.is-style-back-to-top .wp-block-button__link:hover { color: #4a4a4a; }
.wp-block-button.is-style-back-to-top .wp-block-button__link:hover::before { transform: translateY(-0.25rem); }

@media print {
	body { background: #fff !important; color: #000 !important; }
	.wp-site-blocks::after { display: none !important; }
}

/* Header: floats over the hero on the home page, in flow everywhere else */
.home .site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
.site-header .wp-block-navigation-item__content:hover { color: #ff6900; }

/* Post content: smaller headings than the portfolio sections, readable links and inline code */
.entry-content { font-size: 1.125rem; line-height: 1.75; }
.entry-content h2 { font-size: 1.875rem; margin-top: 2.5em; }
.entry-content h3 { font-size: 1.375rem; margin-top: 2em; }
.entry-content a { text-underline-offset: 0.2em; }
.entry-content :not(pre) > code { padding: 0.15em 0.4em; border-radius: 0.25rem; background: #ebe7e0; font-size: 0.875em; }
.entry-content .wp-block-image img { border-radius: 0.75rem; }
.wp-block-post-excerpt__more-link { font-family: var(--wp--preset--font-family--heading); font-weight: 500; }
.entry-content .wp-block-list { color: inherit; font-size: inherit; }
.entry-content kbd { padding: 0.1em 0.45em; border: 1px solid #d4d0c8; border-bottom-width: 2px; border-radius: 0.3rem; background: #faf8f5; font-family: var(--wp--preset--font-family--mono); font-size: 0.8em; }
.wp-block-quote cite,
.wp-block-pullquote cite { display: block; margin-top: 1rem; color: #9a9a9a; font-family: var(--wp--preset--font-family--mono); font-size: 0.875rem; font-style: normal; font-weight: 400; }
.wp-block-details summary { cursor: pointer; color: #2d2d2d; font-family: var(--wp--preset--font-family--heading); font-weight: 500; }
.wp-block-details summary::marker { color: #ff6900; }

/* Prev/next links: hide the row (and its top border) when there's no adjacent post */
.post-nav:not(:has(a)) { display: none; }
