html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Figtree', sans-serif;
}

.font-mono, code {
  font-family: 'JetBrains Mono', monospace;
}

::selection {
  background: rgba(255, 190, 11, 0.25);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #FFF8E7; }
::-webkit-scrollbar-thumb { background: #D4D4D8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #FFBE0B; }

/* Subtle background pattern */
.bg-grid {
  background-image:
    linear-gradient(rgba(255, 190, 11, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 190, 11, .10) 1px, transparent 1px);
  background-size: 72px 72px;
}

.bg-grain {
  position: relative;
  isolation: isolate;
}

.bg-grain > * {
  position: relative;
  z-index: 2;
}

.bg-grain::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 512px 512px;
  background-repeat: repeat;
  pointer-events: none;
  z-index: 0;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes graphFloat {
  0%   { transform: translate(0px, 0px) rotate(12deg); }
  20%  { transform: translate(6px, -8px) rotate(13deg); }
  40%  { transform: translate(-5px, -3px) rotate(10deg); }
  60%  { transform: translate(8px, 6px) rotate(14deg); }
  80%  { transform: translate(-4px, 8px) rotate(11deg); }
  100% { transform: translate(0px, 0px) rotate(12deg); }
}

@keyframes nodeFloat {
  0%   { transform: translate(0px, 0px); }
  25%  { transform: translate(2px, -3px); }
  50%  { transform: translate(-3px, 2px); }
  75%  { transform: translate(3px, 1px); }
  100% { transform: translate(0px, 0px); }
}

.animate-fadeInUp { animation: fadeInUp 0.8s ease-out forwards; }
.animate-fadeIn { animation: fadeIn 0.8s ease-out forwards; }

.delay-200 { animation-delay: 200ms; opacity: 0; animation-fill-mode: forwards; }
.delay-400 { animation-delay: 400ms; opacity: 0; animation-fill-mode: forwards; }
.delay-600 { animation-delay: 600ms; opacity: 0; animation-fill-mode: forwards; }
.delay-800 { animation-delay: 800ms; opacity: 0; animation-fill-mode: forwards; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hover lift */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(255, 190, 11, 0.08);
  border-color: rgba(255, 190, 11, 0.3);
}

/* Decorative Background Elements */
.bg-decoration {
  position: absolute;
  color: rgba(255, 190, 11, .30);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  filter: blur(.3px);
  animation: graphFloat 14s ease-in-out infinite;
}

.bg-decoration svg { width: 100%; height: 100%; overflow: visible; }
.bg-decoration svg * { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bg-decoration line { stroke: currentColor; stroke-width: 2; stroke-linecap: round; opacity: .7; }

.rotate-12  { transform: rotate(12deg); }
.rotate-neg { transform: rotate(-18deg); }

/* Clip decorative elements within their parent sections */
section, footer {
  overflow: hidden;
}

/* Floating shapes */
.float-shape {
  position: absolute;
  border-radius: 9999px;
  opacity: .28;
  pointer-events: none;
  filter: blur(120px);
}
