/* ==========================================================================
   MEHMET MERT PORTFOLIO — CORPORATE DESIGN SYSTEM & STICKY SPLIT-SCREEN
   Palette:
     - Primary Accent: #2563EB (Royal Sapphire Blue)
     - Accent Hover:   #1D4ED8 (Deep Cobalt Blue)
     - Dark Foundation: #303030 (Refined Charcoal / Anthracite)
     - Warm Background: #FFFDF5 (Warm Editorial Cream)
     - Crisp Light:      #FCFCFC (Clean Crisp Off-White)
   Font: Gilroy
   ========================================================================== */

@import url('https://fonts.cdnfonts.com/css/gilroy-bold');

:root {
  --color-brand-blue: #2563EB;
  --color-brand-blue-hover: #1D4ED8;
  --color-brand-charcoal: #303030;
  --color-brand-cream: #FFFDF5;
  --color-brand-white: #FCFCFC;
  --font-gilroy: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  font-family: var(--font-gilroy);
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

/* Scroll Progress Bar at the Top (Royal Sapphire Blue to Cyan) */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  background: linear-gradient(90deg, #2563EB, #38BDF8, #2563EB);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.75);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: #FFFDF5;
}
.dark ::-webkit-scrollbar-track {
  background: #1C1C1C;
}
::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.4);
  border-radius: 9999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: #2563EB;
}

/* Fluid Scroll Reveal Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Dynamic Floating Ambient Background Glows */
@keyframes floatOrb1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -35px) scale(1.12); }
}

@keyframes floatOrb2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-45px, 45px) scale(0.92); }
}

.floating-orb-1 {
  animation: floatOrb1 16s ease-in-out infinite;
}

.floating-orb-2 {
  animation: floatOrb2 20s ease-in-out infinite;
}

/* Interactive Spotlight Card Effect with Royal Blue (#2563EB) */
.spotlight-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: radial-gradient(
    550px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(37, 99, 235, 0.45),
    transparent 40%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card:hover {
  transform: translateY(-5px);
}

/* Active filter state */
.active-filter {
  background: #303030 !important;
  color: #FFFDF5 !important;
  border-color: transparent !important;
  box-shadow: 0 4px 16px -2px rgba(48, 48, 48, 0.25);
}

.dark .active-filter {
  background: #2563EB !important;
  color: #FFFFFF !important;
  border-color: transparent !important;
  box-shadow: 0 4px 22px -2px rgba(37, 99, 235, 0.45);
}

/* Sticky Split-Screen Cinema Styles — Modern Floating Glass Card */
.sticky-cinema-screen {
  position: sticky;
  top: 6.5rem;
  height: calc(85vh - 4rem);
  min-height: 520px;
  max-height: 640px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cinema-media-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 2rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.32);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  transform: translateZ(0);
}

.dark .cinema-media-frame {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.55);
}

.cinema-media-frame:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 60px rgba(0, 0, 0, 0.42);
}

.dark .cinema-media-frame:hover {
  box-shadow: 0 35px 65px rgba(0, 0, 0, 0.65);
}

.split-step-item {
  transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
  opacity: 0.4;
  transform: scale(0.97);
}

.split-step-item.active-step {
  opacity: 1;
  transform: scale(1);
}

/* Subtle Glows */
.glow-blue {
  box-shadow: 0 0 40px -5px rgba(37, 99, 235, 0.4);
}

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

/* ==========================================================================
   INTERACTIVE TYPOGRAPHIC DIRECTORY & HOVER ACCORDION DRAWER
   ========================================================================== */
