@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-main: #0a0a0a;
  --bg-secondary: #141414;
  --text-primary: #ffffff;
  --text-secondary: #a1a1a1;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-blur: 24px;
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

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

body {
  background: #050505;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}

/* Premium Mesh Background with Grain */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 10%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 90%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50%, rgba(5, 5, 5, 1) 0%, transparent 100%);
  z-index: -1;
  animation: meshMove 20s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://grainy-gradients.vercel.app/noise.svg');
  opacity: 0.15;
  pointer-events: none;
  z-index: 10000;
  filter: contrast(150%) brightness(1000%);
}

@keyframes meshMove {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.1);
  }
}

/* Typography Remix */
h1,
h2,
h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

h1 {
  font-size: clamp(3rem, 10vw, 8rem);
  /* Slightly reduced size */
  background: linear-gradient(180deg, #fff 30%, rgba(255, 255, 255, 0.2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

/* Bento Grid Optimization */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: 1.5rem;
  padding: 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.bento-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 32px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* Ensure content starts at top */
}

.bento-item:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.bento-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-item.tall {
  grid-row: span 2;
}

.bento-item.wide {
  grid-column: span 2;
}

/* Navigation Remix */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

main {
  padding-top: 100px;
  /* Essential fix for fixed nav overlap */
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.06em;
  background: linear-gradient(to right, #fff, #888);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

/* Hero Mascot Container */
.hero-mascot {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.spline-wrap {
  width: 100%;
  height: 70vh;
  z-index: 2;
}

.hero-title {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  opacity: 0.8;
  white-space: nowrap;
  text-align: center;
}

.hero-title p {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: -1rem;
}

/* Removing redundant Bento Enhancements that were merged above */


/* Button Stylings */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-smooth);
  border: 1px solid var(--card-border);
}

.btn.primary {
  background: white;
  color: black;
}

.btn.primary:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .bento-item.large,
  .bento-item.wide {
    grid-column: span 1;
  }

  h1 {
    font-size: 4rem;
  }
}

/* Lab Specific Styles */
.lab-card-overlay {
  position: absolute;
  top: 2rem;
  left: 2rem;
  z-index: 10;
  pointer-events: none;
  max-width: 300px;
}

.lab-toy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.lab-toy-btn {
  align-self: flex-start;
  padding: 0.8rem 1.5rem;
  font-size: 0.9rem;
  margin-top: auto;
}

.glow-target {
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(0, 122, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.05;
  pointer-events: none;
  z-index: 9998;
  display: none;
}

.noise-overlay.active {
  display: block;
}

/* Custom Cursor */
.custom-cursor {
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, transform 0.1s;
}

body:hover .custom-cursor {
  opacity: 1;
}

a:hover~.custom-cursor,
.bento-item:hover~.custom-cursor {
  width: 60px;
  height: 60px;
}

/* --- Website Transformation Styles --- */

/* Photography Section */
.photography-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.5rem;
  padding: 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.photo-item {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 16/10;
  cursor: pointer;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.photo-item:hover img {
  transform: scale(1.1);
}

.photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.photo-item:hover .photo-overlay {
  opacity: 1;
}

/* UI/UX Showcase */
.uiux-showcase {
  padding: 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.uiux-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 32px;
  overflow: hidden;
  margin-bottom: 3rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 500px;
}

.uiux-image {
  overflow: hidden;
}

.uiux-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.uiux-content {
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Social Hub */
.social-hub {
  padding: 8rem 4rem;
  text-align: center;
  border-top: 1px solid var(--card-border);
  background: radial-gradient(circle at bottom, rgba(59, 130, 246, 0.05), transparent);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 4rem;
}

.social-link {
  font-size: 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition-smooth);
  position: relative;
}

.social-link:hover {
  color: var(--text-primary);
  transform: translateY(-5px);
}

.social-link::after {
  content: "↗";
  font-size: 1rem;
  margin-left: 0.5rem;
  opacity: 0.5;
}

/* Close Person (The Tribe) */
.tribe-section {
  padding: 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.tribe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

@media (max-width: 1024px) {
  .uiux-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}

@media (max-width: 768px) {

  .photography-grid,
  .uiux-showcase,
  .social-hub {
    padding: 2rem;
  }
}

.section-header {
  padding: 8rem 4rem 4rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
  text-align: left;
}

.section-header p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-top: 1rem;
}

.social-link {
  padding: 1rem 2rem;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease !important;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-5px) scale(1.02) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
}