/* --- Minimal reset --- */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* --- Theme tokens --- */
:root{
	--muted: #555555;
	/* Fluid type scale */
	--step--1: clamp(0.88rem, 0.85rem + 0.2vw, 0.95rem);
	--step-0:  clamp(1.00rem, 0.95rem + 0.35vw, 1.125rem);
	--step-1:  clamp(1.25rem, 1.15rem + 0.65vw, 1.5rem);
	--step-2:  clamp(1.5rem,  1.35rem + 1.0vw,  1.875rem);
	--step-3:  clamp(1.9rem,  1.6rem  + 1.6vw,  2.4rem);


	/* Backgrounds */
	--bg: #CFEFFF;                 /* avatar sky-blue */
	--panel: #000000;              /* keep your black card/sections */

	/* Text colors */
	--text: #1a1a1a;
	--heading: #0e0e0e;

	/* Links (single-color fallback) */
	--brand: #2D7CFD;              /* works on light bg */
	--brand-dark-bg: #FFE08A;      /* link on black: softer butter-yellow */

	/* Yellows (softened to match avatar) */
	--yellow-color-font: #FFC400;  /* was #FFCC00 (tiny shift warmer) */
	--yellow-color-bg: #FFDF40;    /* was #FFE500 (less harsh) */

	--rainbow-gradient: linear-gradient(90deg,
	#ff7ad9,
	#b084ff,
	#67c9ff,
	#7ae8a1,
	#ffd166
	);

	--rainbow-gradient-2: linear-gradient(
				90deg,
				#fdb1be,
				#fec0b1,
				#f8d2a5,
				#ece49b,
				#c0ee94,
				#9ee899,
				#83d1db,
				#7bd0e5,
				#bcefff,
				#eaaed0
		);

	--rainbow-gradient-3: linear-gradient(90deg,
	#e39ff6 0%,    /* light purple */
	#b19cd9 20%,   /* soft violet */
	#87cefa 40%,   /* light blue */
	#7fffd4 60%,   /* aquamarine */
	#ffb347 80%,   /* peach/orange */
	#ff6961 100%   /* warm pink/red */
	);
}

/* --- Base typography --- */
html { font-size: 16px; }
body{
	background: var(--bg);
	color: var(--text);
	font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Noto Sans","Liberation Sans",sans-serif;
	font-size: var(--step-0);
	line-height: 1.7;
	-webkit-text-size-adjust: 100%;
	text-rendering: optimizeLegibility;
}

