/* =============================================
   CONTENT PROTECTION
   ============================================= */

*, *::before, *::after {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
}

/* ── Watermark overlay on project card images ── */
.project-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  mix-blend-mode: difference;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='80'%3E%3Ctext x='5' y='45' fill='white' fill-opacity='0.15' font-size='10' font-family='monospace' font-weight='bold' transform='rotate(-20,120,40)'%3E%C2%A9 chrisjunio-services.vercel.app%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 240px 80px;
}

/* ── Watermark overlay on case study modal images ── */
.browser-content::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  mix-blend-mode: difference;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='80'%3E%3Ctext x='5' y='45' fill='white' fill-opacity='0.15' font-size='10' font-family='monospace' font-weight='bold' transform='rotate(-20,120,40)'%3E%C2%A9 chrisjunio-services.vercel.app%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 240px 80px;
}

/* ── Tighter watermark tile on mobile so no gaps to screenshot around ── */
@media (max-width: 768px) {
  .project-img-wrap::after,
  .browser-content::after,
  .lightbox-inner::after {
    background-size: 140px 48px;
  }
}

/* =============================================
   CASE STUDY MODAL — SECTIONS & METRICS
   ============================================= */

/* =============================================
   MODAL BROWSER FRAME
   ============================================= */

.modal-browser-frame {
  width: 100%;
  border-radius: var(--radius-lg, 10px) var(--radius-lg, 10px) 0 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: #12121f;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #1e1e30;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  user-select: none;
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.browser-dot.red    { background: #ff5f57; }
.browser-dot.yellow { background: #ffbd2e; }
.browser-dot.green  { background: #28c840; }

.browser-url {
  flex: 1;
  margin: 0 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 2px 10px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  font-family: 'Courier New', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-content {
  position: relative;
  width: 100%;
  background: #0d0d1a;
  cursor: zoom-in;
  overflow: hidden;
}

/* Hero screenshot — full natural size, width constrained to modal */
.modal-hero-screenshot {
  width: 100%;
  height: auto;
  display: block;
}

/* Image nav arrows overlaid on browser-content */
.modal-img-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
}
.modal-img-nav:hover   { background: rgba(124,58,237,0.7); }
.modal-img-prev        { left: 10px; }
.modal-img-next        { right: 10px; }

.modal-img-counter {
  position: absolute;
  bottom: 8px;
  right: 12px;
  background: rgba(0,0,0,0.55);
  color: rgba(255,255,255,0.7);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  pointer-events: none;
}

/* Project card screenshot */
.project-img-screenshot {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* Modal section wrapper */
.modal-section {
  margin-bottom: 20px;
}

.modal-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-primary, #7c3aed);
  opacity: 0.85;
}

.modal-section-icon {
  font-style: normal;
  font-size: 1rem;
}

.modal-section-body {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary, #9ca3af);
}

/* Tool tags */
.modal-tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-tool-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(124, 58, 237, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(124, 58, 237, 0.25);
  white-space: nowrap;
}

/* Business impact metrics */
.modal-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 6px;
}

.modal-metric-item {
  background: rgba(124, 58, 237, 0.07);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}

.modal-metric-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: #a78bfa;
  line-height: 1.2;
  margin-bottom: 3px;
}

.modal-metric-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-secondary, #9ca3af);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =============================================
   IMAGE LIGHTBOX
   ============================================= */

.img-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.93);
  align-items: center;
  justify-content: center;
}

.img-lightbox.open {
  display: flex;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Watermark on lightbox fullscreen image ── */
.lightbox-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  mix-blend-mode: difference;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='80'%3E%3Ctext x='5' y='45' fill='white' fill-opacity='0.15' font-size='10' font-family='monospace' font-weight='bold' transform='rotate(-20,120,40)'%3E%C2%A9 chrisjunio-services.vercel.app%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 240px 80px;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 80px rgba(0,0,0,0.9);
  border: 1px solid rgba(255,255,255,0.08);
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(220,38,38,0.6); }

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  transition: background 0.2s;
}
.lightbox-nav:hover { background: rgba(124,58,237,0.6); }
.lightbox-nav.prev  { left: 16px; }
.lightbox-nav.next  { right: 16px; }

.lightbox-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  pointer-events: none;
}

/* =============================================
   TESTIMONIAL AVATAR PHOTOS
   ============================================= */

img.testi-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(124, 58, 237, 0.35);
}

/* =============================================
   LIGHT / DARK THEME
   ============================================= */
