/* Farayand News — main stylesheet. Right-to-left, logical properties throughout. */

@font-face {
	font-family: "Estedad";
	src: url("../fonts/Estedad-wght.woff2") format("woff2-variations"), url("../fonts/Estedad-wght.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Vazirmatn";
	src: url("../fonts/Vazirmatn-wght.woff2") format("woff2-variations"), url("../fonts/Vazirmatn-wght.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
	--paper: #f3f5f8;
	--surface: #ffffff;
	--text: #172231;
	--muted: #556274;
	--line: #dbe1e8;
	--ink: #0f2135;
	--ink-2: #17304b;
	--on-ink: #e9eff6;
	--on-ink-muted: #a9b8c9;

	--ai: #5b3fe0;
	--net: #00737e;
	--iran: #9a5a00;
	--other: #556274;

	--ai-glow: #a594ff;
	--net-glow: #3fd0da;
	--iran-glow: #f2b24c;

	--focus: #2f6fe4;
	--radius: 6px;
	--wrap: 1200px;
	--gutter: clamp(16px, 4vw, 40px);

	--fs-xs: 0.8125rem;
	--fs-sm: 0.9375rem;
	--fs-base: 1.0625rem;
	--fs-md: 1.25rem;
	--fs-lg: 1.5625rem;
	--fs-xl: 1.9375rem;
	--fs-2xl: clamp(1.75rem, 1.1rem + 2.6vw, 3rem);

	color-scheme: light;
}

:root[data-theme="dark"] {
	--paper: #0c1622;
	--surface: #112031;
	--text: #e5ebf2;
	--muted: #9aa9ba;
	--line: #22344a;
	--ink: #08111c;
	--ink-2: #112236;
	--ai: #a594ff;
	--net: #45cbd5;
	--iran: #eeac46;
	--other: #9aa9ba;
	--focus: #79a7ff;
	color-scheme: dark;
}

/* Channel colour lookup: any element with .channel-x exposes --ch. */
.channel-ai { --ch: var(--ai); --ch-glow: var(--ai-glow); }
.channel-net { --ch: var(--net); --ch-glow: var(--net-glow); }
.channel-iran { --ch: var(--iran); --ch-glow: var(--iran-glow); }
.channel-other { --ch: var(--other); --ch-glow: var(--on-ink-muted); }

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

a,
button,
input { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--text);
	font-family: "Vazirmatn", Tahoma, sans-serif;
	font-size: var(--fs-base);
	line-height: 1.9;
	font-feature-settings: "ss01";
	text-rendering: optimizeLegibility;
}

img,
svg,
video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.35em; }

h1, h2, h3, h4 { line-height: 1.5; margin: 0; font-weight: 750; }

p { margin: 0; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

::selection { background: color-mix(in srgb, var(--focus) 30%, transparent); }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2 * var(--gutter), 720px); margin-inline: auto; }
.wrap-wide { width: min(100% - 2 * var(--gutter), 1000px); margin-inline: auto; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	inset-inline-start: 1rem;
	top: -100px;
	z-index: 100;
	background: var(--surface);
	color: var(--text);
	padding: 0.5rem 1rem;
	border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

.site-main:focus { outline: none; }

.button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.4rem 1.25rem;
	border: 0;
	border-radius: var(--radius);
	background: var(--text);
	color: var(--paper);
	font: inherit;
	font-weight: 600;
	font-size: var(--fs-sm);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.15s ease;
}
.button:hover { background: color-mix(in srgb, var(--text) 85%, var(--paper)); }
.button:active { transform: translateY(1px); }

/* ---------- Header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--surface) 92%, transparent);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--line);
}

.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }

.header-row {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	min-height: 68px;
}

.brand { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.brand .custom-logo { width: auto; max-height: 44px; }
.brand-name { font-size: var(--fs-md); font-weight: 800; line-height: 1.3; }
.brand-name a { text-decoration: none; }

.primary-nav { margin-inline-start: auto; }

.nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 0.25rem;
}
.nav-list a {
	display: block;
	padding: 0.5rem 0.85rem;
	border-radius: var(--radius);
	font-size: var(--fs-sm);
	font-weight: 550;
	text-decoration: none;
	color: var(--muted);
	transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-list a:hover,
.nav-list .current-menu-item > a,
.nav-list .current-cat > a,
.nav-list .current_page_item > a { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }

.nav-list .sub-menu { display: none; }

.header-tools { display: flex; gap: 0.25rem; }

.icon-button {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: var(--radius);
	background: transparent;
	color: var(--muted);
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
}
.icon-button:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.icon-button[aria-pressed="true"] { color: var(--text); }

.menu-toggle { display: none; }

.header-search { border-top: 1px solid var(--line); padding-block: 1rem; }

@media (max-width: 860px) {
	.header-row { gap: 0.5rem; }
	.header-tools { margin-inline-start: auto; }
	.menu-toggle { display: inline-grid; }
	.primary-nav {
		display: none;
		position: absolute;
		inset-inline: 0;
		top: 100%;
		background: var(--surface);
		border-bottom: 1px solid var(--line);
		padding: 0.5rem var(--gutter) 1rem;
	}
	.primary-nav.is-open { display: block; }
	.nav-list { flex-direction: column; }
	.nav-list a { padding-block: 0.7rem; font-size: var(--fs-base); }
}

/* ---------- Search form ---------- */

.search-form { display: flex; gap: 0.5rem; max-width: 640px; }
.search-field {
	flex: 1;
	min-width: 0;
	min-height: 44px;
	padding: 0.4rem 1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--paper);
	color: var(--text);
	font: inherit;
	font-size: var(--fs-base);
}
.search-field::placeholder { color: var(--muted); }

/* ---------- Meta, tags ---------- */

.meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 1rem;
	row-gap: 0.25rem;
	font-size: var(--fs-xs);
	color: var(--muted);
	line-height: 1.6;
}

.channel-tag {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-weight: 650;
	color: var(--ch);
	text-decoration: none;
}
.channel-tag::before {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: currentColor;
}
a.channel-tag:hover { text-decoration: underline; }

/* ---------- Ticker ---------- */

.ticker {
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	font-size: var(--fs-sm);
}
.ticker-row { display: flex; align-items: center; gap: 1rem; min-height: 48px; }
.ticker-label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
	font-weight: 750;
}
.live-dot {
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	background: #e5484d;
	box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.5);
	animation: live 2.4s ease-out infinite;
}
@keyframes live {
	0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.45); }
	70%, 100% { box-shadow: 0 0 0 8px rgba(229, 72, 77, 0); }
}
.ticker-viewport {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	mask-image: linear-gradient(to left, transparent, #000 4%, #000 92%, transparent);
}
.ticker-track {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	width: max-content;
	animation: ticker 70s linear infinite;
}
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(50%); } }
.ticker-track li { flex-shrink: 0; padding-inline-end: 2.5rem; }
.ticker-track a {
	display: inline-flex;
	align-items: baseline;
	gap: 0.6rem;
	text-decoration: none;
	white-space: nowrap;
	line-height: 48px;
}
.ticker-track a:hover { text-decoration: underline; }
.ticker-time { color: var(--ch); font-weight: 650; font-size: var(--fs-xs); }

/* ---------- Hero ---------- */

.hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(60% 80% at 85% 0%, rgba(91, 63, 224, 0.28), transparent 70%),
		radial-gradient(50% 70% at 0% 100%, rgba(0, 115, 126, 0.25), transparent 70%),
		var(--ink);
	color: var(--on-ink);
	padding-block: clamp(1.75rem, 4vw, 3rem);
	isolation: isolate;
}
.hero .meta { color: var(--on-ink-muted); }
.hero .channel-tag { color: var(--ch-glow); }

