/*
 * ============================================================
 *  Career Kaushal — Global Stylesheet
 *  Project : Career Kaushal — Enterprise Platform
 *  Engine  : Atom-Core by Visobotics
 *  All custom properties use --viso- prefix
 *  DEFAULT THEME: Light (bluish-tint)
 * ============================================================
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Design Tokens (Light-First Default) ─────────────────── */
:root {
  /* Brand Palette */
  --viso-primary: #1867ff;
  --viso-primary-dark: #1251cc;
  --viso-primary-light: #528cff;
  --viso-primary-subtle: #ddeaff;
  --viso-primary-op: rgba(24, 103, 255, 0.10);
  --viso-primary-light-op: rgba(82, 140, 255, 0.15);

  --viso-secondary: #17c1d4;
  --viso-secondary-light: #d0f5f9;
  --viso-accent: #db1a6e;
  --viso-accent-light: #fde8f2;
  --viso-yellow: #d4c117;
  --viso-yellow-light: #fdf8d0;

  /* ── LIGHT MODE (DEFAULT) ─────────────────────────────── */
  --viso-bg: #eef3fb;
  /* body — soft blue-tinted white */
  --viso-dark: #e4ecf8;
  /* alt section bg — slightly deeper tint */
  --viso-dark-2: #ffffff;
  /* cards, panels */
  --viso-dark-3: #d0dcf0;
  /* strong dividers */

  --text-heading: #0f172a;
  --text-main: #1e293b;
  --text-muted: #64748b;

  --border-color: rgba(24, 103, 255, 0.10);
  --shade-subtle: rgba(24, 103, 255, 0.025);
  --shade-light: rgba(24, 103, 255, 0.06);

  --viso-shadow: 0 2px 12px rgba(24, 103, 255, 0.08);
  --viso-shadow-lg: 0 8px 32px rgba(24, 103, 255, 0.13);

  /* Shared */
  --viso-mid: #64748b;
  --viso-border: rgba(24, 103, 255, 0.10);
  --viso-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --viso-radius: 0.5rem;
  --viso-radius-lg: 1rem;
  --viso-radius-xl: 1.5rem;
  --viso-transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --viso-navbar-h: 74px;
  --viso-ticker-h: 36px;
}

/* ── Dark Mode Overrides ──────────────────────────────────── */
[data-theme="dark"] {
  --viso-bg: #050505;
  --viso-dark: #050505;
  --viso-dark-2: #080808;
  --viso-dark-3: #0c0c0c;

  --text-heading: #ffffff;
  --text-main: rgba(255, 255, 255, 0.75);
  --text-muted: rgba(255, 255, 255, 0.55);

  --border-color: rgba(255, 255, 255, 0.10);
  --shade-subtle: rgba(255, 255, 255, 0.03);
  --shade-light: rgba(255, 255, 255, 0.07);

  --viso-shadow: 0 4px 24px rgba(0, 0, 0, 0.20);
  --viso-shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.30);

  --viso-primary-subtle: #e8effe;
}

/* ── Webkit Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar {
  width: 1px; /* Strictly 1px thin as requested */
  height: 1px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.4);
}

/* ── Base ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html, body {
  overflow-x: hidden; /* Prevent horizontal margin/overflow on all pages */
  position: relative;
  width: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--viso-font);
  background: var(--viso-bg);
  color: var(--text-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-top: calc(var(--viso-ticker-h) + var(--viso-navbar-h));
  transition: background 0.4s ease, color 0.4s ease;
}

/* ── Section Background Control ──────────────────────────── */
/*
 * By default all sections are plain white (--viso-dark-2).
 * Add .viso-tint to a section to give it the soft bluish-tint bg.
 * Works automatically for dark mode via tokens.
 */
section {
  background: var(--viso-dark-2);
}

.viso-tint {
  background: var(--viso-bg) !important;
}

/* Dark mode: tinted = slightly lighter dark */
[data-theme="dark"] .viso-tint {
  background: var(--viso-dark) !important;
}

/* Legacy helpers kept for compatibility */
.viso-section-default {
  background: var(--viso-dark-2);
}

.viso-section-alt {
  background: var(--viso-bg);
}

.viso-section-card {
  background: var(--viso-dark-2);
}

/* ── Utilities ────────────────────────────────────────────── */
.text-viso-primary {
  color: var(--viso-primary) !important;
}

.text-viso-secondary {
  color: var(--viso-secondary) !important;
}

.text-viso-accent {
  color: var(--viso-accent) !important;
}

.text-viso-yellow {
  color: var(--viso-yellow) !important;
}

.text-viso-heading {
  color: var(--text-heading) !important;
}

.bg-viso-dark {
  background: var(--viso-dark) !important;
  color: var(--text-main);
}

.bg-viso-dark-2 {
  background: var(--viso-dark-2) !important;
  color: var(--text-main);
}

.bg-viso-primary {
  background: var(--viso-primary) !important;
  color: #fff;
}

.bg-viso-subtle {
  background: var(--viso-primary-subtle) !important;
}