[data-theme="light"] {
  --bg-primary: #f0f4ff;
  --bg-secondary: #e8edf8;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f8ff;
  --text-primary: #0f172a;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --border: rgba(124, 58, 237, 0.25);
  --glass: rgba(0,0,0,0.03);
  --glass-border: rgba(0,0,0,0.1);
  --shadow: 0 25px 50px -12px rgba(0,0,0,0.12);
  --shadow-purple: 0 0 40px rgba(124,58,237,0.1);
}
[data-theme="light"] body { background-color: var(--bg-primary); color: var(--text-primary); }
[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(124,58,237,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.05) 1px, transparent 1px);
}
[data-theme="light"] .blob { opacity: 0.05; }
[data-theme="light"] .navbar.scrolled {
  background: rgba(240,244,255,0.92);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
[data-theme="light"] .service-card,
[data-theme="light"] .project-card,
[data-theme="light"] .testi-card { background: var(--bg-card); border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .process-step { background: transparent; border-color: transparent; }
[data-theme="light"] .stats-bar { background: transparent; border: none; }
[data-theme="light"] #services,
[data-theme="light"] #portfolio,
[data-theme="light"] #about,
[data-theme="light"] #certifications,
[data-theme="light"] #contact,
[data-theme="light"] footer { background: var(--bg-primary) !important; }
[data-theme="light"] .tool-pill { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); color: var(--text-primary); }
[data-theme="light"] .mobile-nav { background: var(--bg-card); }
[data-theme="light"] .tools-rows-outer::before { background: linear-gradient(to right, var(--bg-primary), transparent); }
[data-theme="light"] .tools-rows-outer::after { background: linear-gradient(to left, var(--bg-primary), transparent); }
[data-theme="light"] .case-modal-overlay { background: rgba(220,225,240,0.92); }

/* Mobile nav top bar (close + theme toggle) */
.mobile-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 8px;
  margin-bottom: 4px;
}
.mobile-nav-top .mobile-close {
  position: static; /* override the absolute positioning from main.css */
}

/* Theme toggle button */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
}
.theme-toggle:hover { border-color: var(--accent-purple); color: var(--text-primary); background: rgba(124,58,237,0.1); }

/* =============================================
   PAGE LOADER
   ============================================= */
#page-loader {
  position: fixed;
  inset: 0;
  background: #07070f;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: loader-fade-in 0.5s ease forwards;
}
@keyframes loader-fade-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.loader-logo {
  width: 80px; height: 80px;
  object-fit: contain;
  animation: loader-pulse 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(0,110,255,0.6));
}
@keyframes loader-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(0,110,255,0.6)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 35px rgba(0,229,255,0.8)); }
}
.loader-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #006EFF, #00E5FF);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: -0.5px;
  text-align: center;
}
.loader-brand span {
  font-size: 0.8rem;
  font-weight: 500;
  background: none;
  -webkit-text-fill-color: rgba(148,163,184,0.8);
  display: block;
  text-align: center;
  letter-spacing: 0.3px;
}
.loader-bar-wrap {
  width: 160px; height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #006EFF, #00E5FF);
  border-radius: 100px;
  transition: width 0.05s linear;
}

/* =============================================
   CUSTOM CURSOR — 7 TRAIL CIRCLES
   ============================================= */
@media (pointer: fine) {
  * { cursor: none !important; }
  .c-trail {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    will-change: left, top;
    top: 0; left: 0;
  }
  /* Smallest → largest  ct1 → ct7 */
  #ct1 { width: 6px;  height: 6px;  background: #7c3aed; z-index: 99999; }
  #ct2 { width: 11px; height: 11px; background: rgba(124,58,237,0.45); z-index: 99998; }
  #ct3 { width: 17px; height: 17px; border: 1.5px solid rgba(124,58,237,0.4); z-index: 99997; }
  #ct4 { width: 24px; height: 24px; border: 1.5px solid rgba(124,58,237,0.3); z-index: 99996; }
  #ct5 { width: 32px; height: 32px; border: 1px solid rgba(6,182,212,0.28); z-index: 99995; }
  #ct6 { width: 41px; height: 41px; border: 1px solid rgba(6,182,212,0.18); z-index: 99994; }
  #ct7 { width: 52px; height: 52px; border: 1px solid rgba(6,182,212,0.1);  z-index: 99993; }

  .c-trail.hovered { border-color: var(--accent-cyan); }
  #ct1.hovered, #ct2.hovered { background: var(--accent-cyan); }
}
@media (pointer: coarse) {
  .c-trail { display: none; }
}

/* =============================================
   AMBIENT PARTICLES CANVAS — FULL PAGE
   ============================================= */
#hero-particles {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
}
#hero .container { position: relative; z-index: 1; }
#hero { position: relative; overflow: hidden; }

/* =============================================
   NAV LOGO — ARROW BRAND
   ============================================= */