.project-list-row {
  transition: background-color 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.project-list-row:hover,
.project-list-row.is-expanded {
  background-color: rgba(37, 99, 235, 0.04);
}

.dark .project-list-row:hover,
.dark .project-list-row.is-expanded {
  background-color: rgba(37, 99, 235, 0.08);
}

.project-list-row .row-arrow-btn {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-list-row.is-expanded .row-arrow-btn {
  transform: rotate(90deg) scale(1.08);
  background-color: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.project-list-row .row-title {
  transition: color 0.2s ease;
}

.project-list-row:hover .row-title,
.project-list-row.is-expanded .row-title {
  color: #2563EB;
}

/* Hover Accordion Drawer Container */
.project-accordion-drawer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.42s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.32s ease;
}

.project-list-row.is-expanded .project-accordion-drawer {
  max-height: 1200px;
  opacity: 1;
}

/* ==========================================================================
   MODERN MINIMAL NATIVE HARDWARE CURSOR (ZERO LATENCY, GPU-ACCELERATED)
   ========================================================================== */
html, body {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='4' fill='%232563EB'/%3E%3Ccircle cx='12' cy='12' r='7.5' stroke='%232563EB' stroke-width='1.5' stroke-opacity='0.45'/%3E%3C/svg%3E") 12 12, auto;
}

a, button, input, select, textarea, .cursor-pointer, .project-list-row, .filter-btn, .magnetic-btn, [role="button"] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26' fill='none'%3E%3Ccircle cx='13' cy='13' r='5' fill='%232563EB'/%3E%3Ccircle cx='13' cy='13' r='10.5' stroke='%232563EB' stroke-width='1.8' stroke-opacity='0.65'/%3E%3C/svg%3E") 13 13, pointer;
}

/* ==========================================================================
   PACKAGE A: HIGH-END AGENCY INTERACTIVE EFFECTS
   ========================================================================== */

/* 1. INFINITE LOGO & CAPABILITIES MARQUEE (TICKER) */
@keyframes marqueeLeft {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes marqueeRight {
  0% { transform: translate3d(-50%, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

.animate-marquee-left {
  display: flex;
  width: max-content;
  animation: marqueeLeft 34s linear infinite;
  will-change: transform;
}

.animate-marquee-right {
  display: flex;
  width: max-content;
  animation: marqueeRight 30s linear infinite;
  will-change: transform;
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.15rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: all 0.25s ease;
  user-select: none;
}

.marquee-item:hover {
  transform: translateY(-2px);
  border-color: #2563EB;
  color: #2563EB;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.18);
}

/* 2. 3D PARALLAX TILT EFFECT ON CARDS */
.tilt-card {
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

/* 3. MAGNETIC BUTTONS */
.magnetic-btn {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  display: inline-flex;
}

/* ==========================================================================
   4. MAGICAL CINEMATIC AMBIENT LIGHT BEAM SYSTEM
   Continuous, cohesive ambient glow gliding across the entire site on scroll
   ========================================================================== */
#ambient-light-viewport {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  contain: strict;
}

.ambient-beam {
  position: absolute;
  top: -15vh;
  left: -15vw;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

/* Primary Cinematic Beam (Electric Blue & Cyan Core) */
#ambient-beam-primary {
  width: min(850px, 85vw);
  height: min(680px, 75vh);
  background: radial-gradient(circle at 45% 45%, rgba(37, 99, 235, 0.38) 0%, rgba(56, 189, 248, 0.22) 35%, rgba(37, 99, 235, 0.08) 65%, transparent 80%);
  filter: blur(130px);
  opacity: 0.85;
  animation: beamBreathe 18s ease-in-out infinite alternate;
}

/* Secondary Ambient Halo (Deep Cobalt & Violet Accent) */
#ambient-beam-secondary {
  width: min(720px, 75vw);
  height: min(580px, 65vh);
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.28) 0%, rgba(37, 99, 235, 0.15) 45%, transparent 75%);
  filter: blur(150px);
  opacity: 0.65;
  animation: beamBreathe 24s ease-in-out infinite alternate-reverse;
}

/* Light Theme Adaptations (Airy crystal sky glow) */
html:not(.dark) #ambient-beam-primary {
  background: radial-gradient(circle at 45% 45%, rgba(59, 130, 246, 0.22) 0%, rgba(96, 165, 250, 0.12) 40%, transparent 75%);
  filter: blur(140px);
  opacity: 0.55;
}

html:not(.dark) #ambient-beam-secondary {
  background: radial-gradient(circle at 50% 50%, rgba(147, 197, 253, 0.16) 0%, rgba(219, 234, 254, 0.08) 50%, transparent 75%);
  filter: blur(160px);
  opacity: 0.45;
}

/* Subtle Organic Breathing Pulse */
@keyframes beamBreathe {
  0% {
    filter: blur(130px) brightness(1);
  }
  50% {
    filter: blur(150px) brightness(1.15);
  }
  100% {
    filter: blur(125px) brightness(0.95);
  }
}
