/* ==========================================================================
   DESPIECES LLOPIS - BASE STYLES & LAYOUT
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-darkest);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: 
    linear-gradient(to right, var(--grid-line-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line-color) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center top;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 600;
}

p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

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

ul, ol {
  list-style: none;
}

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

/* Mono Code / Tech Text */
.font-mono {
  font-family: var(--font-mono);
}

/* Gradients & Text Accents */
.text-gradient-amber {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ea580c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 50%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-silver {
  background: linear-gradient(180deg, #ffffff 20%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-highlight {
  color: var(--color-primary);
  font-weight: 600;
}

/* Section Header Structure */
.section {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-2xl) auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.section-tag.cyan {
  color: var(--color-secondary-light);
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.25);
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
}

/* Ambient Glow Orbs */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}

.ambient-glow.amber {
  background: radial-gradient(circle, #f59e0b 0%, rgba(245, 158, 11, 0) 70%);
}

.ambient-glow.blue {
  background: radial-gradient(circle, #0284c7 0%, rgba(2, 132, 199, 0) 70%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darkest);
}

::-webkit-scrollbar-thumb {
  background: #253347;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #334460;
}
