/* ===========================================================================
   jwr.sk - RETRO CRT TERMINAL SKIN (1.1.0)

   Ported from the hand-iterated draft (2026-11-17). The five section blocks now
   print plain terminal markup (.jwr-term ...), so this file owns their look;
   site.css's rules for the 1.0.x purple sections no longer match anything on
   the front page and are left in place, unused, until the next clean-up.

   THE FONT-SIZE RULE STILL HOLDS: no font-size here. Sizes come from
   typography.css (.t-name, .t-sec, .t-hello, .t-kind, .t-lead, body).
   Colours come from the palette (includes/palette.php).
   =========================================================================== */

:root {
	--jwr-fg: var(--wp--preset--color--contrast-medium);   /* #33ff33 */
	--jwr-hi: var(--wp--preset--color--contrast);          /* #a8ffa8 */
	--jwr-dim: var(--wp--preset--color--contrast-light);   /* #23b023 */
	--jwr-bg: var(--wp--preset--color--base);              /* #050805 */
	--jwr-glow: 0 0 1px rgba(51, 255, 51, .6), 0 0 6px rgba(51, 255, 51, .2);
}

html,
:root body {
	background: var(--jwr-bg);
}
:root body {
	/* Monospace fallback, independent of the theme.json font preset: if the
	   preset variable is ever missing or renamed (it was - WordPress turned the
	   slug vt323 into vt-323), the page still falls back to a monospace face. */
	font-family: var(--wp--preset--font-family--terminal, VT323), VT323, ui-monospace, Menlo, Consolas, "Courier New", monospace;
	color: var(--jwr-fg);
	text-shadow: var(--jwr-glow);
}
::selection { background: var(--jwr-fg); color: var(--jwr-bg); text-shadow: none; }

/* --- CRT effects, kept light for readability: faint scanlines, a soft
   vignette, a barely-there flicker and a slow refresh bar. No frame. */
body::before,
body::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 2147483000;
}
body::before {
	background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .14) 0 1px, transparent 1px 4px);
}
body::after {
	background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .4) 100%);
}
.jwr-crt {
	position: relative;
	--wp--style--global--content-size: 1280px;
	--wp--style--global--wide-size: 1280px;
	animation: jwr-flicker 6s infinite steps(1);
}
.jwr-crt::after {
	content: "";
	position: fixed;
	left: 0;
	right: 0;
	height: 120px;
	top: -120px;
	pointer-events: none;
	z-index: 2147482999;
	background: linear-gradient(to bottom, transparent, rgba(51, 255, 51, .035), transparent);
	animation: jwr-roll 7s linear infinite;
}
@keyframes jwr-roll { to { top: 110%; } }
@keyframes jwr-flicker {
	0% { opacity: 1; } 3% { opacity: .98; } 4% { opacity: 1; } 77% { opacity: .985; } 78% { opacity: 1; }
}

/* --- Links: dotted rule, inverse video on hover. */
:root a {
	color: var(--jwr-fg);
	text-decoration: none;
	border-bottom: 1px dotted currentColor;
}
:root a:hover,
:root a:focus-visible {
	background: var(--jwr-fg);
	color: var(--jwr-bg) !important;
	text-shadow: none;
	text-decoration: none;
	border-bottom-style: solid;
	outline: none;
}

/* --- Header: a terminal status bar (templates). */
.jwr-bar {
	border-bottom: 1px solid var(--jwr-fg);
	color: var(--jwr-dim);
	gap: 12px;
}
.jwr-bar p { margin: 0; }
.jwr-bar a { margin-left: .75em; }

