/* ============================================
   NOVA Base Styles
   Reset, typography, utilities
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Montserrat:wght@400;500;600;700;800&display=swap');

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--nova-font-primary);
  font-size: var(--nova-text-base);
  font-weight: var(--nova-weight-normal);
  line-height: var(--nova-leading-normal);
  color: var(--nova-text-secondary);
  background: var(--nova-bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--nova-text-primary);
  font-weight: var(--nova-weight-semibold);
  line-height: var(--nova-leading-tight);
}

h1 { font-size: var(--nova-text-3xl); }
h2 { font-size: var(--nova-text-2xl); }
h3 { font-size: var(--nova-text-xl); }
h4 { font-size: var(--nova-text-lg); }

a { color: var(--nova-text-link); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button { cursor: pointer; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.25);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.4); }

::selection {
  background: rgba(99, 102, 241, 0.35);
  color: var(--nova-text-primary);
}

/* ── Utility Classes ── */
.nova-gradient-text {
  background: var(--nova-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nova-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nova-flex { display: flex; }
.nova-flex-col { display: flex; flex-direction: column; }
.nova-flex-center { display: flex; align-items: center; justify-content: center; }
.nova-flex-between { display: flex; align-items: center; justify-content: space-between; }
.nova-gap-1 { gap: var(--nova-space-1); }
.nova-gap-2 { gap: var(--nova-space-2); }
.nova-gap-3 { gap: var(--nova-space-3); }
.nova-gap-4 { gap: var(--nova-space-4); }
.nova-gap-6 { gap: var(--nova-space-6); }
.nova-gap-8 { gap: var(--nova-space-8); }

.nova-text-center { text-align: center; }
.nova-text-right { text-align: right; }
.nova-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nova-font-mono { font-family: var(--nova-font-mono); }
.nova-font-display { font-family: var(--nova-font-display); }

.nova-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.nova-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.nova-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); }

.nova-w-full { width: 100%; }
.nova-h-full { height: 100%; }

/* ── Mark highlight for search ── */
mark {
  background: rgba(99, 102, 241, 0.25);
  color: var(--nova-text-primary);
  padding: 1px 3px;
  border-radius: 3px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .nova-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .nova-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nova-grid-4,
  .nova-grid-3,
  .nova-grid-2 { grid-template-columns: 1fr; }
}
