/* ==========================================================================
   BASE STYLES - DANIEL WOŹNIAK SHARED SYSTEM
   ========================================================================== */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--primary-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Enhanced Typography System */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--text-primary-light);
    letter-spacing: -0.02em;
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
    text-rendering: optimizeLegibility;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

h2 {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 1rem;
}

p {
    margin-bottom: var(--space-md);
    color: var(--text-muted);
    font-size: clamp(0.9rem, 2.2vw, 1rem);
    line-height: 1.7;
    font-feature-settings: 'kern' 1;
    hyphens: auto;
    word-break: break-word;
}

/* Enhanced readability */
.large-text {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.6;
    font-weight: var(--font-weight-medium);
}

.small-text {
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    line-height: 1.5;
    opacity: 0.8;
}

/* Text emphasis styles */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-orange));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: var(--font-weight-bold);
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition-normal);
}

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

/* Focus states for accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Smooth transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Selection styles */
::selection {
    background: var(--accent-blue);
    color: var(--white);
}

::-moz-selection {
    background: var(--accent-blue);
    color: var(--white);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-medium);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue-light);
}

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

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}