.fiber {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	pointer-events: none;
}
.strand {
	fill: none;
	stroke-width: 1.5;
	stroke-linecap: round;
	opacity: 0.5;
	stroke-dasharray: 1700;
	stroke-dashoffset: 1700;
	animation: strand-in 1.8s cubic-bezier(0.3, 0.6, 0.2, 1) forwards;
}
.strand-ai { stroke: var(--ai-glow); }
.strand-net { stroke: var(--net-glow); animation-delay: 0.15s; }
.strand-iran { stroke: var(--iran-glow); animation-delay: 0.3s; }
@keyframes strand-in { to { stroke-dashoffset: 0; } }

.mosaic {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	grid-template-rows: auto auto;
	gap: 1rem;
	align-items: stretch;
}
/* Tiles keep image and text apart: news images often carry their own text. */
.tile {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 10px;
	background: rgba(9, 20, 33, 0.82);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
	transition: box-shadow 0.2s ease;
}
.tile:hover { box-shadow: 0 0 0 1px var(--ch-glow); }
.tile-lead { grid-row: 1 / span 2; }
.tile-media { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--ink-2); flex-shrink: 0; }
.tile-media img,
.tile-media .cover {
	width: 100%;
	height: 100%;
	object-fit: cover;
	aspect-ratio: auto;
	transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.tile:hover .tile-media img,
.tile:hover .tile-media .cover { transform: scale(1.02); }
.tile-body {
	display: grid;
	gap: 0.5rem;
	align-content: start;
	padding: 1rem 1.15rem 1.25rem;
	flex: 1;
}
.tile-lead .tile-body { padding: 1.25rem 1.5rem 1.6rem; gap: 0.75rem; }
.tile-title { font-size: var(--fs-base); font-weight: 800; line-height: 1.7; text-wrap: pretty; overflow-wrap: anywhere; }
.tile-lead .tile-title { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.25rem); line-height: 1.5; text-wrap: balance; }
.tile-title a { text-decoration: none; }
.tile-title a::before { content: ""; position: absolute; inset: 0; z-index: 1; }
.tile-title a:hover { text-decoration: underline; }
.tile .meta { position: relative; z-index: 2; }
.tile-excerpt { color: var(--on-ink-muted); max-width: 70ch; line-height: 1.85; }
.tile::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--ch-glow);
	z-index: 2;
}
.tile-empty { padding-block: 3rem; display: grid; gap: 0.75rem; }

/* Switch-panel ports: one per channel, LED lit when there was news this week. */
.ports {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1px;
	margin-top: 1.25rem;
	padding: 1px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.1);
	overflow: hidden;
}
.port {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-areas: "jack name" "jack count" "jack last";
	column-gap: 1rem;
	align-items: center;
	padding: 1rem 1.25rem;
	background: rgba(9, 20, 33, 0.85);
	color: var(--on-ink);
	text-decoration: none;
	transition: background-color 0.2s ease;
}
.port:hover { background: rgba(20, 38, 60, 0.95); }
.port-jack {
	grid-area: jack;
	position: relative;
	width: 46px;
	height: 38px;
	border: 2px solid rgba(255, 255, 255, 0.28);
	border-radius: 4px 4px 9px 9px;
}
.port-jack::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -2px;
	width: 16px;
	height: 8px;
	transform: translateX(-50%);
	border: 2px solid rgba(255, 255, 255, 0.28);
	border-bottom: 0;
	background: rgba(9, 20, 33, 1);
}
.port-led {
	position: absolute;
	top: 5px;
	inset-inline-end: 5px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
}
.port.is-up .port-led { background: var(--ch-glow); box-shadow: 0 0 10px var(--ch-glow); animation: blink 3.2s steps(1) infinite; }
.port.is-up:nth-child(2) .port-led { animation-delay: 1.1s; }
.port.is-up:nth-child(3) .port-led { animation-delay: 2.3s; }
@keyframes blink { 0%, 92% { opacity: 1; } 94% { opacity: 0.25; } 96% { opacity: 1; } 98% { opacity: 0.3; } }
.port-name { grid-area: name; font-weight: 800; font-size: var(--fs-md); color: var(--ch-glow); line-height: 1.5; }
.port-count { grid-area: count; font-size: var(--fs-sm); color: var(--on-ink-muted); }
.port-count strong { color: var(--on-ink); font-size: var(--fs-md); font-weight: 800; }
.port-last { grid-area: last; font-size: var(--fs-xs); color: var(--on-ink-muted); }

@media (max-width: 860px) {
	.strand { opacity: 0.28; }
	.mosaic { grid-template-columns: 1fr; grid-template-rows: none; }
	.tile-lead { grid-row: auto; }
	.port {
		grid-template-columns: 1fr;
		grid-template-areas: "jack" "name" "count";
		row-gap: 0.35rem;
		justify-items: center;
		text-align: center;
		padding: 0.9rem 0.5rem;
	}
	.port-jack { width: 36px; height: 30px; }
	.port-name { font-size: var(--fs-base); }
	.port-count { font-size: var(--fs-xs); line-height: 1.6; }
	.port-last { display: none; }
}

/* Generated covers and empty media keep a 16:9 box. */
.cover { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }

.media-placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: var(--radius);
	background: var(--ink-2);
}

/* ---------- Rows ---------- */

.row {
	position: relative;
	display: flex;
	gap: 1rem;
	padding-inline-start: 1rem;
}
.row::before {
	content: "";
	position: absolute;
	inset-block: 0.45rem;
	inset-inline-start: 0;
	width: 3px;
	border-radius: 3px;
	background: var(--ch, var(--other));
}
.row-body { display: grid; gap: 0.35rem; flex: 1; min-width: 0; align-content: start; }
.row-title { font-size: var(--fs-base); font-weight: 700; line-height: 1.7; text-wrap: pretty; overflow-wrap: anywhere; }
.row-title a { text-decoration: none; }
.row-title a:hover { text-decoration: underline; }
.row-excerpt { color: var(--muted); font-size: var(--fs-sm); line-height: 1.85; }

.row-thumb { flex-shrink: 0; width: clamp(96px, 22vw, 200px); }
.row-thumb { overflow: hidden; border-radius: var(--radius); align-self: start; }
.row-thumb img,
.row-thumb .cover { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }

/* ---------- Sections ---------- */

.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.5rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--ch, var(--text));
}
.section-title { font-size: var(--fs-lg); font-weight: 800; }
.section-head .section-title { color: var(--text); }
.section-more {
	font-size: var(--fs-sm);
	font-weight: 600;
	color: var(--ch, var(--muted));
	text-decoration: none;
}
.section-more:hover { text-decoration: underline; }

.lanes {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(2rem, 5vw, 4rem);
	padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
@media (max-width: 860px) { .lanes { grid-template-columns: 1fr; } }

.feature { display: grid; gap: 0.75rem; }
.feature-media { display: block; overflow: hidden; border-radius: var(--radius); }
.feature-media img,
.feature-media .cover { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.5s cubic-bezier(0.2, 0.6, 0.2, 1); }
.feature:hover .feature-media img,
.feature:hover .feature-media .cover { transform: scale(1.03); }
.feature-title { font-size: var(--fs-md); font-weight: 750; line-height: 1.65; text-wrap: pretty; overflow-wrap: anywhere; }
.feature-title a { text-decoration: none; }
.feature-title a:hover { text-decoration: underline; }
.feature-excerpt { color: var(--muted); font-size: var(--fs-sm); line-height: 1.85; }

.lane-list .row-thumb { width: 112px; }
.lane-list {
	display: grid;
	gap: 1.25rem;
	margin-top: 1.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
}

.band {
	background: var(--surface);
	border-block: 1px solid var(--line);
	padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.band-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.75rem;
}
@media (max-width: 1000px) { .band-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .band-grid { grid-template-columns: 1fr; } }

.notes,
.related { padding-block: clamp(2.5rem, 6vw, 4rem); }
.notes-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2rem;
}
@media (max-width: 860px) { .notes-grid { grid-template-columns: 1fr; } }