.nav-logo {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: none !important;
  -webkit-text-fill-color: unset !important;
}
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-logo-text .brand {
  font-size: 1.1rem; font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-logo-text .sub { font-size: 0.58rem; font-weight: 500; color: var(--text-muted); -webkit-text-fill-color: var(--text-muted); }

/* =============================================
   TOOLS — TWO-ROW MARQUEE
   ============================================= */
.tools-rows-outer {
  position: relative;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tools-rows-outer::before,
.tools-rows-outer::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.tools-rows-outer::before { left: 0; background: linear-gradient(to right, var(--bg-primary), transparent); }
.tools-rows-outer::after  { right: 0; background: linear-gradient(to left,  var(--bg-primary), transparent); }

.tools-row { overflow: hidden; }
.tools-track-rtl { display: inline-flex; animation: tools-rtl 38s linear infinite; }
.tools-track-ltr { display: inline-flex; animation: tools-ltr 38s linear infinite; }
@keyframes tools-rtl { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes tools-ltr { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }
.tools-row:hover .tools-track-rtl,
.tools-row:hover .tools-track-ltr { animation-play-state: paused; }

.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: 9px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  margin: 0 6px;
  transition: var(--transition);
}
.tool-pill:hover { border-color: var(--accent-purple); background: var(--bg-card-hover); transform: translateY(-2px); }
.tool-pill img.si-icon { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }

/* =============================================
   VIEW CASE STUDY BUTTON
   ============================================= */
.view-case-study {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--accent-purple);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  margin-top: 14px;
  width: 100%;
  transition: var(--transition);
  letter-spacing: 0.2px;
}
.view-case-study:hover {
  background: rgba(124,58,237,0.1);
  border-color: var(--accent-purple);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124,58,237,0.15);
}

/* =============================================
   CASE STUDY MODAL
   ============================================= */
.case-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,5,20,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.case-modal-overlay.open { opacity: 1; pointer-events: all; }

.case-modal-box {
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  position: relative;
  transform: translateY(30px) scale(0.96);
  transition: transform 0.38s cubic-bezier(0.4,0,0.2,1);
  scrollbar-width: thin;
  scrollbar-color: var(--accent-purple) transparent;
}
.case-modal-overlay.open .case-modal-box { transform: translateY(0) scale(1); }
.case-modal-box::-webkit-scrollbar { width: 4px; }
.case-modal-box::-webkit-scrollbar-thumb { background: var(--accent-purple); border-radius: 2px; }

.modal-close-btn {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-card-hover);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  z-index: 10;
  transition: var(--transition);
}
.modal-close-btn:hover { background: rgba(124,58,237,0.2); color: var(--text-primary); }

.modal-hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  color: rgba(255,255,255,0.25);
  position: relative;
  overflow: hidden;
}
.modal-hero-img > i { position: relative; z-index: 1; }

.modal-body { padding: 28px 32px 32px; }
.modal-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--accent-cyan); margin-bottom: 10px; }
.modal-title { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; color: var(--text-primary); margin-bottom: 14px; line-height: 1.3; }
.modal-desc { color: var(--text-secondary); line-height: 1.8; font-size: 0.95rem; margin-bottom: 22px; }
.modal-impact { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.modal-impact-item {
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 0.82rem; font-weight: 600;
  color: #a78bfa;
  display: flex; align-items: center; gap: 7px;
}
.modal-workflow-placeholder {
  background: var(--bg-secondary);
  border: 1px dashed rgba(124,58,237,0.25);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.modal-workflow-placeholder i { font-size: 1.8rem; margin-bottom: 10px; display: block; color: var(--accent-purple); opacity: 0.4; }

/* Project card hover glow */
.project-card:hover {
  box-shadow: 0 20px 60px rgba(124,58,237,0.18), 0 0 0 1px rgba(124,58,237,0.25);
  transform: translateY(-4px);
}

/* =============================================
   TOOL ICONS — ORIGINAL BRAND COLORS
   ============================================= */
.tool-pill img.si-icon {
  transition: opacity 0.2s;
  opacity: 1;
}

/* =============================================
   PORTFOLIO TAB ICONS
   ============================================= */
.ptab-icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  margin-right: 2px;
  flex-shrink: 0;
}

/* =============================================
   HERO HIGHLIGHT TEXT
   ============================================= */
.hero-highlight {
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="light"] .hero-highlight {
  background: linear-gradient(135deg, #5b21b6, #0891b2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =============================================
   SECTION GRADIENT DIVIDERS
   ============================================= */
section.section,
.stats-bar,
footer {
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(
    90deg,
    transparent          0%,
    rgba(124,58,237,0.45) 30%,
    rgba(6,182,212,0.45)  70%,
    transparent          100%
  ) 1;
}

/* =============================================
   LASER SCAN LINE
   ============================================= */
#laser-line {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 0.5px;
  background: linear-gradient(
    90deg,
    transparent           0%,
    rgba(124, 58, 237, 0.45) 30%,
    rgba(6, 182, 212, 0.45)  70%,
    transparent           100%
  );
  box-shadow:
    0 0 1px 0.5px rgba(6, 182, 212, 0.3),
    0 0 4px 1px rgba(124, 58, 237, 0.2);
  z-index: 3;
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-1px);
  will-change: transform, opacity;
}
@keyframes laser-scan {
  0%   { transform: translateY(0);     opacity: 1; }
  90%  { opacity: 0.9; }
  100% { transform: translateY(100vh); opacity: 0; }
}
#laser-line.scanning {
  animation: laser-scan 9s linear forwards;
}