/* --- Shared terminal pieces. */
.jwr-term h1,
.jwr-term h2 { font-weight: 400; margin: 0; }
.jwr-term p { margin: .3em 0 .9em; }
.jwr-term strong { font-weight: 400; color: var(--jwr-hi); }
.jwr-hl {
	background: var(--jwr-fg);
	color: var(--jwr-bg);
	text-shadow: none;
	padding: 0 .25em;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
.jwr-prompt::before {
	content: "root@jwr.sk:~$ ";
	color: var(--jwr-dim);
}
.jwr-cursor {
	display: inline-block;
	width: .6em;
	height: 1em;
	margin-left: .15em;
	vertical-align: -.12em;
	background: var(--jwr-fg);
	box-shadow: var(--jwr-glow);
	animation: jwr-blink 1s steps(1) infinite;
}
@keyframes jwr-blink { 50% { opacity: 0; } }

/* Section = a dim command line with a dashed rule, then a big bright h2. */
section.jwr-term { margin: 34px 0; }
.jwr-cmd {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 6px;
	color: var(--jwr-dim);
}
.jwr-cmd span { white-space: nowrap; }
.jwr-cmd::after {
	content: "";
	flex: 1;
	border-top: 1px dashed var(--jwr-fg);
	opacity: .6;
}
.jwr-sec {
	color: var(--jwr-hi);
	text-transform: uppercase;
	letter-spacing: .03em;
	margin: 0 0 18px !important;
}

/* --- Hero. */
.jwr-term-hero { padding-top: 24px; }
.jwr-term-hero .jwr-prompt { margin: 0 0 10px; }
.jwr-name { color: var(--jwr-hi); letter-spacing: .02em; margin: 0 0 6px !important; }
.jwr-cap { color: var(--jwr-dim); letter-spacing: .08em; margin: 0 0 26px !important; }

/* --- About. */
.jwr-term-about { max-width: 62em; margin-top: 0; }
.jwr-hello { color: var(--jwr-hi); margin-bottom: .2em !important; }
.jwr-btn {
	display: inline-block;
	border: 1px solid var(--jwr-fg) !important;
	padding: 4px 14px;
	margin-top: 6px;
}

/* --- Projects. */
.jwr-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}
.jwr-card {
	position: relative;
	border: 1px solid var(--jwr-fg);
	padding: 14px 14px 10px;
	background: rgba(51, 255, 51, .02);
}
.jwr-card:hover { background: rgba(51, 255, 51, .07); }
.jwr-since {
	position: absolute;
	top: -.75em;
	right: 10px;
	padding: 0 6px;
	background: var(--jwr-bg);
	color: var(--jwr-dim);
}
:root .jwr-logo,
:root .jwr-logo:hover { display: inline-block; border: 0; background: none; }
.jwr-logo img {
	display: block;
	height: 34px;
	width: auto;
	max-width: 100%;
	margin: 6px 0 8px;
	filter: drop-shadow(0 0 3px rgba(51, 255, 51, .4));
}
.jwr-kind { color: var(--jwr-dim); margin-bottom: 6px; }
.jwr-go { border: 0 !important; }
.jwr-go::before { content: "\27A4  "; }

/* --- Skills: "* " bullet lists, labels in the bright green. */
.jwr-list p::before { content: "* "; color: var(--jwr-dim); }
.jwr-label { color: var(--jwr-hi); }

/* --- Outro: the sign-off and the footer line. */
.jwr-signoff { display: flex; align-items: center; gap: .35em; }
.jwr-spock {
	flex: none;
	height: 1em;
	width: auto;
	color: var(--jwr-hi);
	filter: drop-shadow(0 0 1px rgba(51, 255, 51, .6)) drop-shadow(0 0 6px rgba(51, 255, 51, .33));
}
.jwr-foot {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 44px;
	padding: 10px 0 40px;
	border-top: 1px solid var(--jwr-fg);
	color: var(--jwr-dim);
}

/* --- Buttons elsewhere (the contact form): outline, inverse on hover. */
:root .wp-block-button__link,
:root .wp-element-button {
	background: transparent !important;
	color: var(--jwr-fg) !important;
	border: 1px solid var(--jwr-fg) !important;
	border-radius: 0 !important;
}
:root .wp-block-button__link:hover,
:root .wp-element-button:hover {
	background: var(--jwr-fg) !important;
	color: var(--jwr-bg) !important;
	text-shadow: none;
}

/* --- Contact form (AweDesk): its purple-tinted variables, re-inked green. */
:root .alsp,
:root [class*="alsp-"] {
	--C-B-LN: #124d12;
	--C-B-100: #0b1f0b;
	--C-B-200: #124d12;
	--C-B-300: #1c8a1c;
	--C-B-10: #0b1f0b;
}
:root input,
:root textarea,
:root select {
	border-radius: 0 !important;
	font-family: inherit;
}

/* --- The boot screen (see includes/retro.php). Hidden unless armed. */
#jwr-boot { display: none; }
html.jwr-booting #jwr-boot {
	display: block;
	position: fixed;
	inset: 0;
	z-index: 2147482000;
	padding: 32px;
	background: #000;
	color: var(--jwr-fg);
	white-space: pre-wrap;
	cursor: pointer;
}
html.jwr-booting { overflow: hidden; }
#jwr-boot.is-off { animation: jwr-off .45s forwards; }
@keyframes jwr-off {
	0% { transform: scale(1, 1); opacity: 1; }
	60% { transform: scale(1, .004); opacity: 1; background: #33ff33; }
	100% { transform: scale(0, .004); opacity: 0; }
}

@media (max-width: 760px) {
	.jwr-cards { grid-template-columns: 1fr; gap: 22px; }
}
@media (prefers-reduced-motion: reduce) {
	.jwr-crt,
	.jwr-crt::after,
	.jwr-cursor { animation: none; }
}
