/* =========================================================
   IAM SALAMAT — LEDGER (block theme)
   Colors, type, and spacing come from theme.json / the Site
   Editor. This file only carries the signature visual details
   that block settings alone can't express.
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------- Brand mark (header logo fallback + footer) ---------------- */
.brand-mark-footer {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid var(--wp--preset--color--card);
	margin: 0;
	line-height: 1;
}

/* ---------------- Nav hover underline (core Navigation block) ---------------- */
.wp-block-navigation-item__content {
	position: relative;
	padding-bottom: 4px !important;
}
.wp-block-navigation-item__content::after {
	content: '';
	position: absolute;
	left: 0; bottom: 0;
	width: 0; height: 1px;
	background: var(--wp--preset--color--brass);
	transition: width 0.2s ease;
}
.wp-block-navigation-item__content:hover::after { width: 100%; }

/* ---------------- Hero: force side-by-side above mobile breakpoint ----------------
   Belt-and-suspenders on top of core's own column layout — guarantees the
   text/portrait split even if a narrow editor canvas or older cached CSS
   would otherwise stack them. */
@media (min-width: 783px) {
	.hero-columns {
		display: flex !important;
		flex-wrap: nowrap !important;
		align-items: center !important;
	}
	.hero-columns > .wp-block-column:first-child {
		flex: 1 1 60% !important;
	}
	.hero-columns > .wp-block-column:last-child {
		flex: 1 1 40% !important;
	}
}

/* ---------------- Sticky, blurred header ---------------- */
.site-header-block {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(250, 250, 247, 0.92);
	backdrop-filter: saturate(140%) blur(6px);
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding-top: 18px;
	padding-bottom: 18px;
}

/* ---------------- Offset frame motif: portrait + certificates ---------------- */
.portrait-frame-block {
	position: relative;
	max-width: 320px;
	margin: 0;
}
.portrait-frame-block::before {
	content: '';
	position: absolute;
	top: 18px; left: 18px;
	width: 100%; height: 100%;
	border: 1px solid var(--wp--preset--color--brass);
	z-index: 0;
}
.portrait-frame-block img {
	position: relative;
	z-index: 1;
	box-shadow: 0 20px 40px -20px rgba(20, 23, 29, 0.35);
}

/* ---------------- Card grid: certifications, recent work, recent posts ----------------
   Magazine style: full-bleed image, gradient overlay, text pinned to the
   bottom. Hover gently zooms the image and reveals the description.
   display:flex is set explicitly here too — belt-and-suspenders on top of
   core's own "is-layout-flex" class, same guarantee as the hero columns. */
.card-grid {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 26px !important;
	margin-top: 20px;
}
.cert-card, .work-card, .blog-card {
	position: relative;
	flex: 1 1 300px;
	max-width: 340px;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: 2px;
	isolation: isolate;
}
.cert-card .cert-frame,
.work-card .cert-frame,
.blog-card .wp-block-post-featured-image {
	position: absolute;
	inset: 0;
	margin: 0;
	z-index: 0;
}
.cert-card .cert-frame img,
.work-card .cert-frame img,
.blog-card .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}
.cert-card:hover .cert-frame img,
.work-card:hover .cert-frame img,
.blog-card:hover .wp-block-post-featured-image img {
	transform: scale(1.06);
}
.cert-card::after,
.work-card::after,
.blog-card::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(23,35,63,0.95) 0%, rgba(23,35,63,0.55) 45%, rgba(23,35,63,0) 75%);
	z-index: 1;
	pointer-events: none;
}
.magazine-overlay {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	z-index: 2;
	padding: 20px;
	color: #fff;
}
.magazine-overlay p,
.magazine-overlay h3 {
	margin: 0;
	color: #fff;
}
.magazine-overlay h3 { margin-bottom: 4px; }
.magazine-overlay h3 a { color: #fff; }
.magazine-overlay h3 a:hover { color: var(--wp--preset--color--brass); }
.magazine-overlay .wp-block-post-date {
	display: block;
	font-family: var(--wp--preset--font-family--mono);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 4px;
}
.magazine-overlay__desc {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	color: #D7DCE8 !important;
	transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.35s ease;
}
.cert-card:hover .magazine-overlay__desc,
.work-card:hover .magazine-overlay__desc,
.blog-card:hover .magazine-overlay__desc {
	max-height: 80px;
	opacity: 1;
	margin-top: 6px;
}

/* ---------------- Pill button style (skills / tools) ---------------- */
.pills-row { gap: 10px !important; }
.wp-block-button.is-style-pill .wp-block-button__link {
	background: var(--wp--preset--color--card);
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 2px;
	padding: 8px 14px;
	font-size: 12.5px;
	text-transform: none;
	letter-spacing: normal;
	transition: border-color 0.2s ease, color 0.2s ease;
}
.wp-block-button.is-style-pill .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--indigo);
	color: var(--wp--preset--color--indigo);
	background: var(--wp--preset--color--card);
}
.pills-row--muted .wp-block-button.is-style-pill .wp-block-button__link {
	color: var(--wp--preset--color--slate);
}
.pills-row--muted .wp-block-button.is-style-pill .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--brass);
	color: var(--wp--preset--color--brass);
}

/* Outline button style (used for "Get in touch") */
.wp-block-button.is-style-outline .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--indigo);
	background: transparent;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--indigo);
	color: #fff;
}

/* ---------------- Ledger entries ---------------- */
.ledger__entry .wp-block-list { padding-left: 18px; }
.ledger__entry .wp-block-list li { margin-bottom: 8px; }
.ledger__entry .wp-block-list li::marker { color: var(--wp--preset--color--indigo); }

/* ---------------- Contact grid ---------------- */
.contact-grid { gap: 1px !important; background: var(--wp--preset--color--line); }
.contact-grid .wp-block-column { background: var(--wp--preset--color--card); }
.contact-grid .wp-block-column:hover { background: #fff; }

/* ---------------- Contact form ---------------- */
.contact-form-block {
	margin-top: 26px;
	max-width: 640px;
}
.contact-form-block__row {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}
.contact-form-block__field {
	flex: 1 1 220px;
	margin-bottom: 18px;
	display: flex;
	flex-direction: column;
}
.contact-form-block label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--brass);
	margin-bottom: 8px;
}
.contact-form-block input[type="text"],
.contact-form-block input[type="email"],
.contact-form-block textarea {
	font-family: var(--wp--preset--font-family--body);
	font-size: 15px;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 2px;
	padding: 12px 14px;
	resize: vertical;
	transition: border-color 0.2s ease;
}
.contact-form-block input[type="text"]:focus,
.contact-form-block input[type="email"]:focus,
.contact-form-block textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--indigo);
}
.contact-form-block__honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.contact-form-block__row--submit {
	align-items: center;
	gap: 18px;
	margin-top: 4px;
}
.contact-form-block__submit {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 14px 26px;
	border-radius: 2px;
	border: 1px solid var(--wp--preset--color--indigo);
	background: var(--wp--preset--color--indigo);
	color: #fff;
	cursor: pointer;
	transition: background 0.2s ease;
}
.contact-form-block__submit:hover { background: var(--wp--preset--color--indigo-deep); }
.contact-form-block__submit:disabled { opacity: 0.6; cursor: default; }
.contact-form-block__status {
	font-size: 13.5px;
}
.contact-form-block__status.is-success { color: #3E7A4B; }
.contact-form-block__status.is-error { color: #B0402E; }

/* ---------------- Reveal-on-scroll (subtle, respects reduced motion) ---------------- */
.reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 782px) {
	.portrait-frame-block { max-width: 220px; margin: 0 auto 20px; }
}