/* =============================================
   FLOATING IMAGE ANIMATION — HERO & ABOUT
   ============================================= */
@keyframes float-updown {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-14px); }
}

/* Hero image wraps floats */
.hero-image-wrap {
  animation: float-updown 5s ease-in-out infinite;
}

/* About image wrap floats */
.about-image-wrap {
  animation: float-updown 5.5s ease-in-out infinite;
}

/* About image — decorative glowing frame */
.about-img-container {
  position: relative;
  box-shadow:
    0 0 0 3px rgba(124, 58, 237, 0.35),
    0 0 0 6px rgba(6, 182, 212, 0.15),
    0 20px 60px rgba(124, 58, 237, 0.18);
}
.about-img-container::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: calc(var(--radius-lg) + 3px);
  background: linear-gradient(135deg, rgba(124,58,237,0.6), rgba(6,182,212,0.5));
  z-index: -1;
  animation: frame-pulse 4s ease-in-out infinite;
}
@keyframes frame-pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* =============================================
   AMBIENT BACKGROUND BLOBS — FULL PAGE DRIFT
   ============================================= */
@keyframes blob-drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(60px, -40px) scale(1.05); }
  66%  { transform: translate(-30px, 50px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes blob-drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-50px, 40px) scale(0.95); }
  66%  { transform: translate(40px, -60px) scale(1.05); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes blob-drift-3 {
  0%   { transform: translate(-50%, -50%) scale(1); }
  33%  { transform: translate(calc(-50% + 50px), calc(-50% + 30px)) scale(1.08); }
  66%  { transform: translate(calc(-50% - 40px), calc(-50% - 20px)) scale(0.93); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.blob-1 { animation: blob-drift-1 18s ease-in-out infinite; }
.blob-2 { animation: blob-drift-2 22s ease-in-out infinite; }
.blob-3 { animation: blob-drift-3 26s ease-in-out infinite; }

/* Extra ambient blobs for lower sections */
.blob-4, .blob-5 {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.07;
  z-index: 0;
  pointer-events: none;
}
.blob-4 {
  width: 450px; height: 450px;
  background: #06b6d4;
  top: 40%; left: 60%;
  animation: blob-drift-1 20s ease-in-out infinite reverse;
}
.blob-5 {
  width: 380px; height: 380px;
  background: #7c3aed;
  top: 70%; left: 20%;
  animation: blob-drift-2 24s ease-in-out infinite;
}

/* =============================================
   SECTION ANIMATED BACKGROUNDS
   ============================================= */

/* Shared keyframes */
@keyframes grid-scroll {
  from { transform: translate(0, 0); }
  to   { transform: translate(60px, 60px); }
}
@keyframes grid-scroll-rev {
  from { transform: translate(0, 0); }
  to   { transform: translate(-50px, -50px); }
}
@keyframes dots-scroll {
  from { transform: translate(0, 0); }
  to   { transform: translate(48px, 48px); }
}
@keyframes stripe-scroll {
  from { transform: translate(0, 0); }
  to   { transform: translate(113px, 113px); }
}
@keyframes orb-breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%       { opacity: 1;    transform: scale(1.12); }
}
@keyframes orb-breathe-alt {
  0%, 100% { opacity: 0.4; transform: scale(1.05); }
  50%       { opacity: 0.9; transform: scale(0.95); }
}
@keyframes aurora-shift {
  0%   { background-position: 0% 50%;   opacity: 0.6; }
  50%  { background-position: 100% 50%; opacity: 1;   }
  100% { background-position: 0% 50%;   opacity: 0.6; }
}

/* ── SERVICES — moving grid + dual corner glows ── */
#services { overflow: hidden; }
#services::before {
  content: '';
  position: absolute; inset: -60px;
  background-image:
    linear-gradient(rgba(124,58,237,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: grid-scroll 28s linear infinite;
  z-index: 0; pointer-events: none;
}
#services::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 5% 10%,  rgba(124,58,237,0.11) 0%, transparent 65%),
    radial-gradient(ellipse 45% 60% at 95% 90%, rgba(6,182,212,0.09)  0%, transparent 65%);
  animation: orb-breathe 9s ease-in-out infinite;
  z-index: 0; pointer-events: none;
}

/* ── PORTFOLIO — drifting dot constellation + sweep glow ── */
#portfolio { overflow: hidden; }
#portfolio::before {
  content: '';
  position: absolute; inset: -50px;
  background-image: radial-gradient(circle, rgba(6,182,212,0.22) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: dots-scroll 22s linear infinite;
  z-index: 0; pointer-events: none;
}
#portfolio::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 40% at 50% -5%,  rgba(124,58,237,0.1) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 90% 100%, rgba(6,182,212,0.07) 0%, transparent 65%);
  animation: orb-breathe-alt 11s ease-in-out infinite;
  z-index: 0; pointer-events: none;
}

/* ── ABOUT — diagonal stripes + side glows ── */
#about { overflow: hidden; }
#about::before {
  content: '';
  position: absolute; inset: -120px;
  background: repeating-linear-gradient(
    -45deg,
    transparent          0px,
    transparent          79px,
    rgba(124,58,237,0.04) 79px,
    rgba(124,58,237,0.04) 80px
  );
  animation: stripe-scroll 45s linear infinite;
  z-index: 0; pointer-events: none;
}
#about::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 55% 90% at 0%   50%, rgba(124,58,237,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 45% 80% at 100% 50%, rgba(6,182,212,0.08) 0%, transparent 60%);
  animation: orb-breathe 13s ease-in-out infinite;
  z-index: 0; pointer-events: none;
}