/* ---------- Topics ---------- */

.topics { border-block: 1px solid var(--line); background: var(--surface); }
.topics-row { display: flex; align-items: center; gap: 1.25rem; padding-block: 1.25rem; }
.topics-title { font-size: var(--fs-sm); font-weight: 750; flex-shrink: 0; }
.topic-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.topic-list a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 36px;
	padding: 0.2rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: var(--fs-sm);
	text-decoration: none;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}
.topic-list a:hover { border-color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }
.topic-count { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .topics-row { flex-direction: column; align-items: flex-start; } }


/* ---------- Projects ---------- */

.projects { padding-block: clamp(3rem, 7vw, 5rem); }
.projects-grid { display: grid; gap: 2rem; }
.projects-head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 1rem 3rem;
	align-items: start;
	padding-bottom: 1.5rem;
	border-bottom: 2px solid var(--text);
}
.projects-head .section-title { font-size: var(--fs-xl); }
.projects-text { color: var(--muted); font-size: var(--fs-md); line-height: 1.9; max-width: 68ch; }
.projects-head .button { grid-column: 2; justify-self: start; }

.gallery-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: clamp(150px, 16vw, 220px);
	gap: 0.75rem;
}
.gallery-item { position: relative; overflow: hidden; border-radius: 10px; background: var(--ink-2); }
.gallery-item figure { margin: 0; height: 100%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1); }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item figcaption {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	padding: 2rem 1rem 0.75rem;
	background: linear-gradient(to top, rgba(6, 13, 22, 0.85), rgba(6, 13, 22, 0));
	color: #fff;
	font-size: var(--fs-sm);
	font-weight: 600;
}
.gallery-engineer-rack { grid-column: span 2; grid-row: span 2; }
.gallery-rack-front { grid-column: span 2; }
.gallery-boxes { grid-column: span 2; }
.gallery-boxes img { object-position: center 30%; }

@media (max-width: 860px) {
	.projects-head { grid-template-columns: 1fr; }
	.projects-head .button { grid-column: auto; }
	.gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 160px; }
	.gallery-engineer-rack { grid-column: span 2; grid-row: span 2; }
	.gallery-rack-front,
	.gallery-boxes { grid-column: span 2; }
}

/* ---------- Services ---------- */

.services {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(50% 90% at 100% 100%, rgba(0, 115, 126, 0.3), transparent 70%),
		var(--ink);
	color: var(--on-ink);
	padding-block: clamp(3rem, 7vw, 5rem);
}
.services-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.services-head { display: grid; gap: 1rem; }
.services-company { color: var(--net-glow); font-weight: 700; }
.services-title { font-size: var(--fs-xl); font-weight: 850; line-height: 1.5; }
.services-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.button-ghost { background: transparent; color: var(--on-ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
.button-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.services .button-light { background: var(--on-ink); color: var(--ink); }
.services .button-light:hover { background: #fff; }
.service-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	overflow: hidden;
}
.service { padding: 1.5rem; background: rgba(9, 20, 33, 0.9); display: grid; gap: 0.6rem; align-content: start; }
.service-glyph { width: 56px; height: 56px; color: var(--net-glow); margin-bottom: 0.5rem; }
.service:nth-child(2) .service-glyph { color: var(--ai-glow); }
.service:nth-child(3) .service-glyph { color: var(--iran-glow); }
.service-title { font-size: var(--fs-md); font-weight: 800; }
.service-text { color: var(--on-ink-muted); font-size: var(--fs-sm); line-height: 1.9; }
@media (max-width: 1000px) {
	.services-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
	.service-list { grid-template-columns: 1fr; }
}


/* ---------- About me ---------- */

.me-band {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(45% 80% at 100% 0%, rgba(0, 115, 126, 0.32), transparent 70%),
		radial-gradient(40% 70% at 0% 100%, rgba(91, 63, 224, 0.25), transparent 70%),
		var(--ink-2);
	color: var(--on-ink);
	padding-block: clamp(2.5rem, 6vw, 4rem);
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.me-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.me-row { display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 2rem); }
.me-portrait { flex-shrink: 0; width: clamp(130px, 16vw, 200px); }
.me-portrait img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 14px;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 18px 40px rgba(0, 0, 0, 0.35);
}
.me-text { display: grid; gap: 0.6rem; justify-items: start; }
.me-role { color: var(--net-glow); font-weight: 700; font-size: var(--fs-sm); }
.me-heading { font-size: var(--fs-xl); font-weight: 850; line-height: 1.4; }
.me-intro { color: var(--on-ink-muted); line-height: 1.9; max-width: 52ch; }
.me-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.me-band .button-light { background: var(--on-ink); color: var(--ink); }
.me-band .button-light:hover { background: #fff; }

.me-projects-title { font-size: var(--fs-sm); font-weight: 700; color: var(--on-ink-muted); margin-bottom: 0.75rem; }
.me-project-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.me-band .project-card { background: rgba(9, 20, 33, 0.75); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.me-band .project-card:hover { box-shadow: 0 0 0 1px var(--net-glow); }
.me-band .project-title { font-size: var(--fs-sm); }
.me-band .project-role,
.me-band .project-type { color: var(--on-ink-muted); }

.me-band-compact,
.me-band-page { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.me-band-page .me-portrait { width: clamp(150px, 20vw, 260px); }
.me-band-page .me-heading { font-size: var(--fs-2xl); }
.me-band-compact .me-portrait { width: clamp(96px, 11vw, 140px); }

@media (max-width: 1000px) {
	.me-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	.me-row { flex-direction: column; align-items: flex-start; }
	.me-project-list { grid-template-columns: 1fr; }
}

.me-columns {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 4rem);
	padding-block: clamp(2.5rem, 6vw, 4rem);
}
.me-bio .section-title,
.me-side .section-title { margin-bottom: 1rem; }
@media (max-width: 860px) { .me-columns { grid-template-columns: 1fr; } }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
	content: "";
	position: absolute;
	inset-block: 0.6rem;
	inset-inline-start: 6px;
	width: 2px;
	background: linear-gradient(to bottom, var(--net), var(--ai));
	border-radius: 2px;
}
.timeline li { position: relative; padding-inline-start: 1.75rem; padding-bottom: 1.25rem; }
.timeline li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 0.55rem;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--paper);
	border: 2px solid var(--net);
}
.timeline li:last-child::before { background: var(--net); }
.timeline-title { font-weight: 700; line-height: 1.7; }
.timeline-note { color: var(--muted); font-size: var(--fs-sm); }

.skills { padding-bottom: clamp(2rem, 5vw, 3rem); }
.skills .section-title { margin-bottom: 1rem; }
.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip-list li {
	padding: 0.25rem 0.85rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	font-size: var(--fs-sm);
}
.chip-list-lg li { padding: 0.45rem 1rem; font-size: var(--fs-base); }

/* ---------- Projects (portfolio) ---------- */

.project-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
}
@media (max-width: 1000px) { .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .project-grid { grid-template-columns: 1fr; } }

