/**
 * Purbodix 2.0 — CSS Reset / Normalize
 * Modern CSS reset with sensible defaults for a news portal.
 */

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

html {
    font-size: 100%; /* 16px base */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-english);
    font-size: var(--size-body);
    line-height: var(--line-height-body);
    color: var(--color-black);
    background-color: var(--color-surface);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Assamese/Bengali content blocks */
[lang="as"], [lang="bn"], .text-as, .text-bn {
    font-family: var(--font-bengali);
    line-height: 1.8; /* Assamese needs more line-height */
}

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

img {
    font-style: italic; /* Style alt text */
    vertical-align: middle;
}

a {
    color: var(--color-brand);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-brand-dark);
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

button:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: var(--line-height-heading);
    color: var(--color-black);
    letter-spacing: var(--letter-spacing-tight);
}

p {
    margin-bottom: var(--space-2);
}

p:last-child {
    margin-bottom: 0;
}

table {
    border-collapse: collapse;
    width: 100%;
}

/* Accessibility: Skip link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-1) var(--space-2);
    background: var(--color-brand);
    color: white;
    border-radius: var(--radius-md);
    z-index: 9999;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-1);
}

/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--color-brand);
    z-index: var(--z-progress);
    transition: width 100ms linear;
}

/* Selection styling */
::selection {
    background: var(--color-brand-pale);
    color: var(--color-brand-dark);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
