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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text-bright);
  letter-spacing: -1px;
}

h1 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1rem, 1.5vw, 1.25rem); letter-spacing: -0.5px; }
h4 { font-size: 0.9rem; letter-spacing: -0.5px; }

p { margin-bottom: 1rem; }

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

a:hover {
  color: var(--color-text-bright);
}

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

ul, ol { list-style: none; }

::selection {
  background: rgba(23, 188, 208, 0.2);
  color: var(--color-text-bright);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 48px;
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* Section */
.section {
  padding: var(--section-pad) 0;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

/* Section tag — code comment style */
.section-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
}

.section-tag::before {
  content: '// ';
  opacity: 0.5;
}

/* Text utilities */
.text-primary { color: var(--color-primary); }
.text-cyan { color: var(--color-cyan); }
.text-amber { color: var(--color-amber); }
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }

.subtitle {
  font-size: 16px;
  color: var(--color-text);
  line-height: 1.8;
  max-width: 600px;
}

.subtitle--center {
  margin-left: auto;
  margin-right: auto;
}

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > *:nth-child(1) { transition-delay: 0.1s; }
.stagger > *:nth-child(2) { transition-delay: 0.2s; }
.stagger > *:nth-child(3) { transition-delay: 0.3s; }
.stagger > *:nth-child(4) { transition-delay: 0.4s; }
.stagger > *:nth-child(5) { transition-delay: 0.5s; }
.stagger > *:nth-child(6) { transition-delay: 0.6s; }

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .section { padding: 60px 0; }
}