.project-card {
	position: relative;
	display: flex;
	flex-direction: column;
	border-radius: 10px;
	overflow: hidden;
	background: var(--surface);
	box-shadow: 0 0 0 1px var(--line);
	transition: box-shadow 0.2s ease;
}
.project-card:hover { box-shadow: 0 0 0 1px var(--text); }
.project-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink-2); }
.project-media img,
.project-media .cover { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1); }
.project-card:hover .project-media img,
.project-card:hover .project-media .cover { transform: scale(1.03); }
.project-scale {
	position: absolute;
	inset-inline-start: 0.75rem;
	bottom: 0.75rem;
	padding: 0.15rem 0.7rem;
	border-radius: 999px;
	background: rgba(6, 13, 22, 0.78);
	color: #fff;
	font-size: var(--fs-xs);
	font-weight: 700;
	backdrop-filter: blur(4px);
}
.project-body { display: grid; gap: 0.3rem; padding: 0.9rem 1rem 1.1rem; }
.project-type { font-size: var(--fs-xs); color: var(--net); font-weight: 650; }
.project-title { font-size: var(--fs-base); font-weight: 750; line-height: 1.7; }
.project-title a { text-decoration: none; }
.project-title a::before { content: ""; position: absolute; inset: 0; }
.project-title a:hover { text-decoration: underline; }
.project-role { font-size: var(--fs-xs); color: var(--muted); }

.filter-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.filter-row a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 40px;
	padding: 0.2rem 1rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	text-decoration: none;
	font-size: var(--fs-sm);
	background: var(--surface);
}
.filter-row a:hover { border-color: var(--text); }
.filter-row a[aria-current="page"] { background: var(--text); color: var(--paper); border-color: var(--text); }
.filter-row a[aria-current="page"] .topic-count { color: inherit; opacity: 0.75; }

.project-hero { background: var(--ink); color: var(--on-ink); padding-block: clamp(2rem, 5vw, 3.5rem); }
.project-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.project-hero-text { display: grid; gap: 1rem; }
.project-hero .meta { color: var(--on-ink-muted); }
.crumb { color: var(--net-glow); text-decoration: none; font-weight: 650; }
.crumb:hover { text-decoration: underline; }
.project-page-title { font-size: var(--fs-2xl); font-weight: 850; line-height: 1.45; text-wrap: balance; }
.project-lede { color: var(--on-ink-muted); font-size: var(--fs-md); line-height: 1.85; }
.facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 1px;
	margin: 0.5rem 0 0;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	overflow: hidden;
}
.fact { padding: 0.75rem 1rem; background: rgba(9, 20, 33, 0.9); }
.fact dt { font-size: var(--fs-xs); color: var(--on-ink-muted); }
.fact dd { margin: 0; font-weight: 750; }
.project-hero-media img,
.project-hero-media .cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
@media (max-width: 860px) {
	.project-hero-grid { grid-template-columns: 1fr; }
	.project-hero-media { order: -1; }
}
.stack-row { padding-top: 2rem; display: grid; gap: 0.75rem; }
.stack-title { font-size: var(--fs-sm); color: var(--muted); font-weight: 700; }
.project-entry { padding-block: 1.5rem 1rem; }
.project-entry .wp-block-gallery { margin-inline: 0; }

/* ---------- Contact CTA ---------- */

.contact-cta { background: var(--ink); color: var(--on-ink); padding-block: clamp(2rem, 5vw, 3rem); margin-top: clamp(1rem, 4vw, 2.5rem); }
.contact-cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; }
.contact-cta-title { font-size: var(--fs-lg); font-weight: 850; }
.contact-cta-text { color: var(--on-ink-muted); margin-top: 0.35rem; }
.contact-cta-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.contact-cta .button-light { background: var(--on-ink); color: var(--ink); }
.contact-cta .button-light:hover { background: #fff; }
.contact-cta + .site-footer { margin-top: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* ---------- Listing pages ---------- */

.listing { padding-block: clamp(2rem, 5vw, 3.5rem); }

.page-head {
	display: grid;
	gap: 0.75rem;
	padding-bottom: 1.5rem;
	margin-bottom: 2rem;
	border-bottom: 2px solid var(--ch, var(--text));
}
.page-title { font-size: var(--fs-xl); font-weight: 850; }
.page-head.channel-ai .page-title,
.page-head.channel-net .page-title,
.page-head.channel-iran .page-title { color: var(--ch); }
.page-desc { color: var(--muted); max-width: 70ch; }

.list { display: grid; gap: 0; max-width: 900px; }
.list .row { padding-block: 1.25rem; border-bottom: 1px solid var(--line); }
.list .row::before { inset-block: 1.6rem; }
.list .row-title { font-size: var(--fs-md); }

.empty { display: grid; gap: 1rem; color: var(--muted); padding-block: 1rem; }

.not-found .section-title { margin-bottom: 1rem; }

.pagination { margin-top: 2.5rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	min-height: 44px;
	padding-inline: 0.75rem;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: var(--surface);
	text-decoration: none;
	font-size: var(--fs-sm);
}
.page-numbers.current { background: var(--text); color: var(--paper); border-color: var(--text); }
a.page-numbers:hover { border-color: var(--text); }

/* ---------- Single story ---------- */

.story { padding-top: clamp(2rem, 5vw, 3.5rem); }

.story-head { display: grid; gap: 1rem; margin-bottom: 2rem; }
.story-title { font-size: var(--fs-2xl); font-weight: 850; line-height: 1.5; text-wrap: balance; }
.story-standfirst { font-size: var(--fs-md); color: var(--muted); line-height: 1.85; }
.story-meta { padding-top: 0.75rem; border-top: 1px solid var(--line); }
.story-meta .author { font-weight: 650; color: var(--text); }

.story-media { margin-block: 0 2.5rem; }
.story-media img,
.story-media .cover { width: 100%; border-radius: var(--radius); }
.story-media figcaption { font-size: var(--fs-xs); color: var(--muted); margin-top: 0.6rem; }

.entry { font-size: 1.125rem; line-height: 2.05; overflow-wrap: break-word; }
.entry > * + * { margin-top: 1.4em; }
.entry h2 { font-size: var(--fs-lg); margin-top: 2em; }
.entry h3 { font-size: var(--fs-md); margin-top: 1.8em; }
.entry a { color: var(--ch, var(--focus)); }
.entry ul,
.entry ol { padding-inline-start: 1.5em; }
.entry li + li { margin-top: 0.4em; }
.entry blockquote {
	margin-inline: 0;
	padding-inline-start: 1.25rem;
	border-inline-start: 3px solid var(--ch, var(--line));
	color: var(--muted);
}
.entry img { border-radius: var(--radius); }
.entry figure { margin-inline: 0; }
.entry figcaption { font-size: var(--fs-xs); color: var(--muted); margin-top: 0.5rem; }
.entry code,
.entry pre {
	font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
	font-size: 0.9em;
	direction: ltr;
	unicode-bidi: isolate;
}
.entry code { background: color-mix(in srgb, var(--text) 7%, transparent); padding: 0.1em 0.35em; border-radius: 4px; }
.entry pre {
	background: var(--ink);
	color: var(--on-ink);
	padding: 1rem 1.25rem;
	border-radius: var(--radius);
	overflow-x: auto;
	text-align: left;
	line-height: 1.7;
}
.entry pre code { background: none; padding: 0; }
.entry table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.entry th,
.entry td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); text-align: start; }
.entry .alignwide { width: min(100vw - 2 * var(--gutter), 1000px); margin-inline: calc(50% - min(50vw - var(--gutter), 500px)); }

