/* ==========================================================================
   codrut-popescu.com — Ultra-Low-CPU Futuristic Edge Contour & WebGL Ribbon
   Palette: Deep Cobalt · Electric Cyan · Emerald Green · Sapphire (Zero Pink)
   Pure GPU compositor transforms (zero full-screen blur/mask repaints)
   ========================================================================== */

:root {
  --ocp-c1: #0f62fe;
  --ocp-c2: #06b6d4;
  --ocp-c3: #10b981;
  --ocp-c4: #1d4ed8;
  --ocp-edge-opacity: 0.72;
  --ocp-card-rim-alpha: 0.75;
  --ocp-card-sheen-alpha: 0.06;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ocp-c1: #2563eb;
    --ocp-c2: #22d3ee;
    --ocp-c3: #34d399;
    --ocp-c4: #38bdf8;
    --ocp-edge-opacity: 0.90;
    --ocp-card-rim-alpha: 0.92;
    --ocp-card-sheen-alpha: 0.10;
  }
}

body {
  position: relative;
  overflow-x: hidden;
}

.ocp-navbar,
.ocp-main,
.ocp-comments-wrap,
.ocp-footer {
  position: relative;
  z-index: 2;
}

.ocp-navbar {
  background: rgba(250, 250, 249, 0.86) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

@media (prefers-color-scheme: dark) {
  .ocp-navbar {
    background: rgba(9, 9, 11, 0.84) !important;
  }
}

/* ── 1. Ultra-Light GPU Perimeter Edge Contour (4 thin 2px strips, zero full-screen blur!) ──
   Each strip animates ONLY transform: translate3d() on a 2px-thick layer (<0.4% screen area),
   so WindowServer & WebKit stay near 0% CPU even on 120Hz ProMotion displays. */
#ocp-edge-frame {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: var(--ocp-edge-opacity);
}

.ocp-edge {
  position: absolute;
  overflow: hidden;
  pointer-events: none;
}

.ocp-edge--top    { top: 0; left: 0; right: 0; height: 2px; box-shadow: 0 1px 10px rgba(6, 182, 212, 0.32); }
.ocp-edge--bottom { bottom: 0; left: 0; right: 0; height: 2px; box-shadow: 0 -1px 10px rgba(16, 185, 129, 0.28); }
.ocp-edge--left   { top: 0; bottom: 0; left: 0; width: 2px; box-shadow: 1px 0 10px rgba(15, 98, 254, 0.28); }
.ocp-edge--right  { top: 0; bottom: 0; right: 0; width: 2px; box-shadow: -1px 0 10px rgba(6, 182, 212, 0.28); }

.ocp-edge__bar {
  position: absolute;
  will-change: transform;
  backface-visibility: hidden;
}

.ocp-edge--top .ocp-edge__bar,
.ocp-edge--bottom .ocp-edge__bar {
  top: 0; bottom: 0; left: 0;
  width: 200%;
  background: linear-gradient(
    90deg,
    var(--ocp-c1) 0%,
    var(--ocp-c2) 12.5%,
    var(--ocp-c3) 25%,
    var(--ocp-c2) 37.5%,
    var(--ocp-c1) 50%,
    var(--ocp-c2) 62.5%,
    var(--ocp-c3) 75%,
    var(--ocp-c2) 87.5%,
    var(--ocp-c1) 100%
  );
}

.ocp-edge--top .ocp-edge__bar    { animation: ocp-flow-x 14s linear infinite; }
.ocp-edge--bottom .ocp-edge__bar { animation: ocp-flow-x-rev 14s linear infinite; }

.ocp-edge--left .ocp-edge__bar,
.ocp-edge--right .ocp-edge__bar {
  left: 0; right: 0; top: 0;
  height: 200%;
  background: linear-gradient(
    180deg,
    var(--ocp-c1) 0%,
    var(--ocp-c2) 12.5%,
    var(--ocp-c3) 25%,
    var(--ocp-c2) 37.5%,
    var(--ocp-c1) 50%,
    var(--ocp-c2) 62.5%,
    var(--ocp-c3) 75%,
    var(--ocp-c2) 87.5%,
    var(--ocp-c1) 100%
  );
}

