/* Typography Improvements for Better Readability */
/* Optimalizované pre slovenský a český obsah */

/* ============================================
   Font Rendering Optimization
   ============================================ */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1;
}

/* ============================================
   Base Typography
   ============================================ */
body {
    font-size: 16px;
    letter-spacing: 0.01em;
    color: rgb(240, 240, 240);
}

/* ============================================
   Paragraph & Text Content
   ============================================ */
p {
    line-height: 1.7;
}

/* ============================================
   Links Enhancement
   ============================================ */
a {
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.15em;
}

a:hover {
    text-decoration-thickness: 0.12em;
}

/* ============================================
   Code & Preformatted Text
   ============================================ */
code {
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    letter-spacing: -0.01em;
}

pre {
    line-height: 1.6;
    tab-size: 4;
}

pre code {
    font-size: 0.875em;
}

/* ============================================
   Text Emphasis
   ============================================ */
strong,
b {
    font-weight: 600;
    letter-spacing: 0.005em;
}

em,
i {
    font-style: italic;
    letter-spacing: 0.02em;
}

/* ============================================
   Small Text & Captions
   ============================================ */
small,
.text-sm {
    font-size: 0.9em;
    line-height: 1.6;
    color: rgb(180, 180, 180);
}

figcaption,
.caption {
    font-size: 0.875em;
    line-height: 1.5;
    color: rgb(160, 160, 160);
}

/* ============================================
   Blockquotes
   ============================================ */
blockquote {
    font-size: 1.05em;
    line-height: 1.7;
    letter-spacing: 0.01em;
    font-style: italic;
}

/* ============================================
   Tables
   ============================================ */
table {
    font-size: 0.95em;
    line-height: 1.6;
}

th {
    font-weight: 600;
    letter-spacing: 0.02em;
}

td {
    letter-spacing: 0.01em;
}

/* ============================================
   Forms & Inputs
   ============================================ */
input,
textarea,
select,
button {
    font-size: inherit;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

label {
    line-height: 1.6;
}

/* ============================================
   Print Optimization
   ============================================ */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.6;
        color: #000;
    }

    h1 {
        font-size: 24pt;
    }

    h2 {
        font-size: 20pt;
    }

    h3 {
        font-size: 16pt;
    }

    h4 {
        font-size: 14pt;
    }

    p {
        orphans: 3;
        widows: 3;
    }
}

/* ============================================
   Accessibility Improvements
   ============================================ */

/* Zlepšenie pre dyslektikov - wider letter spacing pre .dyslexic class */
.dyslexic-friendly,
body.dyslexic-mode {
    letter-spacing: 0.12em;
    word-spacing: 0.16em;
    line-height: 1.8;
}

/* Focus states pre keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgb(56, 189, 248);
    outline-offset: 2px;
}

/* ============================================
   Mobile Optimization
   ============================================ */
@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.375rem;
    }

    /* Menší letter spacing na mobile pre lepšie využitie priestoru */
    body {
        letter-spacing: 0.005em;
    }
}

/* ============================================
   Dark Mode Specific (projekt už používa tmavý režim)
   ============================================ */

/* Vyššie kontrast pre lepšiu čitateľnosť na tmavom pozadí */
:root {
    --text-primary: rgb(240, 240, 240);
    --text-secondary: rgb(180, 180, 180);
    --text-muted: rgb(147, 147, 149);
    --text-link: rgb(56, 189, 248);
    --text-link-hover: rgb(125, 211, 252);
}

/* Aplikovať farby */
body {
    color: var(--text-primary);
}

.text-secondary,
.meta-info,
.post-meta {
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted);
}

/* ============================================
   Utility Classes
   ============================================ */

/* Rôzne veľkosti fontov */
.text-xs {
    font-size: 0.75rem;
    line-height: 1.5;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.6;
}

.text-base {
    font-size: 1rem;
    line-height: 1.7;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75;
}

/* Font weights */
.font-light {
    font-weight: 300;
}

.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* Letter spacing utilities */
.tracking-tight {
    letter-spacing: -0.025em;
}

.tracking-normal {
    letter-spacing: 0;
}

.tracking-wide {
    letter-spacing: 0.025em;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

/* Line height utilities */
.leading-tight {
    line-height: 1.25;
}

.leading-normal {
    line-height: 1.5;
}

.leading-relaxed {
    line-height: 1.7;
}

.leading-loose {
    line-height: 2;
}