.story-foot { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: grid; gap: 1.25rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags a {
	font-size: var(--fs-xs);
	padding: 0.3rem 0.75rem;
	border-radius: 999px;
	border: 1px solid var(--line);
	text-decoration: none;
	color: var(--muted);
}
.tags a:hover { color: var(--text); border-color: var(--text); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.share-label { font-size: var(--fs-sm); color: var(--muted); margin-inline-end: 0.5rem; }
.share a,
.share button {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 44px;
	padding: 0.3rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text);
	font: inherit;
	font-size: var(--fs-sm);
	text-decoration: none;
	cursor: pointer;
}
.share a:hover,
.share button:hover { border-color: var(--text); }
.copy-status { font-size: var(--fs-xs); color: var(--muted); }

/* ---------- Comments ---------- */

.comments { padding-block: 2rem 3rem; display: grid; gap: 1.5rem; }
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.comment-list .children { list-style: none; padding-inline-start: 1.5rem; margin-top: 1rem; }
.comment-body { padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.comment-meta { font-size: var(--fs-xs); color: var(--muted); }
.comment-author img { border-radius: 50%; display: inline-block; vertical-align: middle; margin-inline-end: 0.5rem; }
.comment-form { display: grid; gap: 1rem; }
.comment-form label { display: block; font-size: var(--fs-sm); margin-bottom: 0.35rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.6rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text);
	font: inherit;
}
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 0.5rem; font-size: var(--fs-xs); color: var(--muted); }
.comment-form-cookies-consent label { margin: 0; font-size: inherit; }
.comment-form-cookies-consent input { margin-top: 0.45em; }
.comment-form .submit {
	min-height: 44px;
	padding: 0.4rem 1.5rem;
	border: 0;
	border-radius: var(--radius);
	background: var(--text);
	color: var(--paper);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: var(--on-ink); margin-top: clamp(2rem, 5vw, 4rem); }
.site-footer a { color: var(--on-ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.footer-channel { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.footer-channel-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1.5rem;
}
.footer-channel-row p { font-size: var(--fs-md); font-weight: 650; }
.button-light { background: var(--on-ink); color: var(--ink); }
.site-footer .button-light { color: var(--ink); }
.site-footer .button-light:hover { background: #fff; text-decoration: none; }

.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 2.5rem;
	padding-block: 3rem;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }

.footer-brand { font-size: var(--fs-lg); font-weight: 800; }
.footer-desc,
.footer-company { color: var(--on-ink-muted); font-size: var(--fs-sm); margin-top: 0.5rem; }
.footer-title { font-size: var(--fs-sm); font-weight: 700; color: var(--on-ink-muted); margin-bottom: 0.75rem; }

.footer-channels ul,
.footer-menu,
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer-channels li { display: flex; align-items: center; gap: 0.6rem; }
.footer-channels li[class*="channel-"]::before {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: var(--ch-glow);
}
.footer-menu { margin-top: 0.75rem; }

.contact-list a { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 32px; }
.contact-list .icon { color: var(--on-ink-muted); flex-shrink: 0; }

.footer-widgets {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 2rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-widgets .widget-title,
.footer-widgets h2 { font-size: var(--fs-sm); font-weight: 700; color: var(--on-ink-muted); margin-bottom: 0.75rem; }
.footer-widgets ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; font-size: var(--fs-sm); }

.footer-bottom {
	padding-block: 1.25rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	font-size: var(--fs-xs);
	color: var(--on-ink-muted);
}

/* ---------- WordPress core classes ---------- */

.alignleft { float: left; margin: 0.5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.5rem 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; }
.wp-caption-text,
.gallery-caption { font-size: var(--fs-xs); color: var(--muted); }
.sticky,
.bypostauthor { position: relative; }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-delay: 0s !important; }
	.strand { stroke-dashoffset: 0; }
	.ticker-viewport { overflow-x: auto; mask-image: none; }
	.ticker-track { animation: none; }
	.ticker-track li[aria-hidden="true"] { display: none; }
	.live-dot, .port-led { animation: none !important; }
}

