/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }

/* ── Fonts ── */
body, body * { font-family: var(--font-body) !important; }

.fas, .far, .fab, .fal,
[class^="fa-"], [class*=" fa-"],
.fas::before, .far::before, .fab::before, .fal::before {
  font-family: "Font Awesome 5 Free" !important;
}
.fab, .fab::before { font-family: "Font Awesome 5 Brands" !important; }

h1, h2, h3, h4, h5, h6,
.section-heading, .modal-title,
.label, .tag, .hero-typewriter, .navlink, .btn-primary, .btn-outline,
.hero-badge-text, .badge-current, .exp-company,
.exp-modal-project-name, .proj-title, .contact-card-title,
.modal-rec-relation, .pub-badge, .rec-quote,
.exp-role-title, .exp-modal-role-card-title,
.modal-media-title, .modal-media-name, .rec-name, .rec-relation,
.agpt-name, .scroll-arrow {
  font-family: var(--font-heading) !important;
}

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

.carbon-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  fill: currentColor;
  flex-shrink: 0;
  vertical-align: middle;
}

.carbon-icon-btn { width: 1.125rem; height: 1.125rem; }
.carbon-icon-md { width: 1.25rem; height: 1.25rem; }
.carbon-icon-lg { width: 1.5rem; height: 1.5rem; }

/* ── Body ── */
body {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.65;
  font-weight: 400;
  transition: background-color 0.35s ease, color 0.35s ease;
  text-rendering: optimizeSpeed;
}
[data-theme="dark"] body {
  background: linear-gradient(145deg, #0d0f18 0%, #161616 40%, #111318 70%, #0e1020 100%);
  min-height: 100vh;
}
[data-theme="light"] body {
  background: linear-gradient(145deg, #dde6f8 0%, #e8edf8 35%, #edf0fc 65%, #e4ebf7 100%);
  min-height: 100vh;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* ── Noise overlay ── */
.noise-overlay {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: 0.12;
  transition: opacity 0.35s;
}
[data-theme="light"] .noise-overlay { opacity: 0; }

/* ── Background blobs ── */
.blob-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  pointer-events: none;
  transition: opacity 0.35s;
}
.blob:nth-child(1) { opacity: 0.18; background: #0f62fe; }
.blob:nth-child(2) { opacity: 0.12; background: #7c3aed; }
.blob:nth-child(3) { opacity: 0.12; background: #0ea5e9; }
[data-theme="light"] .blob:nth-child(1) { opacity: 0.22; background: #4589ff; }
[data-theme="light"] .blob:nth-child(2) { opacity: 0.14; background: #7c3aed; }
[data-theme="light"] .blob:nth-child(3) { opacity: 0.14; background: #0ea5e9; }

/* ── Animations ── */
@keyframes pulse-dot { 0%,100%{opacity:1;} 50%{opacity:0.35;} }
.pulse { animation: pulse-dot 2s infinite; }

@property --beam-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes border-beam { to { --beam-angle: 360deg; } }

@keyframes tw-blink { 0%,100%{opacity:1;} 50%{opacity:0;} }

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

@media (max-width: 900px) {
  .noise-overlay { display: none; }
  .blob { filter: blur(54px); }
}
