/* Explain: Base reset, global styles, typography, and layout utilities. */
* {
    box-sizing: border-box;
}

html {
    background: var(--background-color);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    background: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-hyphens: none;
    hyphens: none;
}

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.015em;
    color: var(--primary-color);
    text-wrap: balance;
}

p {
    margin: 0;
}

@media (min-width: 768px) {
    p {
        text-align: justify;
        text-justify: inter-word;
        -webkit-hyphens: none;
        hyphens: none;
    }
}

ul, ol {
    margin: 0;
    padding: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button {
    font: inherit;
}

::selection {
    background: var(--accent-color);
    color: var(--primary-color);
}

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

.nk-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-strong);
    padding-bottom: 0.25rem;
    transition: color 0.25s ease, border-color 0.25s ease, gap 0.25s ease;
}

.nk-link:hover {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    gap: 0.9rem;
}

.nk-link i {
    font-size: 0.72rem;
}

.nk-note {
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}