.site-main:has(> .contact-cta:last-child) + .site-footer { margin-top: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* Project galleries: a tidy grid whatever the editor produced. */
.project-entry > p,
.project-entry > h2,
.project-entry > h3,
.project-entry > ul,
.project-entry > ol { max-width: 70ch; }
.project-entry .wp-block-gallery,
.project-entry .gallery {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
	margin-inline: 0;
}
.project-entry .wp-block-gallery > figure,
.project-entry .wp-block-gallery .wp-block-image,
.project-entry .gallery .gallery-item {
	position: relative;
	margin: 0 !important;
	width: auto !important;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--ink-2);
}
.project-entry .wp-block-gallery img,
.project-entry .gallery img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}
.project-entry .wp-block-gallery figcaption { font-size: var(--fs-xs); color: var(--muted); padding-top: 0.35rem; }
@media (max-width: 700px) {
	.project-entry .wp-block-gallery,
	.project-entry .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.me-bio > .section-title { margin-top: 0; }

/* =====================================================================
   Skin 1.4 — light, soft and warmer. Overrides the earlier dark look.
   ===================================================================== */

:root {
	--paper: #eef3f8;
	--surface: #ffffff;
	--text: #10243a;
	--muted: #5a6b80;
	--line: #dde5ee;
	--ink: #14344f;
	--ink-2: #1b4466;
	--on-ink: #f2f6fb;
	--on-ink-muted: #b4c4d6;
	--brand: #0e8a99;
	--brand-2: #1d4f7a;
	--accent: #ffc83d;
	--on-accent: #3a2a00;
	--ai: #5b3fe0;
	--net: #007f8c;
	--iran: #a15f00;
	--radius: 14px;
	--radius-lg: 22px;
	--shadow-sm: 0 1px 2px rgba(16, 45, 75, 0.06), 0 4px 12px -6px rgba(16, 45, 75, 0.12);
	--shadow: 0 2px 6px rgba(16, 45, 75, 0.05), 0 16px 36px -18px rgba(16, 45, 75, 0.28);
	--shadow-lift: 0 4px 10px rgba(16, 45, 75, 0.06), 0 24px 48px -20px rgba(16, 45, 75, 0.36);
	--font-display: "Estedad", "Vazirmatn", Tahoma, sans-serif;
	--hero-bg: radial-gradient(70% 90% at 90% 0%, #dbe9f7 0%, transparent 60%), radial-gradient(60% 80% at 0% 100%, #e3f3f4 0%, transparent 60%), #eef3f8;
}

:root[data-theme="dark"] {
	--paper: #0d1724;
	--surface: #132235;
	--text: #e6edf5;
	--muted: #9fb0c3;
	--line: #223650;
	--ink: #0b1a2b;
	--ink-2: #14304b;
	--ai: #a594ff;
	--net: #45cbd5;
	--iran: #eeac46;
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
	--shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.6);
	--shadow-lift: 0 24px 48px -20px rgba(0, 0, 0, 0.7);
	--hero-bg: radial-gradient(70% 90% at 90% 0%, #16304d 0%, transparent 60%), #0d1724;
}

h1, h2, h3, h4,
.brand-name,
.section-title,
.tile-title,
.feature-title,
.row-title,
.me-heading,
.port-name,
.services-title,
.contact-cta-title,
.project-title,
.project-page-title,
.story-title,
.page-title,
.footer-brand { font-family: var(--font-display); letter-spacing: 0; }

body { background: var(--paper); }

/* Buttons */
.button {
	border-radius: 999px;
	background: var(--brand-2);
	color: #fff;
	padding-inline: 1.4rem;
	box-shadow: 0 8px 18px -10px rgba(29, 79, 122, 0.7);
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.button:hover { background: #163f63; transform: translateY(-1px); }
.button-light { background: #fff; color: var(--ink); box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.5); }
.button-light:hover { background: #fff; }
.button-ghost { border-radius: 999px; }

/* Header */
.site-header {
	background: rgba(255, 255, 255, 0.86);
	border-bottom: 0;
	box-shadow: 0 1px 0 rgba(16, 45, 75, 0.06), 0 10px 30px -22px rgba(16, 45, 75, 0.35);
}
:root[data-theme="dark"] .site-header { background: rgba(19, 34, 53, 0.9); }
.header-row { min-height: 78px; gap: 1.25rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--text); }
.brand-logo { width: auto; height: 48px; max-width: 160px; object-fit: contain; }
.brand-mark { width: 40px; height: 44px; flex-shrink: 0; filter: drop-shadow(0 6px 10px rgba(14, 138, 153, 0.35)); }
.brand-text { display: grid; line-height: 1.35; }
.brand-name { font-size: 1.15rem; font-weight: 850; }
.brand-tagline { font-size: var(--fs-xs); color: var(--muted); }
.nav-list { gap: 0.15rem; }
.nav-list a {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.55rem 0.8rem;
	border-radius: 999px;
	color: var(--text);
	font-weight: 600;
}
.nav-list a .icon { color: var(--brand); width: 19px; height: 19px; transition: transform 0.2s ease; }
.nav-list .channel-ai a .icon { color: var(--ai); }
.nav-list .channel-iran a .icon { color: var(--iran); }
.nav-list a:hover { background: #eaf2f9; }
.nav-list a:hover .icon { transform: translateY(-1px); }
:root[data-theme="dark"] .nav-list a:hover { background: rgba(255, 255, 255, 0.06); }
.header-cta {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	min-height: 44px;
	padding: 0.3rem 1.1rem;
	border-radius: 999px;
	background: #fff;
	color: var(--brand-2);
	font-weight: 750;
	font-size: var(--fs-sm);
	text-decoration: none;
	box-shadow: var(--shadow);
	margin-inline-end: 0.35rem;
	transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.header-cta:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
:root[data-theme="dark"] .header-cta { background: var(--surface); color: var(--text); }
.icon-button { border-radius: 999px; }
@media (max-width: 1100px) { .brand-tagline { display: none; } }
@media (max-width: 860px) {
	.header-cta span { display: none; }
	.header-cta { padding: 0; width: 44px; justify-content: center; margin: 0; }
	.primary-nav { border-radius: 0 0 var(--radius-lg) var(--radius-lg); box-shadow: var(--shadow); border-bottom: 0; }
}

/* Ticker */
.ticker { background: transparent; border-bottom: 0; padding-top: 0.9rem; }
.ticker-row {
	background: var(--surface);
	border-radius: 999px;
	padding-inline: 1.1rem 0.5rem;
	box-shadow: var(--shadow-sm);
	min-height: 46px;
}
.ticker-label { color: var(--text); }
.ticker-track a { line-height: 46px; }

/* Meta and channel pills */
.post-date { display: inline-flex; align-items: center; gap: 0.3rem; }
.post-date .icon { width: 15px; height: 15px; opacity: 0.8; }
.channel-tag {
	padding: 0.1rem 0.65rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--ch) 12%, transparent);
	color: var(--ch);
	font-weight: 700;
	line-height: 1.8;
}
.channel-tag::before { width: 0.4rem; height: 0.4rem; }

/* Hero: light page, navy story cards */
.hero { background: var(--hero-bg); color: var(--text); padding-block: 1.5rem clamp(2rem, 4vw, 3rem); }
.hero .meta { color: var(--muted); }
.strand { opacity: 0.35; }
.tile {
	background: var(--ink);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	padding: 10px;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.tile::before { display: none; }
.tile-media { border-radius: calc(var(--radius-lg) - 8px); }
.tile .meta { color: var(--on-ink-muted); }
.tile .channel-tag { background: var(--accent); color: var(--on-accent); }
.tile .channel-tag::before { background: var(--on-accent); }
.tile-body { color: var(--on-ink); padding: 0.9rem 0.7rem 0.7rem; }
.tile-lead .tile-body { padding: 1.1rem 1rem 1rem; }
.tile-excerpt { color: var(--on-ink-muted); }

/* Channel "ports" become soft white cards */
.ports { background: transparent; padding: 0; gap: 1rem; margin-top: 1.5rem; overflow: visible; }
.port {
	background: var(--surface);
	color: var(--text);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.port:hover { background: var(--surface); box-shadow: var(--shadow); transform: translateY(-2px); }
.port-jack,
.port-jack::after { border-color: color-mix(in srgb, var(--ch) 55%, #c5d2df); }
.port-jack::after { background: var(--surface); }
.port-led { background: #cfd8e3; }
.port.is-up .port-led { background: var(--ch); box-shadow: 0 0 8px var(--ch); }
.port-name { color: var(--ch); }
.port-count { color: var(--muted); }
.port-count strong { color: var(--text); }
.port-last { color: var(--muted); }

/* Section headings: short colour bar instead of a full rule */
.section-head { border-bottom: 0; padding-bottom: 0; position: relative; margin-bottom: 1.75rem; }
.section-head .section-title { position: relative; padding-bottom: 0.6rem; }
.section-head .section-title::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	bottom: 0;
	width: 48px;
	height: 4px;
	border-radius: 4px;
	background: var(--ch, var(--brand));
}
.section-more {
	padding: 0.35rem 0.9rem;
	border-radius: 999px;
	background: var(--surface);
	box-shadow: var(--shadow-sm);
}
.section-more:hover { text-decoration: none; box-shadow: var(--shadow); }

/* Lane lead and grid cards */
.feature {
	background: var(--surface);
	border-radius: var(--radius-lg);
	padding: 10px 10px 1.1rem;
	box-shadow: var(--shadow-sm);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
	position: relative;
	align-content: start;
}
.feature:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.feature-media { border-radius: calc(var(--radius-lg) - 8px); }
.feature-title,
.feature-excerpt,
.feature .meta { padding-inline: 0.5rem; }
.feature-title a::before { content: ""; position: absolute; inset: 0; }
.feature .meta a,
.feature .channel-tag { position: relative; z-index: 1; }

.lane-list {
	background: var(--surface);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	border-top: 0;
	margin-top: 1rem;
	padding: 1rem;
	gap: 0.25rem;
}
.lane-list .row { padding: 0.6rem 0.9rem 0.6rem 0.6rem; border-radius: var(--radius); transition: background-color 0.2s ease; }
.lane-list .row:hover { background: #f3f7fb; }
:root[data-theme="dark"] .lane-list .row:hover { background: rgba(255, 255, 255, 0.04); }
.lane-list .row::before { inset-block: 1rem; }
.lane-list .row-thumb { border-radius: 10px; }

.band { background: transparent; border: 0; }
.band-grid { gap: 1.25rem; }

/* Topics */
.topics { background: transparent; border: 0; }
.topics-row { background: var(--surface); border-radius: var(--radius-lg); padding: 1rem 1.25rem; box-shadow: var(--shadow-sm); }
.topic-list a { background: #f3f7fb; border-color: transparent; }
.topic-list a:hover { background: #e7f0f8; border-color: transparent; }
:root[data-theme="dark"] .topic-list a { background: rgba(255, 255, 255, 0.05); }

/* Personal band: light card */
.me-band { background: transparent; color: var(--text); padding-block: clamp(2rem, 5vw, 3rem); border: 0; }
.me-band > .wrap {
	background:
		radial-gradient(60% 120% at 100% 0%, #e2f1f4 0%, transparent 60%),
		radial-gradient(50% 100% at 0% 100%, #e7e6fb 0%, transparent 60%),
		var(--surface);
	border-radius: 28px;
	box-shadow: var(--shadow);
	padding: clamp(1.25rem, 3vw, 2.25rem);
}
:root[data-theme="dark"] .me-band > .wrap { background: var(--surface); }
.me-role { color: var(--brand); }
.me-intro { color: var(--muted); }
.me-portrait img { border-radius: 20px; box-shadow: var(--shadow); }
.me-band .button-light { background: var(--brand-2); color: #fff; }
.me-band .button-light:hover { background: #163f63; }
.me-band .button-ghost { color: var(--brand-2); box-shadow: inset 0 0 0 1.5px var(--brand-2); }
.me-band .button-ghost:hover { background: #eaf2f9; }
.me-projects-title { color: var(--muted); }
.me-band .project-card { background: var(--surface); box-shadow: var(--shadow-sm); }
.me-band .project-card:hover { box-shadow: var(--shadow); }
.me-band .project-role,
.me-band .project-type { color: var(--muted); }
.me-band .project-type { color: var(--brand); }
.me-band-compact > .wrap,
.me-band-page > .wrap { margin-top: 0.5rem; }

/* Project cards */
.project-card {
	border-radius: var(--radius-lg);
	padding: 8px;
	box-shadow: var(--shadow-sm);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.project-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.project-media { border-radius: calc(var(--radius-lg) - 7px); }
.project-scale { background: var(--accent); color: var(--on-accent); backdrop-filter: none; }

/* Gallery and services soften */
.gallery-item { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.services { background: radial-gradient(50% 90% at 100% 100%, rgba(25, 179, 194, 0.28), transparent 70%), var(--ink); margin-inline: auto; }
.service-list { gap: 1rem; background: transparent; border-radius: 0; overflow: visible; }
.service { border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }

/* Listing rows, story */
.list .row { background: var(--surface); border-radius: var(--radius-lg); border-bottom: 0; padding: 1rem 1.25rem 1rem 1rem; margin-bottom: 0.75rem; box-shadow: var(--shadow-sm); }
.list .row::before { inset-block: 1.4rem; inset-inline-start: 0.4rem; }
.list .row { padding-inline-start: 1.4rem; }
.page-head { border-bottom: 0; }
.story-media img,
.story-media .cover { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.share a,
.share button,
.tags a { border-radius: 999px; }

/* Footer */
.site-footer { background: linear-gradient(180deg, #14344f, #0f2a42); border-radius: 32px 32px 0 0; }
.contact-cta { border-radius: 28px; width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); background: radial-gradient(60% 120% at 0% 0%, rgba(25, 179, 194, 0.3), transparent 60%), var(--ink); box-shadow: var(--shadow); }
.contact-cta .wrap { width: auto; padding-inline: clamp(1.25rem, 3vw, 2.25rem); }
.site-main:has(> .contact-cta:last-child) + .site-footer { border-top: 0; }

/* Search field */
.search-field { border-radius: 999px; background: var(--surface); padding-inline: 1.2rem; }
.button.button-ghost { background: transparent; color: var(--on-ink); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35); }
.button.button-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.me-band .button.button-ghost { color: var(--brand-2); box-shadow: inset 0 0 0 1.5px var(--brand-2); }
.me-band .button.button-ghost:hover { background: #eaf2f9; }
:root[data-theme="dark"] .me-band .button.button-ghost { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.lanes { padding-top: clamp(1rem, 3vw, 2rem); }
.services { width: min(100% - 2 * var(--gutter), var(--wrap)); border-radius: 28px; box-shadow: var(--shadow); margin-block: clamp(1.5rem, 4vw, 2.5rem); }
.services .wrap { width: auto; padding-inline: clamp(1.25rem, 3vw, 2.5rem); }

/* =====================================================================
   1.5 — animated AI background, floating panels, section illustrations
   ===================================================================== */

/* Section illustrations */
.section-art { display: block; width: 52px; height: 52px; flex-shrink: 0; border-radius: 16px; box-shadow: 0 10px 22px -12px rgba(16, 45, 75, 0.55); }
.section-art.is-photo { object-fit: cover; }
.section-art.art-sm { width: 26px; height: 26px; border-radius: 8px; display: inline-block; vertical-align: middle; margin-inline-end: 0.5rem; box-shadow: none; }
.section-art.art-lg { width: 84px; height: 84px; border-radius: 24px; }
.section-title-row { display: flex; align-items: center; gap: 0.85rem; }
.section-head .section-title-row .section-title { padding-bottom: 0.4rem; }
.page-head { grid-template-columns: auto 1fr; align-items: center; column-gap: 1.25rem; }
.page-head > :not(.section-art) { grid-column: 2; }
.page-head > .section-art { grid-row: 1 / span 2; }
.projects-head { align-items: center; }
.projects-head .section-art { display: none; }
@media (max-width: 600px) { .section-art { width: 44px; height: 44px; border-radius: 13px; } }

/* Canvas behind everything */
#fx-bg { display: none; }
body.has-fx {
	background:
		radial-gradient(80% 60% at 70% 20%, #0f2f57 0%, transparent 60%),
		radial-gradient(60% 50% at 0% 100%, #1d1650 0%, transparent 60%),
		#061325;
}
body.has-fx #fx-bg {
	display: block;
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	z-index: 0;
	pointer-events: none;
}
body.has-fx .site-header,
body.has-fx .site-main,
body.has-fx .site-footer { position: relative; z-index: 1; }
body.has-fx .site-header { position: sticky; z-index: 50; }
body.has-fx .site-footer { background: rgba(10, 26, 44, 0.92); backdrop-filter: blur(8px); }

/* Intro over the animation */
.fx-intro { display: none; }
body.has-fx .fx-intro {
	display: block;
	color: #fff;
	padding-top: clamp(3rem, 9vw, 7rem);
	min-height: min(78vh, 760px);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}
.fx-intro-inner { display: grid; gap: 1.1rem; justify-items: start; max-width: var(--wrap); }
.fx-kicker {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.3rem 0.95rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
	backdrop-filter: blur(6px);
	font-size: var(--fs-sm);
	font-weight: 650;
	color: #d7e6f7;
}
.fx-title {
	font-family: var(--font-display);
	font-size: clamp(2.1rem, 1.2rem + 3.6vw, 4.2rem);
	font-weight: 900;
	line-height: 1.3;
	max-width: 15ch;
	text-wrap: balance;
	text-shadow: 0 6px 40px rgba(0, 0, 0, 0.45);
}
.fx-text { font-size: var(--fs-md); color: #c3d4e8; max-width: 46ch; line-height: 1.9; }
.fx-search { width: min(100%, 560px); margin-top: 0.4rem; }
.fx-search .search-form { max-width: none; padding: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); backdrop-filter: blur(10px); }
.fx-search .search-field { background: transparent; border: 0; color: #fff; }
.fx-search .search-field::placeholder { color: #a9bdd3; }
.fx-search .button { background: #fff; color: var(--ink); box-shadow: none; }
.fx-channels { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.fx-channel {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.35rem 1.1rem 0.35rem 0.4rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
	backdrop-filter: blur(8px);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.2s ease, transform 0.2s ease;
}
.fx-channel:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }
.fx-channel .section-art { width: 40px; height: 40px; border-radius: 999px; box-shadow: none; }

.tech-strip {
	margin-top: clamp(2rem, 5vw, 3.5rem);
	overflow: hidden;
	padding-block: 1rem;
	border-block: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(6, 19, 37, 0.35);
	backdrop-filter: blur(4px);
	mask-image: linear-gradient(to left, transparent, #000 8%, #000 92%, transparent);
}
.tech-track { list-style: none; margin: 0; padding: 0; display: flex; width: max-content; animation: ticker 60s linear infinite; }
.tech-track li {
	padding-inline: 1.75rem;
	font-family: var(--font-display);
	font-size: clamp(1rem, 0.8rem + 0.8vw, 1.45rem);
	font-weight: 800;
	color: rgba(220, 235, 250, 0.55);
	white-space: nowrap;
	direction: ltr;
}
.tech-track li::after { content: "•"; margin-inline-start: 3.5rem; color: rgba(63, 208, 218, 0.6); }

/* Floating panels: the animation shows in the gaps between them */
body.has-fx .ticker { padding-top: 1.25rem; }
body.has-fx .hero,
body.has-fx .me-band,
body.has-fx .lanes,
body.has-fx .topics,
body.has-fx .band,
body.has-fx .projects,
body.has-fx .notes,
body.has-fx .listing,
body.has-fx .me-columns,
body.has-fx .skills,
body.has-fx .related {
	width: min(100% - 2 * var(--gutter), calc(var(--wrap) + 4rem));
	margin: 1.5rem auto;
	padding: clamp(1.25rem, 3vw, 2.25rem);
	border-radius: 32px;
	background: rgba(238, 243, 248, 0.97);
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
:root[data-theme="dark"] body.has-fx .hero,
:root[data-theme="dark"] body.has-fx .me-band,
:root[data-theme="dark"] body.has-fx .lanes,
:root[data-theme="dark"] body.has-fx .topics,
:root[data-theme="dark"] body.has-fx .band,
:root[data-theme="dark"] body.has-fx .projects,
:root[data-theme="dark"] body.has-fx .notes,
:root[data-theme="dark"] body.has-fx .listing,
:root[data-theme="dark"] body.has-fx .me-columns,
:root[data-theme="dark"] body.has-fx .skills,
:root[data-theme="dark"] body.has-fx .related { background: rgba(13, 23, 36, 0.95); }
body.has-fx .hero .wrap,
body.has-fx .me-band .wrap,
body.has-fx .band .wrap,
body.has-fx .projects .wrap,
body.has-fx .topics .wrap { width: 100%; }
body.has-fx .hero { background: rgba(238, 243, 248, 0.97); }
body.has-fx .hero .fiber { display: none; }
body.has-fx .me-band > .wrap { box-shadow: none; }
body.has-fx .topics .topics-row { box-shadow: none; }
body.has-fx .lanes { gap: clamp(1.5rem, 4vw, 3rem); }
body.has-fx .me-band-compact,
body.has-fx .me-band-page { background: transparent; box-shadow: none; padding-inline: 0; }
body.has-fx .me-band-compact > .wrap,
body.has-fx .me-band-page > .wrap { background: rgba(255, 255, 255, 0.97); }

/* Services: frosted glass over the animation */
body.has-fx .services {
	background: rgba(255, 255, 255, 0.07);
	backdrop-filter: blur(14px) saturate(1.2);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
body.has-fx .contact-cta { background: rgba(255, 255, 255, 0.07); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }

/* One glowing edge on the lead story */
@property --spin { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.tile-lead { isolation: isolate; }
.tile-lead::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 2px;
	background: conic-gradient(from var(--spin), transparent 0 55%, #3fd0da 70%, #a594ff 82%, #ffc83d 90%, transparent 100%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	animation: spin 6s linear infinite;
	pointer-events: none;
	z-index: 3;
}
@keyframes spin { to { --spin: 360deg; } }

/* Reveal on scroll (set up by main.js; content stays visible without JS) */
.js-reveal .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 860px) {
	body.has-fx .fx-intro { min-height: 0; padding-top: 2.5rem; }
	body.has-fx .hero,
	body.has-fx .me-band,
	body.has-fx .lanes,
	body.has-fx .topics,
	body.has-fx .band,
	body.has-fx .projects,
	body.has-fx .notes,
	body.has-fx .listing,
	body.has-fx .me-columns,
	body.has-fx .skills,
	body.has-fx .related { border-radius: 24px; margin-block: 1rem; padding: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
	.tech-track { animation: none; flex-wrap: wrap; width: auto; }
	.tech-track li[aria-hidden="true"] { display: none; }
	.tile-lead::after { animation: none; }
	.js-reveal .reveal { opacity: 1; transform: none; }
}
body.has-fx .site-main > .me-band > .wrap { background: transparent; padding: 0; border-radius: 0; }
@media (min-width: 861px) {
	body.has-fx .hero,
	body.has-fx .me-band,
	body.has-fx .lanes,
	body.has-fx .topics,
	body.has-fx .band,
	body.has-fx .projects,
	body.has-fx .notes { margin-block: 2.75rem; }
}
body.has-fx .fx-intro > * { min-width: 0; max-width: 100%; }
.tech-strip { width: 100%; }
.fx-intro-inner { width: min(100% - 2 * var(--gutter), var(--wrap)); }
.fx-search .search-form { display: flex; }
.fx-search .search-field { min-width: 0; }
.fx-intro-inner { grid-template-columns: minmax(0, 1fr); } .fx-text, .fx-search, .fx-channels { max-width: 100%; }

/* Pinned intro: the text stays while the network trains behind it */
body.has-fx .fx-intro {
	display: block;
	min-height: 0;
	padding-top: 0;
	height: calc(160vh - 78px);
	position: relative;
}
body.has-fx .fx-stage {
	position: sticky;
	top: 78px;
	height: calc(100vh - 78px);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: clamp(1.5rem, 4vh, 3rem);
	overflow: hidden;
}
.admin-bar.has-fx .fx-stage { top: 110px; height: calc(100vh - 110px); }
.fx-hint {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	font-size: var(--fs-sm);
	color: #a9bdd3;
	opacity: calc(1 - var(--fx-p, 0) * 6);
	transition: opacity 0.3s ease;
	margin: 0;
}
.fx-hint-mouse {
	width: 18px;
	height: 28px;
	border: 2px solid #a9bdd3;
	border-radius: 10px;
	position: relative;
}
.fx-hint-mouse::after {
	content: "";
	position: absolute;
	top: 5px;
	left: 50%;
	width: 3px;
	height: 6px;
	margin-left: -1.5px;
	border-radius: 2px;
	background: #a9bdd3;
	animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(8px); opacity: 0; } 100% { opacity: 0; } }
body.has-fx .tech-strip { margin-top: 0; }
@media (max-width: 860px) {
	body.has-fx .fx-intro { height: calc(135vh - 78px); padding-top: 0; }
	body.has-fx .fx-stage { justify-content: flex-start; padding-top: 1.75rem; }
	.fx-hint { margin-top: auto; padding-bottom: 1rem; }
}
@media (max-height: 640px) {
	body.has-fx .fx-intro { height: auto; }
	body.has-fx .fx-stage { position: static; height: auto; padding-block: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
	body.has-fx .fx-intro { height: auto; }
	body.has-fx .fx-stage { position: static; height: auto; padding-block: 3rem 1rem; }
	.fx-hint { display: none; }
	.fx-hint-mouse::after { animation: none; }
}

@media (max-width: 860px) { body.has-fx .tech-strip { display: none; } }