/* ── CONTACT — aurora neon + reverse grid ── */
#contact { overflow: hidden; }
#contact::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    135deg,
    rgba(124,58,237,0.09) 0%,
    transparent          40%,
    rgba(6,182,212,0.07) 60%,
    transparent          80%,
    rgba(124,58,237,0.06) 100%
  );
  background-size: 300% 300%;
  animation: aurora-shift 14s ease-in-out infinite;
  z-index: 0; pointer-events: none;
}
#contact::after {
  content: '';
  position: absolute; inset: -50px;
  background-image:
    linear-gradient(rgba(6,182,212,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6,182,212,0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: grid-scroll-rev 32s linear infinite;
  z-index: 0; pointer-events: none;
}

/* Make sure content inside these sections stays above pseudo-elements */
#services .container, #portfolio .container,
#about .container,   #contact .container {
  position: relative; z-index: 1;
}

/* Light mode — tone down intensities */
[data-theme="light"] #services::before { opacity: 0.4; }
[data-theme="light"] #services::after  { opacity: 0.5; }
[data-theme="light"] #portfolio::before { opacity: 0.3; }
[data-theme="light"] #portfolio::after  { opacity: 0.5; }
[data-theme="light"] #about::before { opacity: 0.35; }
[data-theme="light"] #about::after  { opacity: 0.4; }
[data-theme="light"] #contact::before { opacity: 0.35; }
[data-theme="light"] #contact::after  { opacity: 0.3; }

/* =============================================
   RESPONSIVE ADDITIONS
   ============================================= */
@media (max-width: 768px) {
  .tools-rows-outer::before,
  .tools-rows-outer::after { width: 60px; }
  .modal-body { padding: 20px; }
  .modal-title { font-size: 1.25rem; }
  .modal-hero-img { height: auto; }
  .nav-logo-text .sub { display: none; }
}

/* =============================================
   3D SCROLL REVEAL SYSTEM
   ============================================= */

/* Perspective host — wraps each section's .container */
.s3d-host {
  perspective: 1800px;
  perspective-origin: 50% 35%;
  overflow: visible;
}

/* Shared animated-container styles */
.s3d-target {
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ── FLIP: tilts forward and rises from the bottom ── */
.s3d-target.s3d-flip {
  transform: rotateX(26deg) translateY(120px) scale(0.91);
  opacity: 0;
  filter: blur(8px);
  transform-origin: center 85%;
  transition:
    transform 1.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity   1.1s ease,
    filter    1.1s ease;
}

/* ── RIGHT: content sweeps in from the far left ── */
.s3d-target.s3d-right {
  transform: rotateY(32deg) translateX(-160px) scale(0.88);
  opacity: 0;
  filter: blur(8px);
  transform-origin: left center;
  transition:
    transform 1.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity   1.1s ease,
    filter    1.1s ease;
}

/* ── LEFT: content sweeps in from the far right ── */
.s3d-target.s3d-left {
  transform: rotateY(-32deg) translateX(160px) scale(0.88);
  opacity: 0;
  filter: blur(8px);
  transform-origin: right center;
  transition:
    transform 1.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity   1.1s ease,
    filter    1.1s ease;
}

/* ── ZOOM: bursts in from deep 3D space ── */
.s3d-target.s3d-zoom {
  transform: rotateX(16deg) scale(0.72);
  opacity: 0;
  filter: blur(12px);
  transform-origin: center center;
  transition:
    transform 1.5s cubic-bezier(0.16, 1, 0.3, 1),
    opacity   1.2s ease,
    filter    1.2s ease;
}

/* ── TILT: diagonal 3-D entrance from bottom-left ── */
.s3d-target.s3d-tilt {
  transform: rotateX(20deg) rotateY(-20deg) translateY(100px) scale(0.86);
  opacity: 0;
  filter: blur(10px);
  transform-origin: left bottom;
  transition:
    transform 1.5s cubic-bezier(0.16, 1, 0.3, 1),
    opacity   1.2s ease,
    filter    1.2s ease;
}

/* ── RISE: dramatic vertical ascension with depth ── */
.s3d-target.s3d-rise {
  transform: rotateX(34deg) translateY(160px) scale(0.82);
  opacity: 0;
  filter: blur(14px);
  transform-origin: center top;
  transition:
    transform 1.6s cubic-bezier(0.16, 1, 0.3, 1),
    opacity   1.3s ease,
    filter    1.3s ease;
}

/* ── FADE: pure opacity + slight rise — no blur, no scale (safe for heavy sections) ── */
.s3d-target.s3d-fade {
  transform: translateY(24px);
  opacity: 0;
  transform-origin: center top;
  transition:
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    opacity   0.8s ease;
}

/* ── Revealed — all effects settle here ── */
.s3d-target.s3d-in {
  transform: none !important;
  opacity: 1 !important;
  filter: blur(0) !important;
}

/* Reduced-motion: instant reveal, no 3-D drama */
@media (prefers-reduced-motion: reduce) {
  .s3d-target {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    transition: none !important;
  }
}

/* =============================================
   AI ASSISTANT WIDGET
   ============================================= */

/* Container — fixed anchor, 64×64, chat floats above */
.ai-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9990;
  width: 64px;
  height: 64px;
}
/* Dragging state */
.ai-widget.ai-dragging { cursor: grabbing !important; user-select: none; }
.ai-widget.ai-dragging * { cursor: grabbing !important; pointer-events: none; }

