/**
 * Base styles — reset-lite, Hindi-aware typography, accessibility helpers,
 * layout primitives. Built entirely on tokens.css.
 */

/* ------------------------------------------------------------- reset -- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--alf-color-bg);
	color: var(--alf-color-text);
	font-family: var(--alf-font-sans);
	font-size: var(--alf-text-base);
	font-weight: var(--alf-weight-regular);
	line-height: var(--alf-leading-body);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
svg,
video,
iframe {
	max-width: 100%;
	height: auto;
}

img,
svg {
	display: block;
}

/* -------------------------------------------------------- typography -- */
h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--alf-space-3);
	color: var(--alf-color-heading);
	font-weight: var(--alf-weight-semibold);
	line-height: var(--alf-leading-heading);
	overflow-wrap: break-word;
}

h1 {
	font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3rem);
}

h2 {
	font-size: clamp(1.55rem, 1.25rem + 1.4vw, 2.25rem);
}

h3 {
	font-size: clamp(1.3rem, 1.15rem + 0.7vw, 1.625rem);
}

h4 {
	font-size: var(--alf-text-xl);
}

h5 {
	font-size: var(--alf-text-lg);
}

h6 {
	font-size: var(--alf-text-base);
}

p {
	margin: 0 0 var(--alf-space-4);
}

p:last-child {
	margin-bottom: 0;
}

a {
	color: var(--alf-color-link);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--alf-color-link-hover);
	text-decoration-thickness: 2px;
}

strong,
b {
	font-weight: var(--alf-weight-semibold);
}

small {
	font-size: var(--alf-text-sm);
}

ul,
ol {
	margin: 0 0 var(--alf-space-4);
	padding-left: 1.4em;
}

li + li {
	margin-top: var(--alf-space-1);
}

hr {
	border: 0;
	border-top: 1px solid var(--alf-color-border);
	margin: var(--alf-space-8) 0;
}

blockquote {
	margin: var(--alf-space-6) 0;
	padding: var(--alf-space-4) var(--alf-space-5);
	background: var(--alf-color-surface-alt);
	border-left: 4px solid var(--alf-color-accent);
	border-radius: 0 var(--alf-radius-md) var(--alf-radius-md) 0;
}

code,
pre {
	font-family: var(--alf-font-mono);
	font-size: 0.9em;
}

pre {
	overflow-x: auto;
	padding: var(--alf-space-4);
	background: var(--alf-color-surface-alt);
	border-radius: var(--alf-radius-md);
}

::selection {
	background: var(--alf-green-100);
}

/* ------------------------------------------------------------- focus -- */
/* Never remove the native outline; upgrade it for keyboard users. */
:focus-visible {
	outline: var(--alf-focus-width) solid var(--alf-focus-color);
	outline-offset: var(--alf-focus-offset);
	border-radius: var(--alf-radius-sm);
}

/* ------------------------------------------------- accessibility text -- */
.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
}

.alf-skip-link:focus {
	position: fixed !important;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 100000;
	padding: 0.65rem 1rem;
	background: var(--alf-green-900);
	color: var(--alf-white);
	border-radius: var(--alf-radius-md);
	box-shadow: var(--alf-shadow-lg);
	text-decoration: none;
	font-weight: var(--alf-weight-medium);
}

/* -------------------------------------------------------- layout ----- */
.alf-container {
	width: 100%;
	max-width: var(--alf-container);
	margin-inline: auto;
	padding-inline: var(--alf-gutter);
}

.alf-container--narrow {
	max-width: var(--alf-container-narrow);
}

.alf-container--wide {
	max-width: var(--alf-container-wide);
}

.alf-section {
	padding-block: clamp(2.5rem, 6vw, 5.5rem);
}

.alf-section--tight {
	padding-block: clamp(1.5rem, 3vw, 3rem);
}

.alf-main {
	min-height: 55vh;
}

/* Header, navigation, and footer styling live in layout.css (Task 0102). */

/* --------------------------------------------------- experience text -- */
.alf-entry-content h2,
.alf-entry-content h3 {
	margin-top: var(--alf-space-8);
}

.alf-entry-content > :last-child {
	margin-bottom: 0;
}

/* ----------------------------------------------------- reduced motion -- */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
