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

html {
  scroll-behavior: smooth;
  font-size: clamp(14px, 1.5vw, 16px);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: var(--theme-transition);
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Enhanced Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.5em;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
}

h4 {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 500;
}

p {
  font-size: clamp(0.9rem, 2vw, 1.125rem);
  line-height: 1.7;
  color: var(--text-dark);
  margin-bottom: 1em;
  max-width: 65ch;
}

/* Improved reading experience */
.large-text {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  line-height: 1.6;
}

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

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Selection styles */
::selection {
  background: rgba(var(--primary-rgb), 0.3);
  color: var(--text);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 120px 0;
  position: relative;
}
