* {
  box-sizing: border-box;
}

:root {
  --ink: #171717;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  overflow-x: hidden;
  background-image:
    radial-gradient(1000px 500px at -5% -10%, rgba(244, 162, 97, 0.28), transparent 60%),
    radial-gradient(800px 420px at 120% 8%, rgba(249, 199, 79, 0.2), transparent 60%),
    radial-gradient(700px 400px at 20% 120%, rgba(106, 153, 78, 0.15), transparent 60%);
}

.font-title {
  font-family: 'Bungee', cursive;
}

.noise-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.08;
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(0, 0, 0, 0.45) 0 1px, transparent 1px 4px),
    repeating-radial-gradient(circle at 100% 100%, rgba(0, 0, 0, 0.25) 0 1px, transparent 1px 3px);
}

.pill-link {
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  background: #fff;
  transition: transform 180ms ease, background-color 180ms ease;
}

.pill-link:hover {
  transform: translateY(-2px) rotate(-1deg);
  background: #fef3c7;
}

.tilt-card {
  transform: rotate(-0.7deg);
}

.tilt-card-alt {
  transform: rotate(0.9deg);
}

.flowbite-btn {
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 0.68rem 1.1rem;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 180ms ease;
}

.flowbite-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.7rem;
  border: 2px solid #fff;
  border-radius: 999px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.09);
}

.marquee {
  overflow: hidden;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 20s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.marquee-track span {
  flex-shrink: 0;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.project-card {
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 1.4rem;
  overflow: hidden;
  box-shadow: 0 8px 0 #171717;
  transform: rotate(-0.55deg);
}

.project-card:hover {
  transform: translateY(-4px) rotate(0deg);
}

.project-image {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-bottom: 4px solid var(--ink);
}

.project-link {
  display: inline-block;
  margin-top: 0.8rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.project-link:hover {
  background: #fef3c7;
}

.social-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 0.75rem;
  color: inherit;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease;
}

.social-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.85);
}

.hidden-panel {
  display: none !important;
}

.gallery-card {
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 1.1rem;
  overflow: hidden;
  box-shadow: 0 7px 0 #171717;
}

.gallery-masonry {
  columns: 1;
  column-gap: 1.25rem;
}

@media (min-width: 768px) {
  .gallery-masonry { columns: 2; }
}

@media (min-width: 1024px) {
  .gallery-masonry { columns: 3; }
}

.gallery-masonry .gallery-card {
  break-inside: avoid;
  margin-bottom: 1.25rem;
}

.gallery-img {
  width: 100%;
  display: block;
}

.gallery-caption {
  display: block;
  text-align: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.gallery-caption a {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .tilt-card,
  .tilt-card-alt,
  .project-card {
    transform: none;
  }

  .marquee-track {
    animation-duration: 14s;
  }
}
