/**
 * Comprehensive CSS Reset
 * Combined from Meyer Reset v2.0, Josh Comeau's Custom CSS Reset, and Andy Bell's Modern CSS Reset
 * Organized into logical sections for maintainability
 */

/* ==========================================================================
   1. BOX MODEL & UNIVERSAL RESET
   ========================================================================== */

/* Use intuitive box-sizing model for all elements */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Remove default margin for better control */
* {
    margin: 0;
    padding: 0;
}

/* Reset padding and borders for all elements */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

/* ==========================================================================
   2. HTML5 DISPLAY RESET
   ========================================================================== */

/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
    display: block;
}

/* ==========================================================================
   3. DOCUMENT & BODY SETUP
   ========================================================================== */

/* Prevent font size inflation and improve text rendering */
html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

/* Enable keyword animations for supporting browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        interpolate-size: allow-keywords;
    }
}

/* Set core body defaults */
body {
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   4. TYPOGRAPHY & TEXT HANDLING
   ========================================================================== */

/* Improve line wrapping for paragraphs */
p {
    text-wrap: pretty;
    overflow-wrap: break-word;
}

/* Balance text wrapping and set appropriate line heights for headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
    overflow-wrap: break-word;
    line-height: 1.5;
}

/* Remove quotes from blockquote and q elements */
blockquote,
q {
    quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
    content: '';
    content: none;
}

/* ==========================================================================
   5. LISTS
   ========================================================================== */

/* Remove default list styles */
ol,
ul {
    list-style: none;
}

/* Remove list styles on ul, ol elements with a list role */
ul[role='list'],
ol[role='list'] {
    list-style: none;
}

/* ==========================================================================
   6. LINKS
   ========================================================================== */

/* Default link styles for links without classes */
a:not([class]) {
    text-decoration-skip-ink: auto;
    color: currentColor;
}

/* ==========================================================================
   7. MEDIA ELEMENTS
   ========================================================================== */

/* Make media elements easier to work with */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/* ==========================================================================
   8. FORM ELEMENTS
   ========================================================================== */

/* Inherit fonts for form controls */
input,
button,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    line-height: 1.5;
}

/* Ensure textareas without rows attribute are not tiny */
textarea:not([rows]) {
    min-height: 10em;
}

/* ==========================================================================
   9. TABLES
   ========================================================================== */

/* Normalize table styling */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ==========================================================================
   10. ACCESSIBILITY & NAVIGATION
   ========================================================================== */

/* Add extra scroll margin for anchored elements */
:target {
    scroll-margin-block: 5ex;
}

/* ==========================================================================
   11. MODERN LAYOUT FOUNDATIONS
   ========================================================================== */

/* Create root stacking context for modern frameworks */
#root,
#__next {
    isolation: isolate;
}