/* =============================================================================
   CSS RESET & NORMALIZATION
   ============================================================================= */

/* Remove default margins and paddings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* HTML5 display definitions */
article, aside, details, figcaption, figure,
footer, header, hgroup, main, nav, section {
    display: block;
}

/* Base element styles */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-sans);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg-light);
}

/* Typography reset */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-md);
}

p {
    margin-bottom: var(--spacing-md);
}

/* Link reset */
a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

/* Form elements */
input, button, textarea, select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    border: 1px solid var(--color-border);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
}

/* Lists */
ul, ol {
    list-style: none;
}

/* Images */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Code */
code, pre {
    font-family: 'Monaco', 'Courier New', monospace;
    background-color: var(--color-border);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
}

pre {
    padding: var(--spacing-md);
    overflow-x: auto;
}

/* Tables */
table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

td, th {
    padding: var(--spacing-sm);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
