/* ===== Reset & Base ===== */

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

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-85);
  background: var(--surface-1);
  min-height: 100vh;
  overflow-x: hidden;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Typography ---- */

h1, h2, h3, h4, h5, h6 {
  color: var(--text-95);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

/* Fluorescent marker heading effect */
.heading-mark {
  display: inline;
  background: linear-gradient(to top, var(--accent-15) 35%, transparent 35%);
  padding: 0 2px;
}

/* Gradient heading underline */
.heading-underline {
  position: relative;
  display: inline-block;
}
.heading-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 0.35em;
  background: var(--accent-15);
  border-radius: 2px;
  z-index: -1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover {
  color: var(--accent-90);
}

p { margin-bottom: 1em; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

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

pre {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  overflow-x: auto;
  line-height: 1.6;
}
pre code {
  background: none;
  color: var(--text-85);
  padding: 0;
}

blockquote {
  border-left: 3px solid var(--accent-30);
  padding-left: var(--space-lg);
  margin: var(--space-lg) 0;
  color: var(--text-55);
  font-style: italic;
  position: relative;
}

/* ---- Animations ---- */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes breathe {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(1.06); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Staggered card entry */
.stagger-1 { animation: fadeInUp 0.5s var(--ease-out) 0.05s both; }
.stagger-2 { animation: fadeInUp 0.5s var(--ease-out) 0.11s both; }
.stagger-3 { animation: fadeInUp 0.5s var(--ease-out) 0.17s both; }
.stagger-4 { animation: fadeInUp 0.5s var(--ease-out) 0.23s both; }
.stagger-5 { animation: fadeInUp 0.5s var(--ease-out) 0.29s both; }
.stagger-6 { animation: fadeInUp 0.5s var(--ease-out) 0.35s both; }
.stagger-7 { animation: fadeInUp 0.5s var(--ease-out) 0.41s both; }
.stagger-8 { animation: fadeInUp 0.5s var(--ease-out) 0.47s both; }
.stagger-9 { animation: fadeInUp 0.5s var(--ease-out) 0.53s both; }
.stagger-10 { animation: fadeInUp 0.5s var(--ease-out) 0.59s both; }
.stagger-11 { animation: fadeInUp 0.5s var(--ease-out) 0.65s both; }
.stagger-12 { animation: fadeInUp 0.5s var(--ease-out) 0.71s both; }

/* Page transition */
.page-enter {
  animation: fadeIn 0.25s var(--ease-out) both;
}

/* Floating orb decoration */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: breathe 4s var(--ease-in-out) infinite;
}
.orb-1 {
  width: 300px; height: 300px;
  background: var(--accent-15);
  top: -100px; right: -100px;
  animation-delay: 0s;
}
.orb-2 {
  width: 240px; height: 240px;
  background: var(--cat-docs);
  opacity: 0.08;
  bottom: -80px; left: -80px;
  animation-delay: -1.5s;
}
.orb-3 {
  width: 200px; height: 200px;
  background: var(--cat-deploy);
  opacity: 0.06;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -3s;
}

/* ---- Accessibility ---- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---- Scrollbar ---- */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--text-25);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-40);
}

/* ---- Selection ---- */

::selection {
  background: var(--accent-30);
  color: var(--text-95);
}

/* ---- Container ---- */

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
