html {
  scroll-behavior: smooth;
  background-color: #fcfcfc;
}

body, button, input, select, textarea {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #fcfcfc;
  color: #000000;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.025em;
}

.font-outfit {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Smooth Scrolling via Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* Scrollbar Hiding */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* Cinematic On-Load Animations */
@keyframes blurFadeIn {
  0% { opacity: 0; filter: blur(12px); transform: translateY(30px) scale(0.98); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}

.anim-element {
  opacity: 0; 
  animation: blurFadeIn 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity, filter;
}

/* Dramatic floating slide-up animation */
@keyframes floatUpFade {
  0% {
    opacity: 0;
    transform: translateY(80px);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.float-up-hero {
  opacity: 0;
  animation: floatUpFade 2.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity, filter;
}

/* Scroll Animation Fade-In for Section Headers & Blocks */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(8px);
  transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity, filter;
}

.reveal-on-scroll.active {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Staggered Animation Delays */
.d-1 { animation-delay: 0.1s; }
.d-2 { animation-delay: 0.2s; }
.d-3 { animation-delay: 0.3s; }
.d-4 { animation-delay: 0.4s; }
.d-5 { animation-delay: 0.5s; }
.d-6 { animation-delay: 0.6s; }
.d-7 { animation-delay: 0.7s; }



/* Scroll progress bar */
#scroll-progress {
  transition: width 0.1s ease-out;
}

/* Custom interactive ring / outline adjustments */
a:focus-visible, button:focus-visible {
  outline: 2px solid black;
  outline-offset: 4px;
}

/* Cards - premium floating styling with hover lift & shadow effects */
#projects-container .hover-offset-card,
#projects-container > div {
  min-height: 220px;
  border-radius: 4px;
}

/* Keep unusually long repository content contained without forcing wider or taller cards. */
.project-card-title,
.project-card-description,
.project-card-link {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.project-card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.project-card-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

.hover-offset-card {
  position: relative;
  z-index: 1;
  background-color: #ffffff;
  border-radius: 4px;
  
  /* Natural floating base state: a bold neo-brutalist shadow offset 
     plus a modern soft ambient shadow to give a premium floating depth */
  box-shadow: 4px 4px 0px 0px #000000, 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  
  /* Smooth transitions for all properties to make the animation feel organic */
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), 
              box-shadow 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), 
              border-color 0.3s ease;
              
  will-change: transform, box-shadow;
}

.hover-offset-card:hover {
  border-color: #000000 !important;
  
  /* Float up and scale up slightly */
  transform: translateY(-12px) scale(1.02);
  
  /* Shadow moves further away and grows softer to represent the height increase */
  box-shadow: 16px 16px 0px 0px #000000, 0 25px 50px -12px rgba(0, 0, 0, 0.16);
}

/* Dynamic Card Fade-In Animation */
@keyframes cardEnter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in-card {
  opacity: 0;
  animation: cardEnter 0.6s ease-in-out forwards;
}

/* Buttons - 3D tactile styling (white by default, inverts on hover, lifts and depresses on click) */
.hover-offset-button {
  background-color: #ffffff !important;
  color: #000000 !important;
  border-radius: 8px;
  box-shadow: 3px 3px 0px 0px #000000;
  transform: translate(0, 0);
  transition: background-color 0.2s ease, 
              color 0.2s ease, 
              border-color 0.2s ease, 
              transform 0.15s cubic-bezier(0.25, 0.8, 0.25, 1), 
              box-shadow 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform, box-shadow;
}

.hover-offset-button:hover,
.btn-wrapper:hover .hover-offset-button {
  background-color: #000000 !important;
  color: #ffffff !important;
  border-color: #000000 !important;
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0px 0px #000000;
}

.hover-offset-button:active,
.btn-wrapper:active .hover-offset-button {
  background-color: #333333 !important;
  color: #ffffff !important;
  transform: translate(3px, 3px);
  box-shadow: 0px 0px 0px 0px #000000;
}

/* Header button shadow override to prevent bleeding and keep navbar flat & clean */
header .hover-offset-button {
  box-shadow: none !important;
  transform: none !important;
}

header .hover-offset-button:hover,
header .btn-wrapper:hover .hover-offset-button {
  box-shadow: none !important;
  transform: none !important;
}

header .hover-offset-button:active,
header .btn-wrapper:active .hover-offset-button {
  box-shadow: none !important;
  transform: none !important;
}