/* rainbow accent (matches crown/mug) */
.rainbow-text{
	background: var(--rainbow-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* optional: rainbow button/label */
.rainbow-chip{
	background: var(--rainbow-gradient);
	color:#000;
	padding: .35em .75em;
	font-weight: 700;
}

/* Rainbow underline */
.rainbow-underline {
	position: relative;
}
.rainbow-underline::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 100%;
	height: 3px;
	background: var(--rainbow-gradient);
	border-radius: 2px;
}

/* --- Headings --- */
h1,h2,h3{ color: var(--heading); line-height: 1.25; margin:0 0 .6em; }
h1{ font-size: var(--step-3); letter-spacing:-0.02em; }
h2{ font-size: var(--step-2); }
h3{ font-size: var(--step-1); text-transform: uppercase; letter-spacing:.06em; }
h1{ margin-top:0; }
h2, h3{ margin-top:38px; }

/* --- Text blocks --- */
p,ol,ul,dl,blockquote{ margin:1rem 0; }
p{ max-width:70ch; }

/* --- Links --- */
a {
	color: var(--brand);
	text-decoration: underline;
	text-underline-offset: .15em;
	text-decoration-thickness: .08em;
	text-decoration-skip-ink: auto;
}
a:hover {
	text-decoration-thickness: .12em;
	background: var(--rainbow-gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}


#header, #content { background: var(--panel); }

/* --- Images --- */
img{ border:2px solid #fff; max-width:100%; height:auto; border-radius:4px; }
.img1{ float:left; margin:5px 15px 0 0; }

/* --- Search --- */
#search{
	margin:0; padding:0;
	text-transform:uppercase; font-weight:bold; font-size:14px; color:#000;
}

/* --- Forms --- */
form{ margin:0; padding:15px 0 0 25px; }
.input1{ width:130px; background:#fff; border:1px solid #666; color:#000; }

/* --- Header (dark) --- */
#header{
	/* keep your 375 look but responsive */
	max-width: 42rem;  /* ~672px optimal reading width */
	width: min(100%, 42rem);
	margin:0 auto;
	text-align:center;
	padding:20px 0;
	font-family:"Trebuchet MS",Arial,Helvetica,sans-serif;
}
#header h1{ margin:0; font-size:38px; letter-spacing:-2px; color:#fff; }
#header h2{ margin:0; font-size:14px; letter-spacing:-1px; color:#fff; }
#header a{ text-decoration:none; }

/* --- Content (dark) --- */
#content{
	/* keep our 375px look but responsive */
	max-width: 42rem;  /* ~672px optimal reading width */
	width: min(100%, 42rem);
	margin:0 auto;
	color:#fff;
}
.yellow-bg{
	background: var(--yellow-color-bg); border-bottom: 6px solid #48453f;
}
.rainbow-bg{
	background: var(--rainbow-gradient-2);
	color:#000;
	padding: .35em .75em;
	font-weight: 700;
	border-bottom: 6px solid #48453f;
}
.rainbow-bg-2{
	background: var(--rainbow-gradient);
	color:#000;
	padding: .35em .75em;
	font-weight: 700;
	border-bottom: 6px solid #b29100;
}

/* Make the yellow bar span the full width of #content */
#content > .yellow-bg {
	width: 100%;
	max-width: none;     /* ← kill any old max-width constraint */
	margin: 0;           /* ← no side margins */
	padding: 1em 0;    /* vertical padding only */
	box-sizing: border-box;
	text-align: center;
}

/* The earlier rule added 5px left padding — remove it here */
#content > .yellow-bg.search {
	padding-left: 0;
	height: auto;
}

/* Inner column */
#inner-content{ width:100%; color:#fff; padding:0 1.5em;}

/* Sections */
.latest-post{ padding:1.5em; }
.latest-post h2{ font-size:1.6em;}
.post h3{
	border-bottom:3px dashed #B5D6FF;
	margin-bottom:.5em;
	text-transform:uppercase;
	font-size:14px;
}
/* Default padding for comfortable reading */
.latest-post,
.post {
	padding: 1.5em;
}
.latest-post h2, .post h3 { color: var(--yellow-color-font); }

.file *{ color:#DDCB00; }
.file small{ word-break:break-all; }

/* --- Utility / accents --- */
.uppercase{ letter-spacing:.06em; }

/* --- Footer (dark) --- */
#footer{
	/* keep your 375 look but responsive */
	max-width: 42rem;  /* ~672px optimal reading width */
	width: min(100%, 42rem);
	margin:0 auto;
	color:#111;
	text-align:center;
	padding:12px 0 18px;
	font-weight: 600;
	text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
#footer p{ margin:0; font-size:10px; }
#footer a{
	color: #000; /* pure black links */
	text-decoration: underline;
	text-underline-offset: 0.15em;
}
#footer a:hover {
	text-decoration-thickness: 0.12em;
}

/* --- Image helper --- */
.image-align{ height:320px; text-align:center; border-radius:6px; }

