/* ============================================
   Base Styles — resets, typography, layout
   ============================================ */

/* --- Box-sizing reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: 1.5;
  color: var(--color-gray-900);
  background-color: var(--color-gray-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  color: var(--color-gray-900);
}

p {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration: none;
}

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

/* --- Lists reset --- */
ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-content {
  flex: 1;
  padding-bottom: var(--space-3xl);
}

/* --- Container override (max-width) --- */
.container {
  max-width: var(--container-max);
}

/* --- Utility: text truncation --- */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* --- Scrollbar styling (thin) --- */
.scroll-row::-webkit-scrollbar {
  height: 4px;
}

.scroll-row::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-row::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: 2px;
}

.scroll-row {
  scrollbar-width: thin;
  scrollbar-color: var(--color-gray-300) transparent;
}