/* ── Toggle button ── */
.ai-toggle {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: transparent;
  padding: 0;
  cursor: grab;
  touch-action: none;
  display: block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ai-toggle:hover { transform: scale(1.1); }
.ai-widget.ai-dragging .ai-toggle { transform: scale(1.06) !important; cursor: grabbing; }

.ai-toggle-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
  pointer-events: none;
  box-shadow:
    0 4px 24px rgba(124, 58, 237, 0.55),
    0 0 0 2px rgba(124, 58, 237, 0.35);
}

/* Pulse rings */
.ai-pulse-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(124, 58, 237, 0.45);
  animation: ai-pulse 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
}
.ai-pulse-ring-2 {
  inset: -11px;
  border-color: rgba(6, 182, 212, 0.28);
  animation-delay: 0.85s;
}
@keyframes ai-pulse {
  0%, 100% { opacity: 0; transform: scale(0.88); }
  50%       { opacity: 1; transform: scale(1.06); }
}

/* Hint bounce — fires automatically after idle */
@keyframes ai-hint-bounce {
  0%, 100% { transform: scale(1);   }
  25%       { transform: scale(1.18) rotate(-6deg); }
  50%       { transform: scale(1.14) rotate(6deg);  }
  75%       { transform: scale(1.1)  rotate(-3deg); }
}
.ai-toggle.ai-hint { animation: ai-hint-bounce 0.7s ease-in-out 3; }

/* ── Chat window — floats ABOVE the toggle via absolute positioning ── */
.ai-chat-window {
  position: absolute;
  bottom: calc(100% + 14px); /* sits above toggle */
  right: 0;
  width: 360px;
  max-height: 560px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(124, 58, 237, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(14px) scale(0.93);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity   0.3s ease;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.ai-chat-window.ai-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}
/* When widget is near top, chat opens downward instead */
.ai-widget.ai-flip-down .ai-chat-window {
  bottom: auto;
  top: calc(100% + 14px);
  transform-origin: top right;
  transform: translateY(-14px) scale(0.93);
}
.ai-widget.ai-flip-down .ai-chat-window.ai-open {
  transform: translateY(0) scale(1);
}
/* Chat link styling */
.ai-link {
  color: var(--accent-purple);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.ai-link:hover { color: var(--accent-cyan); }

/* ── Header ── */
.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg,
    rgba(124, 58, 237, 0.18) 0%,
    rgba(6, 182, 212, 0.1)  100%);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.ai-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  border: 2px solid rgba(124, 58, 237, 0.45);
  flex-shrink: 0;
}
.ai-header-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
  line-height: 1.2;
}
.ai-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.71rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.ai-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  animation: s-pulse 2.2s ease-in-out infinite;
}
@keyframes s-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.82); }
}
.ai-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.ai-close:hover {
  background: rgba(124, 58, 237, 0.15);
  color: var(--text-primary);
  border-color: var(--accent-purple);
}

/* ── Messages feed ── */
.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,58,237,0.4) transparent;
}
.ai-messages::-webkit-scrollbar      { width: 3px; }
.ai-messages::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.5); border-radius: 2px; }

/* Message row */
.ai-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  animation: msg-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes msg-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.95); }
  to   { opacity: 1; transform: none; }
}
.ai-msg--user { flex-direction: row-reverse; }

.ai-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
  border: 1px solid rgba(124, 58, 237, 0.35);
}

.ai-msg-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 18px 18px 18px 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--text-secondary);
  word-break: break-word;
}
.ai-msg-bubble br + br { display: none; } /* collapse double line-breaks */

.ai-msg--user .ai-msg-bubble {
  background: linear-gradient(135deg,
    rgba(124, 58, 237, 0.28),
    rgba(6, 182, 212, 0.18));
  border-color: rgba(124, 58, 237, 0.35);
  border-radius: 18px 18px 4px 18px;
  color: var(--text-primary);
}

