/* ============================================================
   LUKA SAVIĆ — Video Editor Portfolio
   Design: OLED black + electric lime, motion-driven
   ============================================================ */

:root {
  --ink: #0A0A0A;
  --ink-2: #0E0E0E;
  --surface: #141414;
  --surface-2: #1A1A1A;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --lime: #C6F806;
  --lime-dim: #A6D400;
  --text: #F5F5F3;
  --muted: #8C8C8C;
  --muted-2: #6A6A6A;
}

* { -webkit-font-smoothing: antialiased; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  overflow-x: hidden;
}

::selection { background: var(--lime); color: #000; }

.font-display { font-family: 'Archivo', system-ui, sans-serif; }

/* ---------- Grain / noise overlay ---------- */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Glass card ---------- */
.glass {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.glass-strong {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ---------- Lime glow ---------- */
.glow-lime { box-shadow: 0 0 40px -10px rgba(198, 248, 6, 0.5); }
.text-glow { text-shadow: 0 0 24px rgba(198, 248, 6, 0.45); }

/* ---------- Display headings ---------- */
.display-xl {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.03em;
  font-size: clamp(3.2rem, 13vw, 12rem);
  text-transform: uppercase;
}
.display-lg {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  text-transform: uppercase;
}
.outline-text {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255,255,255,0.35);
}

/* ---------- Buttons ---------- */
.btn-lime {
  background: var(--lime);
  color: #0A0A0A;
  font-weight: 600;
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s, background .25s;
}
.btn-lime:hover { box-shadow: 0 0 36px -6px rgba(198,248,6,.6); transform: translateY(-2px); }
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
  transition: border-color .25s, background .25s, transform .25s;
}
.btn-ghost:hover { border-color: var(--lime); background: rgba(198,248,6,.06); transform: translateY(-2px); }

/* ---------- Rainbow border button (ported from rainbow-borders-button.tsx) ---------- */
.rainbow-border { position: relative; background: #000; color: #fff; font-weight: 900; border: none; cursor: pointer; transition: all .2s; }
.rainbow-border::before,
.rainbow-border::after {
  content: ''; position: absolute; left: -2px; top: -2px; border-radius: 12px;
  background: linear-gradient(45deg, #fb0094, #0000ff, #00ff00, #ffff00, #ff0000, #fb0094, #0000ff, #00ff00, #ffff00, #ff0000);
  background-size: 400%;
  width: calc(100% + 4px); height: calc(100% + 4px);
  z-index: -1; animation: rainbow 20s linear infinite;
}
.rainbow-border::after { filter: blur(28px); }
.rainbow-border:hover { transform: translateY(-2px); }
@keyframes rainbow { 0% { background-position: 0 0; } 50% { background-position: 400% 0; } 100% { background-position: 0 0; } }

/* ---------- Octagon integration/platform tiles (ported from integrations-section.tsx) ---------- */
.octagon-tile {
  width: 60px; height: 60px;
  clip-path: polygon(25% 0%, 75% 0%, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0% 75%, 0% 25%);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex; align-items: center; justify-content: center;
  transition: background .25s, border-color .25s, transform .25s;
}
.octagon-tile:hover { border-color: var(--lime); background: rgba(198, 248, 6, 0.08); transform: scale(1.06); }
.octagon-tile img { width: 55%; height: 55%; object-fit: contain; }

/* ---------- Animated shiny text (ported from animated-shiny-text.tsx) ---------- */
.shiny-text {
  background: linear-gradient(90deg, var(--lime), #ffffff, var(--lime), #ffffff, var(--lime));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shiny 4s linear infinite;
}
@keyframes shiny { 0% { background-position: 0 0; } 100% { background-position: 200% 0; } }

/* ---------- Nav ---------- */
#nav { transition: background .35s, border-color .35s, padding .35s; }
#nav.scrolled .nav-inner { background: rgba(10,10,10,.7); border-color: var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.nav-link { position: relative; color: var(--muted); transition: color .25s; }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--lime); border-radius: 2px;
}

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; border-radius: 50%; mix-blend-mode: difference; }
.cursor-dot { width: 6px; height: 6px; background: #fff; transform: translate(-50%, -50%); }
.cursor-ring { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.6); transform: translate(-50%, -50%); transition: width .25s, height .25s, background .25s, border-color .25s; }
.cursor-ring.hovering { width: 60px; height: 60px; background: rgba(198,248,6,.15); border-color: var(--lime); }
@media (max-width: 1024px) { .cursor-dot, .cursor-ring { display: none; } }

/* ---------- Marquee ---------- */
.marquee { display: flex; overflow: hidden; user-select: none; gap: 0; }
.marquee__track { display: flex; flex-shrink: 0; gap: 3rem; padding-right: 3rem; animation: scroll-x 22s linear infinite; }
@keyframes scroll-x { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ---------- Animated gradient background (ported from BackgroundGradientAnimation) ---------- */
.gradient-bg { background: linear-gradient(40deg, #060a04, #0a0a0a); overflow: hidden; }
.gradients-container { position: absolute; inset: 0; filter: url(#goo) blur(45px); }
.gradient-bg .g {
  position: absolute; width: 80%; height: 80%; top: 10%; left: 10%;
  mix-blend-mode: screen; will-change: transform;
}
.gradient-bg .g1 { background: radial-gradient(circle at center, rgba(198,248,6,0.95) 0, rgba(198,248,6,0) 58%) no-repeat; transform-origin: center center; animation: moveVertical 30s ease infinite; opacity: 1; }
.gradient-bg .g2 { background: radial-gradient(circle at center, rgba(70,215,135,0.9) 0, rgba(70,215,135,0) 58%) no-repeat; transform-origin: calc(50% - 300px); animation: moveInCircle 20s reverse infinite; opacity: 1; }
.gradient-bg .g3 { background: radial-gradient(circle at center, rgba(110,235,205,0.85) 0, rgba(110,235,205,0) 58%) no-repeat; transform-origin: calc(50% + 300px); animation: moveInCircle 40s linear infinite; opacity: 1; }
.gradient-bg .g4 { background: radial-gradient(circle at center, rgba(175,235,45,0.85) 0, rgba(175,235,45,0) 58%) no-repeat; transform-origin: calc(50% - 150px); animation: moveHorizontal 40s ease infinite; opacity: 1; }
.gradient-bg .g5 { background: radial-gradient(circle at center, rgba(95,195,35,0.9) 0, rgba(95,195,35,0) 58%) no-repeat; transform-origin: calc(50% - 500px) calc(50% + 500px); animation: moveInCircle 20s ease infinite; opacity: 1; }
.gradient-bg .interactive {
  width: 100%; height: 100%; top: -50%; left: -50%;
  background: radial-gradient(circle at center, rgba(198,248,6,0.6) 0, rgba(198,248,6,0) 50%) no-repeat;
  mix-blend-mode: screen; opacity: 0.85; will-change: transform;
}
@keyframes moveVertical { 0% { transform: translateY(-50%); } 50% { transform: translateY(50%); } 100% { transform: translateY(-50%); } }
@keyframes moveInCircle { 0% { transform: rotate(0deg); } 50% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } }
@keyframes moveHorizontal { 0% { transform: translateX(-50%) translateY(-10%); } 50% { transform: translateX(50%) translateY(10%); } 100% { transform: translateX(-50%) translateY(-10%); } }

/* ---------- Work card ---------- */
.work-card { position: relative; overflow: hidden; border-radius: 1.25rem; border: 1px solid var(--line); background: var(--surface); }
.work-card .overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.5rem; background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.1) 60%, transparent 100%); opacity: 0; transition: opacity .35s; }
.work-card:hover .overlay { opacity: 1; }
.work-card .thumb { transition: transform .6s cubic-bezier(.2,.7,.3,1); }
.work-card:hover .thumb { transform: scale(1.06); }

/* ---------- Reveal animation base (GSAP toggles) ---------- */
.reveal { opacity: 0; transform: translateY(28px); }

/* ---------- Preloader ---------- */
#preloader { position: fixed; inset: 0; z-index: 10000; background: var(--ink); display: flex; align-items: center; justify-content: center; }
#preloader .pl-num { font-family: 'Archivo'; font-weight: 800; font-size: clamp(3rem, 12vw, 9rem); color: var(--lime); }

/* ---------- Decorative animated line ---------- */
.line-path { stroke: var(--lime); stroke-width: 1.5; fill: none; opacity: .5; }

/* ---------- Form ---------- */
.field {
  width: 100%; background: rgba(255,255,255,.03); border: 1px solid var(--line);
  border-radius: .75rem; padding: .9rem 1rem; color: var(--text); transition: border-color .25s, background .25s;
}
.field::placeholder { color: var(--muted-2); }
.field:focus { outline: none; border-color: var(--lime); background: rgba(198,248,6,.04); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--lime-dim); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Mobile menu ---------- */
#mobileMenu { transition: opacity .3s, visibility .3s; }
#mobileMenu.hidden-menu { opacity: 0; visibility: hidden; pointer-events: none; }
