/* Typography System - Inter + JetBrains Mono */

/* ===== BASE TYPOGRAPHY ===== */
body {
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== HEADINGS ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
  margin: 0;
}

h1 {
  font-size: var(--font-size-4xl);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--font-size-3xl);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--font-size-xl);
  letter-spacing: -0.01em;
}

h4 {
  font-size: var(--font-size-lg);
}

h5 {
  font-size: var(--font-size-md);
}

h6 {
  font-size: var(--font-size-sm);
}

/* ===== RESPONSIVE HEADINGS ===== */
@media (max-width: 768px) {
  h1 {
    font-size: var(--font-size-3xl);
  }
  
  h2 {
    font-size: var(--font-size-2xl);
  }
  
  h3 {
    font-size: var(--font-size-lg);
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: var(--font-size-2xl);
  }
  
  h2 {
    font-size: var(--font-size-xl);
  }
}

/* ===== PARAGRAPHS ===== */
p {
  margin: 0;
  line-height: var(--line-height-relaxed);
}

.text-large {
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
}

.text-small {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
}

/* ===== TEXT COLORS ===== */
.text-primary {
  color: var(--color-text-primary);
}

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

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

.text-accent {
  color: var(--color-accent-primary);
}

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

/* ===== FONT WEIGHTS ===== */
.font-regular {
  font-weight: var(--font-weight-regular);
}

.font-semibold {
  font-weight: var(--font-weight-semibold);
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

/* ===== CODE & TECHNICAL TEXT ===== */
code,
pre,
.code {
  font-family: var(--font-code);
  font-size: 0.9em;
}

code {
  background: var(--color-bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--color-accent-primary);
}

pre {
  background: var(--color-bg-secondary);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  overflow-x: auto;
  line-height: var(--line-height-relaxed);
  max-width: 100%;
  box-sizing: border-box;
}

pre code {
  background: none;
  padding: 0;
  color: var(--color-text-primary);
}

/* ===== LINKS ===== */
a {
  color: var(--color-accent-primary);
  transition: color var(--transition-fast);
}

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

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

/* ===== LISTS ===== */
ul, ol {
  margin: 0;
  padding: 0;
}

/* ===== TEXT UTILITIES ===== */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.capitalize {
  text-transform: capitalize;
}

/* ===== TRUNCATION ===== */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== SELECTION ===== */
::selection {
  background-color: var(--color-accent-primary);
  color: var(--color-surface);
}

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