/* Typing indicator */
.ai-typing .ai-msg-bubble { padding: 13px 16px; }
.ai-typing-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}
.ai-typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-purple);
  animation: tdot 1.4s ease-in-out infinite;
}
.ai-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
  background: color-mix(in srgb, var(--accent-purple), var(--accent-cyan) 50%);
}
.ai-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
  background: var(--accent-cyan);
}
@keyframes tdot {
  0%, 100% { transform: translateY(0);   opacity: 0.45; }
  50%       { transform: translateY(-6px); opacity: 1;   }
}

/* ── Quick replies ── */
.ai-quickreplies {
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border-top: 1px solid var(--glass-border);
  background: var(--bg-secondary);
  flex-shrink: 0;
}
.ai-qr {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  transition: var(--transition);
  font-family: var(--font-main);
  cursor: pointer;
}
.ai-qr:hover {
  background: rgba(124, 58, 237, 0.14);
  border-color: var(--accent-purple);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* ── Input row ── */
.ai-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--glass-border);
  background: var(--bg-card);
  flex-shrink: 0;
}
#aiInput {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: 9px 16px;
  font-size: 0.83rem;
  color: var(--text-primary);
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}
#aiInput:focus         { border-color: var(--accent-purple); }
#aiInput::placeholder  { color: var(--text-muted); }
#aiSend {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--accent-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}
#aiSend:hover { transform: scale(1.12); box-shadow: 0 6px 22px rgba(124, 58, 237, 0.55); }

/* ── Light theme adjustments ── */
[data-theme="light"] .ai-chat-window {
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.14),
    0 0 0 1px rgba(124, 58, 237, 0.22);
}
[data-theme="light"] #aiInput    { background: #fff; }
[data-theme="light"] .ai-toggle-img {
  box-shadow:
    0 4px 20px rgba(124, 58, 237, 0.3),
    0 0 0 2px rgba(124, 58, 237, 0.25);
}

/* ── Mobile ── */
@media (max-width: 768px) {
  /* Tablet: slightly narrower chat */
  .ai-chat-window { width: 320px; }
}

@media (max-width: 520px) {
  .ai-widget { bottom: 16px; right: 16px; width: 56px; height: 56px; }
  .ai-toggle,
  .ai-toggle-img { width: 56px; height: 56px; }

  /* Chat window: use fixed positioning so it stays on-screen regardless of
     where the widget is dragged. Always anchored to bottom of viewport. */
  .ai-chat-window {
    position: fixed !important;
    width: calc(100vw - 24px) !important;
    max-height: 72vh !important;
    bottom: 88px !important;
    right: 12px !important;
    left: 12px !important;
    border-radius: 18px;
    transform-origin: bottom right;
  }
  .ai-widget.ai-flip-down .ai-chat-window {
    bottom: auto !important;
    top: 12px !important;
    transform-origin: top right;
  }
}

/* =============================================
   LIGHT MODE — RICH VISUAL BACKGROUND
   ============================================= */

/* Rich gradient body instead of flat white */
[data-theme="light"] body {
  background: linear-gradient(
    150deg,
    #eef2ff 0%,
    #f0f4ff 25%,
    #e8f0fe 55%,
    #ede9fe 100%
  ) !important;
}

/* Much stronger, clearly visible grid */
[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(99, 58, 237, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 58, 237, 0.13) 1px, transparent 1px) !important;
  background-size: 60px 60px !important;
}