/* ── Global Button Overrides ──────────────────────────────── */
.btn,
.viso-hero-btn,
.viso-hero-btn-outline {
  border-radius: 50px !important;
  font-weight: 600 !important;
  padding: 0.6rem 1.5rem;
}

.btn-primary {
  background-color: var(--viso-primary) !important;
  border-color: var(--viso-primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px var(--viso-primary-op);
}

.btn-primary:hover {
  background-color: var(--viso-primary-dark) !important;
  border-color: var(--viso-primary-dark) !important;
  box-shadow: 0 4px 16px rgba(24, 103, 255, 0.25) !important;
}

.btn-outline-primary {
  border-color: var(--viso-primary) !important;
  color: var(--viso-primary) !important;
  background: transparent !important;
}

.btn-outline-primary:hover {
  background-color: var(--viso-primary) !important;
  color: #fff !important;
}

.viso-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--viso-primary);
  margin-bottom: 0.6rem;
}

.viso-section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.viso-section-title.light {
  color: var(--text-heading);
}

/* ── Scroll Reveal ────────────────────────────────────────── */
.viso-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.viso-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── JS Resilience Fallback ─────────────────────────────────── */
.no-js .viso-reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* ── PREMIUM LOADING OVERLAYS ────────────────────────────── */
#viso-splash,
#viso-splash-overlay,
#viso-preloader,
#viso-preloader-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--splash-bg, #050505);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.65s ease, visibility 0.65s ease;
  overflow: hidden;
}

#viso-splash.viso-splash--hidden,
#viso-splash-overlay.splash-hidden,
#viso-preloader-overlay.preloader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.viso-splash__brand {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  text-transform: uppercase;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.viso-splash__brand span {
  display: inline-block;
  background: linear-gradient(135deg, var(--viso-primary-light), var(--viso-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.viso-splash__brand div {
  overflow: hidden;
  display: inline-block;
}

.viso-splash__brand div i {
  display: inline-block;
  font-style: normal;
  transform: translateY(100%);
  opacity: 0;
  animation: splashTypeReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.viso-splash__brand div i:nth-child(2) {
  animation-delay: 0.1s;
}

@keyframes splashTypeReveal {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.viso-splash__loader {
  width: 180px;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: splashFadeIn 0.5s ease 0.8s forwards;
}

.viso-splash__loader-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--viso-primary), var(--viso-secondary));
  border-radius: 99px;
  box-shadow: 0 0 10px var(--viso-primary);
  animation: splashLoadLine 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes splashFadeIn {
  to {
    opacity: 1;
  }
}

@keyframes splashLoadLine {
  to {
    width: 100%;
  }
}

.viso-splash__footer {
  position: absolute;
  bottom: 2.5rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  opacity: 0;
  animation: splashFadeIn 1s ease 0.4s forwards;
}

.viso-splash__footer strong {
  color: rgba(255, 255, 255, 0.8);
}

.viso-splash__footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

.viso-splash__footer a:hover {
  color: var(--viso-primary-light);
}

/* ── BREADCRUMBS ──────────────────────────────────────────── */
.viso-breadcrumb-wrap {
  background: var(--viso-dark-2);
  border-bottom: 1px solid var(--border-color);
  padding: 0.6rem 0;
}

.viso-breadcrumb {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.viso-breadcrumb a {
  color: var(--text-main);
  text-decoration: none;
  transition: color var(--viso-transition);
}

.viso-breadcrumb a:hover {
  color: var(--viso-primary);
}

.viso-breadcrumb__sep {
  opacity: 0.3;
}

.viso-breadcrumb__current {
  color: var(--viso-primary);
}

/* ── PAGE HERO (Global Layout) ────────────────────────── */
.viso-page-hero {
  position: relative;
  background-color: var(--viso-dark);
  background-image: linear-gradient(to bottom, rgba(11, 17, 32, 0.45), rgba(11, 17, 32, 0.75)), url('https://picsum.photos/seed/bg-hero-global/1600/600');
  background-size: cover;
  background-position: center;
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.viso-page-hero .viso-section-title,
.viso-page-hero p.text-muted {
  color: #fff !important;
}

.viso-page-hero .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.7) !important;
}

.viso-page-hero .breadcrumb-item.active {
  color: var(--viso-primary-light) !important;
}

.viso-page-hero .breadcrumb-item+.breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.4) !important;
}

.viso-page-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: -200px;
  width: 500px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 103, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* -- MASONRY LAYOUT ----------------------------------------- */
.viso-masonry-grid {
  column-count: 1;
  column-gap: 1.25rem;
}

@media (min-width: 576px) {
  .viso-masonry-grid {
    column-count: 2;
  }
}

@media (min-width: 992px) {
  .viso-masonry-grid {
    column-count: 3;
  }
}

@media (min-width: 1200px) {
  .viso-masonry-grid {
    column-count: 4;
  }
}

.viso-masonry-item {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  display: inline-block;
  width: 100%;
}