/* --- Focus visibility --- */
:focus-visible{ outline:3px solid #ffbf47; outline-offset:2px; }


/* MENU */
/* ========== Top bar ========== */
.site-topbar{
	position: sticky; top: 0; z-index: 50;
	background: transparent;
	border-bottom: none;
}
.site-topbar a {
	text-decoration:none;
	background: var(--rainbow-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
/* The centered bar gets the background and border */
.site-topbar__inner{
	/* keep your 375 look but responsive */
	max-width: 42rem; width: min(100%,42rem);
	margin: 0 auto; height: 56px;
	display: flex; align-items: center; justify-content: space-between;
	padding: 0 1rem; color: #fff;

	background: #000;                        /* moved here */
	border-bottom: 1px solid rgba(255,255,255,.08);  /* moved here */
	border-radius: 0;                        /* optional: set to .5rem for rounded ends */
}
.site-topbar .brand{ font-weight: 800; letter-spacing: .02em; }

/* ========== Hamburger button ========== */
.hamburger{
	--bar: 2px;
	width: 32px; height: 24px;
	display: inline-flex; flex-direction: column;
	justify-content: space-between;
	background: transparent; border: 0; cursor: pointer;
	padding: 0; color: inherit;
}
.hamburger__bar{
	display:block; width:100%; height: var(--bar);
	background: #cbd5e1; border-radius: 2px;
	transition: transform .2s ease, opacity .2s ease;
}

/* animated X when open */
html.menu-open .hamburger__bar:nth-child(1){ transform: translateY(11px) rotate(45deg); }
html.menu-open .hamburger__bar:nth-child(2){ opacity: 0; }
html.menu-open .hamburger__bar:nth-child(3){ transform: translateY(-11px) rotate(-45deg); }

/* ========== Overlay menu ========== */
.menu-overlay{
	position: fixed; inset: 0; z-index: 60;
	background: #000; /* solid black panel */
	display: grid; grid-template-rows: auto 1fr auto;
	opacity: 0; visibility: hidden; pointer-events: none;
	transition: opacity .2s ease, visibility .2s;
	border-left: 1px solid rgba(255,255,255,.06);
	border-right: 1px solid rgba(255,255,255,.06);
}
html.menu-open .menu-overlay{ opacity:1; visibility:visible; pointer-events:auto; }

/* close button (top-right) */
.menu-overlay__close{
	position: fixed;          /* pin to screen */
	z-index: 100;
	top: calc(env(safe-area-inset-top, 0px) + 12px);
	right: calc(env(safe-area-inset-right, 0px) + 12px);

	/* make sure the centering rule can't affect it */
	width: 44px !important;
	height: 44px !important;
	margin: 0 !important;
	max-width: none !important;

	display: grid; place-items: center;
	font-size: 32px; line-height: 1;
	color: #cbd5e1; background: transparent; border: 0; cursor: pointer;
}

@media (max-width: 420px){ .menu-overlay__close{ font-size: 28px; } }


.menu-overlay__list{
	list-style: none; margin: 0; padding: 0;
	display: grid; gap: 2rem; place-content: center;
	text-align: center; min-height: 60vh;
}
.menu-overlay__list a{
	color: #cbd5e1; text-decoration: none;
	font-size: clamp(1.1rem, 1rem + 1.2vw, 2rem);
	letter-spacing: .06em;
}
.menu-overlay__list .is-active a{
	color: var(--yellow-color-font, #ffcc00);
	text-shadow: 0 0 22px rgba(255,204,0,.35); /* glow */
}

/* Contact CTA with cut corner */
.menu-overlay__cta{
	--y: var(--yellow-color-font, #ffcc00);
	display: block; width: min(90%, 32rem); margin: 2rem auto 3rem;
	text-align: center; padding: 1rem 1.25rem; font-weight: 700;
	color: #fff; text-decoration: none; position: relative;
	border: 2px solid var(--y);
	height: 70px;
}
.menu-overlay__cta::after{
	/* cut corner (bottom-right) */
	content: ""; position: absolute; right: -2px; bottom: -2px;
	width: 24px; height: 24px; background: #000; border-left: 2px solid var(--y); border-top: 2px solid var(--y);
	transform: translate(0,0) skew(-45deg);
}
.menu-overlay__cta:hover{ box-shadow: 0 0 0 4px rgba(255,204,0,.15) inset; }

/* When menu open: lock scroll */
html.menu-open, html.menu-open body{ overflow: hidden; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
	.hamburger__bar, .menu-overlay{ transition: none; }
}

/* Optional: keep menu content centered within your page width */
.menu-overlay > *:not(.menu-overlay__close){
	max-width: 42rem; width: min(100%, 42rem); margin: 0 auto;
}
/* END MENU */

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce){
	*{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}

/* Reduce padding on small screens */
@media (max-width: 480px) {
	.latest-post,
	.post {
		padding: 0.1em;
	}
}
