/* Font + Sizing Setup */
:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji', 'Noto Color Emoji';

  --transition-fast: 0.2s ease;
  --transition-slow: 0.4s ease;
}

html {
  font-family: var(--font-sans);
  font-size: clamp(15px, 1.1vw, 17px);
  scroll-behavior: smooth;
}

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

/* Background Grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: -1;
  pointer-events: none;
}

body {
  margin: 0;
  padding: 0;
  background: #0d0d0d;
  color: #f0f0f0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4 {
  line-height: 1.25;
  margin-bottom: 0.5em;
  font-weight: 600;
  color: #fff;
}

h1 {
  text-align: center;
  margin: 3rem 0 2rem;
  font-size: 2.75rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

/* Layout */
main {
  padding: 2rem 1rem;
  max-width: 1280px;
  margin: 0 auto;
}

/* Links */
a {
  color: #3b82f6;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  text-decoration: underline;
  color: #60a5fa;
}

/* Buttons */
button {
  all: unset;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: #222;
  color: white;
  transition: background var(--transition-fast);
  font-weight: 500;
}

button:hover {
  background: #3b82f6;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}

/* Utility transitions */
a, button, .card, .tag, .logo {
  transition: all var(--transition-fast);
}

#particles-js {
  position: fixed;
  z-index: -1;
  width: 100%;
  height: 100vh;
  top: 0;
  left: 0;
  background: radial-gradient(#0d0d0d, #000);
}

@keyframes wiggle {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
}

html {
  scroll-behavior: smooth;
}