/* Ambient orb glow layer over body (mirrors dark mode blobs but lighter) */
[data-theme="light"] body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 50% at 5%  15%,  rgba(124, 58, 237, 0.14) 0%, transparent 65%),
    radial-gradient(ellipse 55% 65% at 95% 85%,  rgba(6,  182, 212, 0.13) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 50% 50%,  rgba(139, 92, 246, 0.07) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

/* Blobs — dramatically more visible & vibrant in light mode */
[data-theme="light"] .blob   { opacity: 0.22 !important; }
[data-theme="light"] .blob-1 { background: #a855f7 !important; }
[data-theme="light"] .blob-2 { background: #22d3ee !important; }
[data-theme="light"] .blob-3 { background: #818cf8 !important; }
[data-theme="light"] .blob-4 { background: #0ea5e9 !important; opacity: 0.18 !important; }
[data-theme="light"] .blob-5 { background: #c084fc !important; opacity: 0.16 !important; }

/* Laser line — visible purple/cyan on light backgrounds */
[data-theme="light"] #laser-line {
  background: linear-gradient(
    90deg,
    transparent               0%,
    rgba(109, 40,  217, 0.85) 30%,
    rgba(6,  182, 212, 0.85)  70%,
    transparent               100%
  ) !important;
  box-shadow:
    0 0 2px 1px rgba(109, 40, 217, 0.55),
    0 0 10px 3px rgba(109, 40, 217, 0.28),
    0 0 4px 1px rgba(6, 182, 212, 0.4) !important;
  mix-blend-mode: multiply !important;
}

/* Scrollbar visible in light mode */
[data-theme="light"] ::-webkit-scrollbar-track { background: #dde3f5; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(124, 58, 237, 0.5); }

/* Section backgrounds — much higher opacity so they read on light bg */
[data-theme="light"] #services::before {
  background-image:
    linear-gradient(rgba(109, 40, 217, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 40, 217, 0.11) 1px, transparent 1px) !important;
  opacity: 1 !important;
}
[data-theme="light"] #services::after {
  background:
    radial-gradient(ellipse 55% 70% at 5%  10%,  rgba(124, 58, 237, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 45% 60% at 95% 90%,  rgba(6,  182, 212, 0.15) 0%, transparent 65%) !important;
  opacity: 1 !important;
}

[data-theme="light"] #portfolio::before {
  background-image: radial-gradient(circle, rgba(6, 182, 212, 0.38) 1px, transparent 1px) !important;
  opacity: 1 !important;
}
[data-theme="light"] #portfolio::after {
  background:
    radial-gradient(ellipse 70% 40% at 50% -5%,  rgba(124, 58, 237, 0.16) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 90% 100%, rgba(6,  182, 212, 0.13) 0%, transparent 65%) !important;
  opacity: 1 !important;
}

[data-theme="light"] #about::before {
  background: repeating-linear-gradient(
    -45deg,
    transparent              0px,
    transparent              79px,
    rgba(109, 40, 217, 0.08) 79px,
    rgba(109, 40, 217, 0.08) 80px
  ) !important;
  opacity: 1 !important;
}
[data-theme="light"] #about::after {
  background:
    radial-gradient(ellipse 55% 90% at 0%   50%, rgba(124, 58, 237, 0.16) 0%, transparent 60%),
    radial-gradient(ellipse 45% 80% at 100% 50%, rgba(6,  182, 212, 0.13) 0%, transparent 60%) !important;
  opacity: 1 !important;
}

[data-theme="light"] #contact::before {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.14) 0%,
    transparent               40%,
    rgba(6,  182, 212, 0.12)  60%,
    transparent               80%,
    rgba(124, 58, 237, 0.1)  100%
  ) !important;
  opacity: 1 !important;
}
[data-theme="light"] #contact::after {
  background-image:
    linear-gradient(rgba(6, 182, 212, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.1) 1px, transparent 1px) !important;
  opacity: 1 !important;
}

/* Navbar scrolled — glassy on light with visible border */
[data-theme="light"] .navbar.scrolled {
  background: rgba(238, 242, 255, 0.88) !important;
  border-bottom: 1px solid rgba(124, 58, 237, 0.18) !important;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.08) !important;
}

/* Section background override — allow our pseudo-elements to show */
[data-theme="light"] #services,
[data-theme="light"] #portfolio,
[data-theme="light"] #about,
[data-theme="light"] #contact,
[data-theme="light"] footer {
  background: transparent !important;
}

/* Footer subtle gradient */
[data-theme="light"] footer {
  background: linear-gradient(180deg, transparent, rgba(124, 58, 237, 0.04)) !important;
}

/* Process section light glow */
[data-theme="light"] #process {
  background: linear-gradient(135deg, rgba(124,58,237,0.04) 0%, transparent 50%, rgba(6,182,212,0.03) 100%);
}

/* Tools marquee fade edges — match new bg */
[data-theme="light"] .tools-rows-outer::before {
  background: linear-gradient(to right, #eef2ff, transparent) !important;
}
[data-theme="light"] .tools-rows-outer::after {
  background: linear-gradient(to left, #eef2ff, transparent) !important;
}

/* Stats bar subtle card */
[data-theme="light"] .stats-bar {
  background: rgba(255,255,255,0.55) !important;
  border: 1px solid rgba(124, 58, 237, 0.12) !important;
  backdrop-filter: blur(8px);
  border-radius: 16px;
}

/* Service / Project / Testi cards — light glassy */
[data-theme="light"] .service-card,
[data-theme="light"] .project-card,
[data-theme="light"] .testi-card {
  background: rgba(255,255,255,0.8) !important;
  border-color: rgba(124, 58, 237, 0.12) !important;
  backdrop-filter: blur(6px);
}
[data-theme="light"] .service-card:hover,
[data-theme="light"] .project-card:hover {
  background: rgba(255,255,255,0.95) !important;
  box-shadow: 0 12px 40px rgba(124,58,237,0.15) !important;
}

/* Section badge in light mode */
[data-theme="light"] .section-badge {
  background: rgba(124, 58, 237, 0.08) !important;
  border-color: rgba(124, 58, 237, 0.25) !important;
}

/* Tool pills */
[data-theme="light"] .tool-pill {
  background: rgba(255,255,255,0.7) !important;
  border-color: rgba(124, 58, 237, 0.15) !important;
  backdrop-filter: blur(4px);
}

/* CTA banner */
[data-theme="light"] .cta-banner {
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(6,182,212,0.06)) !important;
  border: 1px solid rgba(124, 58, 237, 0.15) !important;
}
