/* Maktub Base — Reset & Typography */

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

html {
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--mk-cream);
	color: var(--mk-dark);
	font-family: var(--mk-font-sans);
	font-size: 1rem;
	line-height: 1.7;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--mk-font-serif);
	color: var(--mk-dark);
	line-height: 1.25;
	margin: 0 0 var(--mk-space-md);
	font-weight: 700;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

/* Body text */
p { margin: 0 0 var(--mk-space-md); }

a {
	color: var(--mk-pink-dark);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
	transition: color var(--mk-transition);
}
a:hover { color: var(--mk-brown); }

/* Lists */
ul, ol { padding-left: 1.5em; margin: 0 0 var(--mk-space-md); }
li { margin-bottom: var(--mk-space-xs); }

/* Emphasis */
strong, b { font-weight: 700; }
em, i { font-style: italic; }

/* Blockquote — notebook excerpt style */
blockquote {
	margin: var(--mk-space-lg) 0;
	padding: var(--mk-space-md) var(--mk-space-lg);
	border-left: 3px solid var(--mk-gold);
	background: var(--mk-gold-light);
	border-radius: 0 var(--mk-radius-md) var(--mk-radius-md) 0;
	font-family: var(--mk-font-serif);
	font-style: italic;
	color: var(--mk-brown);
}
blockquote p:last-child { margin: 0; }
blockquote cite {
	display: block;
	margin-top: var(--mk-space-sm);
	font-size: 0.85rem;
	font-style: normal;
	color: var(--mk-muted);
}

/* Code */
code, kbd, samp, pre {
	font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
	font-size: 0.875em;
}
code {
	background: var(--mk-cream-dark);
	padding: 2px 6px;
	border-radius: var(--mk-radius-sm);
	color: var(--mk-brown);
}
pre {
	background: var(--mk-cream-dark);
	padding: var(--mk-space-md);
	border-radius: var(--mk-radius-md);
	overflow-x: auto;
	margin: 0 0 var(--mk-space-md);
}

/* Images */
img, video { max-width: 100%; height: auto; display: block; }
figure { margin: 0 0 var(--mk-space-md); }
figcaption {
	font-size: 0.85rem;
	color: var(--mk-muted);
	text-align: center;
	margin-top: var(--mk-space-xs);
	font-style: italic;
}

/* Tables */
table { width: 100%; border-collapse: collapse; margin-bottom: var(--mk-space-md); }
th { text-align: left; font-weight: 700; padding: var(--mk-space-sm) var(--mk-space-md); border-bottom: 2px solid var(--mk-border); }
td { padding: var(--mk-space-sm) var(--mk-space-md); border-bottom: 1px solid var(--mk-cream-dark); }

/* Horizontal rule */
hr {
	border: none;
	border-top: 1px solid var(--mk-border);
	margin: var(--mk-space-xl) 0;
}

/* Forms */
input, textarea, select {
	font-family: var(--mk-font-sans);
	font-size: 1rem;
	color: var(--mk-dark);
}

/* Skip link */
.skip-link {
	position: absolute;
	top: -100%;
	left: var(--mk-space-md);
	background: var(--mk-dark);
	color: #fff;
	padding: var(--mk-space-sm) var(--mk-space-md);
	border-radius: 0 0 var(--mk-radius-sm) var(--mk-radius-sm);
	z-index: 9999;
	text-decoration: none;
}
.skip-link:focus { top: 0; }

/* Entry content */
.entry-content > * + * { margin-top: var(--mk-space-md); }
.entry-content h2, .entry-content h3 { margin-top: var(--mk-space-xl); }
.entry-content a { text-decoration: underline; }

/* Accessibility */
.screen-reader-text {
	clip: rect(1px,1px,1px,1px);
	position: absolute;
	height: 1px;
	width: 1px;
	overflow: hidden;
	word-wrap: normal;
}
.screen-reader-text:focus {
	clip: auto;
	height: auto;
	left: 5px;
	top: 5px;
	width: auto;
	z-index: 100000;
}
