/* ========================================================
   Daniel Leite Portfolio - Senior UI/UX & Design Engineering
   Zero-Jank 120FPS GPU-Optimized Design System
   ======================================================== */

:root {
  --bg-dark: #030712;
  --bg-surface: #0b0f19;
  --card-dark: #0f172a;
  --card-surface: #1e293b;
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(14, 165, 233, 0.5);
  
  --brand-primary: #0ea5e9;
  --brand-cyan: #38bdf8;
  --brand-emerald: #10b981;
  --brand-indigo: #6366f1;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
}

/* Base Body Styling - NO background-attachment: fixed (Destroys scroll FPS) */
body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dedicated Fixed Background Layer (Painted once to GPU texture) */
.fixed-bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  transform: translateZ(0);
  background: 
    radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.04) 0%, transparent 45%),
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 28px 28px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-primary);
}

/* Selection */
::selection {
  background: rgba(14, 165, 233, 0.35);
  color: #ffffff;
}

/* Lenis Smooth Scroll Setup */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

/* Hardware Acceleration Helpers */
.gpu-accel {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* ========================================================
   Interactive Follower Cursor
   ======================================================== */
#cursor-dot {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background-color: var(--brand-cyan);
  border-radius: 50%;
  z-index: 9999;
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 0.2s ease;
}

#cursor-ring {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  background: rgba(14, 165, 233, 0.02);
  border-radius: 50%;
  z-index: 9998;
  transform: translate3d(-50%, -50%, 0);
  transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

/* Cursor Hover States */
body.hovering-interactive #cursor-ring {
  width: 50px;
  height: 50px;
  border-color: rgba(56, 189, 248, 0.8);
  background-color: rgba(14, 165, 233, 0.08);
}

body.hovering-interactive #cursor-dot {
  opacity: 0.3;
}

body.hovering-case #cursor-ring {
  width: 80px;
  height: 80px;
  border-color: rgba(56, 189, 248, 0.9);
  background-color: rgba(14, 165, 233, 0.12);
}

/* ========================================================
   Edge Glow Buttons & Interactive Badges
   ======================================================== */
.edge-glow-btn {
  --x: 50%;
  --y: 50%;
  position: relative;
  border-radius: 9999px;
  padding: 1.5px;
  background: radial-gradient(120px circle at var(--x) var(--y), rgba(14, 165, 233, 0.9), rgba(56, 189, 248, 0.5), rgba(255, 255, 255, 0.08) 80%);
  transition: transform 0.2s ease;
  isolation: isolate;
  display: inline-flex;
  text-decoration: none;
  cursor: pointer;
}

.edge-glow-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: radial-gradient(130px circle at var(--x) var(--y), rgba(14, 165, 233, 0.4), rgba(56, 189, 248, 0.2), transparent 75%);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: -1;
  pointer-events: none;
}

.edge-glow-btn:hover::before {
  opacity: 1;
}

.edge-glow-inner {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: rgba(11, 15, 25, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.75rem;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9375rem;
  gap: 0.6rem;
  transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease;
}

.edge-glow-btn:hover .edge-glow-inner {
  background: rgba(15, 23, 42, 0.94);
  color: #38bdf8;
}

.edge-glow-btn:active .edge-glow-inner {
  transform: scale(0.97);
}

/* Compact Button */
.edge-glow-btn-sm {
  --x: 50%;
  --y: 50%;
  position: relative;
  border-radius: 9999px;
  padding: 1.5px;
  background: radial-gradient(90px circle at var(--x) var(--y), rgba(14, 165, 233, 0.8), rgba(56, 189, 248, 0.4), rgba(255, 255, 255, 0.08) 80%);
  isolation: isolate;
  display: inline-flex;
  text-decoration: none;
  cursor: pointer;
}

.edge-glow-btn-sm .edge-glow-inner {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  background: rgba(11, 15, 25, 0.96);
}

/* ========================================================
   Glow Card Border & Project Cards
   ======================================================== */
.glow-card-border {
  --x: 50%;
  --y: 50%;
  position: relative;
  border-radius: 1.75rem;
  padding: 1px;
  background: radial-gradient(220px circle at var(--x) var(--y), rgba(14, 165, 233, 0.35), rgba(56, 189, 248, 0.15), rgba(255, 255, 255, 0.05) 70%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.glow-card-border:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6), 0 0 25px -10px rgba(14, 165, 233, 0.15);
}

.project-card .image-wrapper {
  overflow: hidden;
  border-radius: 1.25rem;
  position: relative;
}

.project-card .image-wrapper img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.project-card:hover .image-wrapper img {
  transform: scale(1.03);
}

/* Project Filter Tabs */
.filter-tab {
  transition: all 0.2s ease;
}

.filter-tab.active {
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  box-shadow: 0 0 12px -2px rgba(14, 165, 233, 0.25);
}

/* Impact Metric Chips */
.metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  font-family: var(--font-heading, "Space Grotesk", sans-serif);
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
}

/* Hero Title Styling */
.hero-title {
  font-size: clamp(2rem, 5.5vw, 4.75rem);
  line-height: 1.1;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  max-width: 100%;
}

.hero-line-1 {
  color: #ffffff;
  display: block;
  font-size: inherit;
  text-align: center;
}

.hero-line-2 {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 50%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  font-size: inherit;
  text-align: center;
}

/* Timeline Horizontal Scroll */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Modal Transitions */
#case-modal {
  transition: opacity 0.25s ease;
}
#case-modal.active {
  display: flex !important;
  opacity: 1 !important;
}

/* Responsive Overrides */
@media (max-width: 767px) {
  #hero {
    min-height: auto !important;
    padding-top: 6.5rem !important;
    padding-bottom: 3rem !important;
  }
  
  .hero-title {
    font-size: clamp(1.75rem, 7vw, 2.75rem);
  }
}