.ocp-edge--right .ocp-edge__bar { animation: ocp-flow-y 14s linear infinite; }
.ocp-edge--left .ocp-edge__bar  { animation: ocp-flow-y-rev 14s linear infinite; }

@keyframes ocp-flow-x     { from { transform: translate3d(-50%, 0, 0); } to { transform: translate3d(0%, 0, 0); } }
@keyframes ocp-flow-x-rev { from { transform: translate3d(0%, 0, 0); }   to { transform: translate3d(-50%, 0, 0); } }
@keyframes ocp-flow-y     { from { transform: translate3d(0, -50%, 0); } to { transform: translate3d(0, 0%, 0); } }
@keyframes ocp-flow-y-rev { from { transform: translate3d(0, 0%, 0); }   to { transform: translate3d(0, -50%, 0); } }

/* ── 2. Asterra-Inspired WebGL Silk & Particle Showcase (Home) ── */
.ocp-ribbon-shell {
  position: relative;
  width: 100%;
  height: 156px;
  margin: 0 0 28px;
  border-radius: 16px;
  overflow: hidden;
  background: #050811;
  border: 1px solid rgba(34, 211, 238, 0.22);
  box-shadow: 0 14px 36px -14px rgba(15, 98, 254, 0.28),
              0 4px 16px -6px rgba(16, 185, 129, 0.16),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
  isolation: isolate;
}

.ocp-ribbon-shell canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.ocp-ribbon-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,0.06) 0%, transparent 55%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

/* ── 3. Pulsing Luminous Status Dot (pure GPU transform + opacity) ── */
.ocp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.ocp-status-dot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}

.ocp-status-dot__core {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--ocp-c3), var(--ocp-c2)) !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

.ocp-status-dot__ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: var(--ocp-c3);
  opacity: 0.7;
  will-change: transform, opacity;
  animation: ocp-dot-pulse 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes ocp-dot-pulse {
  0%   { transform: scale(1); opacity: 0.7; }
  70%  { transform: scale(2.8); opacity: 0; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* ── 4. Crisp Technical Gradient on Hero AI Phrase (zero repaint) ── */
.ocp-ai-accent {
  background: linear-gradient(110deg, #0f62fe 0%, #0284c7 48%, #059669 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

@media (prefers-color-scheme: dark) {
  .ocp-ai-accent {
    background: linear-gradient(110deg, #f8fafc 0%, #38bdf8 48%, #34d399 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
  }
}

/* ── 5. Interactive Specular Contour Rim on Cards (0% CPU at rest, only on hover) ── */
.ocp-card {
  position: relative;
  isolation: isolate;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 240ms ease,
              border-color 240ms ease !important;
}

.ocp-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 240ms ease;
  background: radial-gradient(
    320px circle at var(--mx, 50%) var(--my, 0%),
    rgba(16, 185, 129, var(--ocp-card-rim-alpha)) 0%,
    rgba(6, 182, 212, calc(var(--ocp-card-rim-alpha) * 0.92)) 34%,
    rgba(15, 98, 254, calc(var(--ocp-card-rim-alpha) * 0.65)) 60%,
    transparent 82%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  z-index: 2;
}

.ocp-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms ease;
  background: radial-gradient(
    400px circle at var(--mx, 50%) var(--my, 0%),
    rgba(6, 182, 212, var(--ocp-card-sheen-alpha)) 0%,
    rgba(16, 185, 129, calc(var(--ocp-card-sheen-alpha) * 0.65)) 45%,
    transparent 74%
  );
  z-index: 0;
}

.ocp-card > * {
  position: relative;
  z-index: 1;
}

.ocp-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(15, 98, 254, 0.16),
              0 4px 16px -6px rgba(16, 185, 129, 0.14) !important;
}

.ocp-card.is-lit::before,
.ocp-card:hover::before,
.ocp-card.is-lit::after,
.ocp-card:hover::after {
  opacity: 1;
}

.ocp-btn-primary,
.ocp-c-btn {
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 220ms ease,
              background-color 180ms ease !important;
}

.ocp-btn-primary:hover,
.ocp-c-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -4px rgba(15, 98, 254, 0.52),
              0 0 16px -2px rgba(16, 185, 129, 0.34) !important;
}
