/* ==========================================================================
   LAKSHAY DHOUNDIYAL - MODERN CREDENTIALS PORTFOLIO STYLES
   Design System: Glassmorphism, Modern Radial Gradients, Micro-Interactions
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties / Themes
   -------------------------------------------------------------------------- */
:root {
  /* Light Theme Variables */
  --bg-base: #f8fafc;
  --bg-gradient: radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 65%, rgba(6, 182, 212, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(244, 114, 182, 0.05) 0%, transparent 45%);
  --surface-card: rgba(255, 255, 255, 0.85);
  --surface-card-hover: #ffffff;
  --surface-card-border: rgba(226, 232, 240, 0.9);
  --surface-card-border-hover: rgba(99, 102, 241, 0.35);

  --nav-bg: rgba(255, 255, 255, 0.82);
  --nav-border: rgba(226, 232, 240, 0.8);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #94a3b8;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.15);
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #6366f1 50%, #8b5cf6 100%);

  /* Domain Color Palettes */
  --cyber-color: #ef4444;
  --cyber-bg: rgba(239, 68, 68, 0.08);
  --cyber-border: rgba(239, 68, 68, 0.2);
  --cyber-gradient: linear-gradient(135deg, #ef4444 0%, #f97316 100%);

  --ai-color: #8b5cf6;
  --ai-bg: rgba(139, 92, 246, 0.08);
  --ai-border: rgba(139, 92, 246, 0.2);
  --ai-gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);

  --web-color: #2563eb;
  --web-bg: rgba(37, 99, 235, 0.08);
  --web-border: rgba(37, 99, 235, 0.2);
  --web-gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);

  --cloud-color: #0d9488;
  --cloud-bg: rgba(13, 148, 136, 0.08);
  --cloud-border: rgba(13, 148, 136, 0.2);
  --cloud-gradient: linear-gradient(135deg, #0d9488 0%, #10b981 100%);

  --research-color: #f59e0b;
  --research-bg: rgba(245, 158, 11, 0.08);
  --research-border: rgba(245, 158, 11, 0.2);
  --research-gradient: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);

  --timeline-line: #cbd5e1;
  --input-bg: rgba(255, 255, 255, 0.95);
  --input-border: #cbd5e1;
  --input-focus-border: #6366f1;

  --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
  --shadow-hover: 0 20px 35px -5px rgba(37, 99, 235, 0.12), 0 10px 15px -5px rgba(0, 0, 0, 0.04);
}

body.dark-mode {
  /* Dark Theme Variables */
  --bg-base: #090d16;
  --bg-gradient: radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.14) 0%, transparent 40%),
    radial-gradient(circle at 85% 65%, rgba(6, 182, 212, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(139, 92, 246, 0.08) 0%, transparent 45%);
  --surface-card: rgba(15, 22, 36, 0.75);
  --surface-card-hover: rgba(21, 31, 50, 0.92);
  --surface-card-border: rgba(255, 255, 255, 0.07);
  --surface-card-border-hover: rgba(99, 102, 241, 0.45);

  --nav-bg: rgba(11, 16, 26, 0.82);
  --nav-border: rgba(255, 255, 255, 0.08);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --primary: #60a5fa;
  --primary-hover: #93c5fd;
  --primary-glow: rgba(96, 165, 250, 0.25);
  --accent-gradient: linear-gradient(135deg, #60a5fa 0%, #818cf8 50%, #c084fc 100%);

  /* Domain Color Palettes in Dark Mode */
  --cyber-color: #f87171;
  --cyber-bg: rgba(248, 113, 113, 0.12);
  --cyber-border: rgba(248, 113, 113, 0.25);
  --cyber-gradient: linear-gradient(135deg, #ef4444 0%, #f97316 100%);

  --ai-color: #a78bfa;
  --ai-bg: rgba(167, 139, 250, 0.12);
  --ai-border: rgba(167, 139, 250, 0.25);
  --ai-gradient: linear-gradient(135deg, #8b5cf6 0%, #c084fc 100%);

  --web-color: #60a5fa;
  --web-bg: rgba(96, 165, 250, 0.12);
  --web-border: rgba(96, 165, 250, 0.25);
  --web-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);

  --cloud-color: #2dd4bf;
  --cloud-bg: rgba(45, 212, 191, 0.12);
  --cloud-border: rgba(45, 212, 191, 0.25);
  --cloud-gradient: linear-gradient(135deg, #14b8a6 0%, #10b981 100%);

  --research-color: #fbbf24;
  --research-bg: rgba(251, 191, 36, 0.12);
  --research-border: rgba(251, 191, 36, 0.25);
  --research-gradient: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);

  --timeline-line: #1e293b;
  --input-bg: rgba(15, 22, 36, 0.85);
  --input-border: rgba(255, 255, 255, 0.12);
  --input-focus-border: #818cf8;

  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.35), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 20px 35px -5px rgba(99, 102, 241, 0.25), 0 10px 15px -5px rgba(0, 0, 0, 0.4);
}

/* --------------------------------------------------------------------------
   2. Base & Reset
   -------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-base);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
  -webkit-font-smoothing: antialiased;
}

/* Subtle tech grid background pattern */
.tech-grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-size: 40px 40px;
  background-image: linear-gradient(to right, currentColor 1px, transparent 1px),
    linear-gradient(to bottom, currentColor 1px, transparent 1px);
}

body.dark-mode .tech-grid-bg {
  opacity: 0.05;
}

/* Ambient glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  transition: opacity 0.5s ease;
}

.glow-1 {
  top: -100px;
  left: -50px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.22), transparent 70%);
}

.glow-2 {
  top: 40%;
  right: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.18), transparent 70%);
}

.glow-3 {
  bottom: 50px;
  left: 20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 70%);
}

/* Main Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   3. Fast Smooth Preloader
   -------------------------------------------------------------------------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.preloader-hex {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: var(--accent-gradient);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
}

.preloader-initials {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.preloader-ring {
  position: absolute;
  inset: -6px;
  border-radius: 26px;
  border: 2px dashed rgba(99, 102, 241, 0.6);
  animation: preloaderSpin 3s linear infinite;
}

@keyframes preloaderSpin {
  to {
    transform: rotate(360deg);
  }
}

.preloader-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   4. Sticky Glass Navbar
   -------------------------------------------------------------------------- */
.site-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-monogram {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: transform 0.25s ease;
}

.brand-badge:hover .brand-monogram {
  transform: scale(1.06);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.brand-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
  animation: liveDotPulse 2s infinite;
}

@keyframes liveDotPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* View Switcher */
.view-switcher {
  display: flex;
  background: var(--surface-card);
  border: 1px solid var(--surface-card-border);
  padding: 3px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-btn i {
  font-size: 0.85rem;
}

.view-btn:hover {
  color: var(--text-main);
}

.view-btn.active {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
}

.toggle-track {
  width: 58px;
  height: 32px;
  border-radius: 16px;
  background: var(--surface-card);
  border: 1px solid var(--surface-card-border);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.sun-icon {
  font-size: 0.82rem;
  color: #f59e0b;
}

.moon-icon {
  font-size: 0.82rem;
  color: #818cf8;
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s;
}

body.dark-mode .toggle-thumb {
  transform: translateX(26px);
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  text-align: center;
  padding: 48px 0 32px;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--surface-card);
  border: 1px solid var(--surface-card-border);
  color: var(--primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 14px;
  color: var(--text-main);
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-subtitle strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
}

.metric-card {
  background: var(--surface-card);
  border: 1px solid var(--surface-card-border);
  border-radius: 16px;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--surface-card-border-hover);
  box-shadow: var(--shadow-hover);
}

.metric-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.metric-icon-box.cyber {
  background: var(--cyber-bg);
  color: var(--cyber-color);
}

.metric-icon-box.ai {
  background: var(--ai-bg);
  color: var(--ai-color);
}

.metric-icon-box.web {
  background: var(--web-bg);
  color: var(--web-color);
}

.metric-icon-box.cloud {
  background: var(--cloud-bg);
  color: var(--cloud-color);
}

.metric-data {
  text-align: left;
}

.metric-number {
  display: block;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.metric-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   6. Controls Section (Search & Category Filters)
   -------------------------------------------------------------------------- */
.controls-section {
  background: var(--surface-card);
  border: 1px solid var(--surface-card-border);
  border-radius: 20px;
  padding: 22px;
  margin: 28px 0 40px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-subtle);
  font-size: 1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 44px 14px 44px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.25s ease;
  outline: none;
}

.search-input:focus {
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-input::placeholder {
  color: var(--text-subtle);
}

.clear-search-btn {
  position: absolute;
  right: 130px;
  background: transparent;
  border: none;
  color: var(--text-subtle);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 6px;
  display: none;
}

.clear-search-btn:hover {
  color: var(--text-main);
}

.search-hint {
  position: absolute;
  right: 14px;
  font-size: 0.75rem;
  color: var(--text-subtle);
  pointer-events: none;
  font-weight: 500;
}

.search-hint kbd {
  background: var(--surface-card);
  border: 1px solid var(--surface-card-border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
}

/* Category Filters */
.filters-scroller {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 14px;
}

.filters-scroller::-webkit-scrollbar {
  display: none;
}

.filters-wrapper {
  display: flex;
  gap: 10px;
  min-width: max-content;
  padding: 2px 0;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 30px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--primary);
  color: var(--text-main);
}

.filter-pill.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.filter-count {
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

body.dark-mode .filter-count {
  background: rgba(255, 255, 255, 0.12);
}

.filter-pill.active .filter-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Results Info Bar */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--surface-card-border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.results-info strong {
  color: var(--text-main);
  font-weight: 700;
}

.reset-filters-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.reset-filters-btn:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   7. Timeline Layout & Animation
   -------------------------------------------------------------------------- */
.timeline-wrapper {
  position: relative;
  margin-bottom: 60px;
}

.timeline {
  position: relative;
  width: 100%;
}

/* Central Timeline Spine */
.timeline.timeline-layout .timeline-spine {
  position: absolute;
  top: 10px;
  bottom: 20px;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(180deg,
      #6366f1 0%,
      #06b6d4 25%,
      #10b981 50%,
      #f59e0b 75%,
      #ec4899 100%);
  border-radius: 2px;
  opacity: 0.8;
  z-index: 1;
}

/* Timeline Item Container */
.timeline.timeline-layout .timeline-item {
  display: flex;
  position: relative;
  margin-bottom: 44px;
  width: 100%;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline.timeline-layout .timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline.timeline-layout .timeline-item.hidden {
  display: none !important;
}

/* Even items on the left */
.timeline.timeline-layout .timeline-item.even {
  justify-content: flex-start;
}

.timeline.timeline-layout .timeline-item.even .timeline-item-content {
  margin-right: calc(50% + 30px);
}

/* Odd items on the right */
.timeline.timeline-layout .timeline-item.odd {
  justify-content: flex-end;
}

.timeline.timeline-layout .timeline-item.odd .timeline-item-content {
  margin-left: calc(50% + 30px);
}

/* Timeline Node & Pulsing Dot */
.timeline.timeline-layout .timeline-node {
  position: absolute;
  left: 50%;
  top: 28px;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.timeline-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #6366f1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
  transition: transform 0.25s ease;
}

body.dark-mode .timeline-dot {
  background: #0f172a;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.3);
}

.dot-inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366f1;
}

.dot-ping {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.25;
  animation: dotPingAnim 2.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes dotPingAnim {
  0% {
    transform: scale(0.8);
    opacity: 0.4;
  }

  80%,
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* Domain-tinted dots */
.timeline-dot.cyber {
  border-color: var(--cyber-color);
  box-shadow: 0 0 12px var(--cyber-color);
}

.timeline-dot.cyber .dot-inner {
  background: var(--cyber-color);
}

.timeline-dot.ai {
  border-color: var(--ai-color);
  box-shadow: 0 0 12px var(--ai-color);
}

.timeline-dot.ai .dot-inner {
  background: var(--ai-color);
}

.timeline-dot.web {
  border-color: var(--web-color);
  box-shadow: 0 0 12px var(--web-color);
}

.timeline-dot.web .dot-inner {
  background: var(--web-color);
}

.timeline-dot.cloud {
  border-color: var(--cloud-color);
  box-shadow: 0 0 12px var(--cloud-color);
}

.timeline-dot.cloud .dot-inner {
  background: var(--cloud-color);
}

.timeline-dot.research {
  border-color: var(--research-color);
  box-shadow: 0 0 12px var(--research-color);
}

.timeline-dot.research .dot-inner {
  background: var(--research-color);
}

/* --------------------------------------------------------------------------
   8. Modern Card Styling
   -------------------------------------------------------------------------- */
.timeline-item-content {
  width: calc(50% - 30px);
}

.card-modern {
  background: var(--surface-card);
  border: 1px solid var(--surface-card-border);
  border-radius: 18px;
  padding: 24px;
  position: relative;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden;
}

/* Subtle glowing accent stripe along top or left */
.card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0.7;
  transition: opacity 0.3s ease, height 0.3s ease;
}

.card-modern.domain-cyber::before {
  background: var(--cyber-gradient);
}

.card-modern.domain-ai::before {
  background: var(--ai-gradient);
}

.card-modern.domain-web::before {
  background: var(--web-gradient);
}

.card-modern.domain-cloud::before {
  background: var(--cloud-gradient);
}

.card-modern.domain-research::before {
  background: var(--research-gradient);
}

.card-modern:hover {
  transform: translateY(-5px);
  border-color: var(--surface-card-border-hover);
  box-shadow: var(--shadow-hover);
}

.card-modern:hover::before {
  opacity: 1;
  height: 4px;
}

/* Card Header */
.card-header {
  margin-bottom: 16px;
}

.company-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.company-monogram {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.company-monogram.cyber {
  background: var(--cyber-gradient);
}

.company-monogram.ai {
  background: var(--ai-gradient);
}

.company-monogram.web {
  background: var(--web-gradient);
}

.company-monogram.cloud {
  background: var(--cloud-gradient);
}

.company-monogram.research {
  background: var(--research-gradient);
}

.company-meta {
  flex: 1;
  min-width: 0;
}

.company-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.company-name h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
}

.verified-badge {
  font-size: 0.82rem;
  color: #10b981;
  flex-shrink: 0;
}

.role-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  letter-spacing: -0.2px;
}

/* Card Tags (Duration, Mode, Domain) */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--input-bg);
  border: 1px solid var(--surface-card-border);
  color: var(--text-muted);
}

.meta-tag i {
  font-size: 0.78rem;
}

/* Remote / Onsite status indicator */
.meta-tag.mode-tag.remote .status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.meta-tag.mode-tag.onsite .status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 6px #3b82f6;
}

/* Domain tag badges */
.meta-tag.domain-tag.cyber {
  background: var(--cyber-bg);
  border-color: var(--cyber-border);
  color: var(--cyber-color);
}

.meta-tag.domain-tag.ai {
  background: var(--ai-bg);
  border-color: var(--ai-border);
  color: var(--ai-color);
}

.meta-tag.domain-tag.web {
  background: var(--web-bg);
  border-color: var(--web-border);
  color: var(--web-color);
}

.meta-tag.domain-tag.cloud {
  background: var(--cloud-bg);
  border-color: var(--cloud-border);
  color: var(--cloud-color);
}

.meta-tag.domain-tag.research {
  background: var(--research-bg);
  border-color: var(--research-border);
  color: var(--research-color);
}

/* Card Actions (Document Buttons) */
.card-actions {
  border-top: 1px solid var(--surface-card-border);
  padding-top: 16px;
}

.cert-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.doc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* Certificate Button */
.doc-btn.cert-doc {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.25);
  border: none;
}

.doc-btn.cert-doc:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

/* LOR Button */
.doc-btn.lor-doc {
  background: var(--input-bg);
  border: 1px solid var(--primary);
  color: var(--primary);
}

.doc-btn.lor-doc:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

/* Other Button */
.doc-btn.other-doc {
  background: var(--input-bg);
  border: 1px solid var(--surface-card-border);
  color: var(--text-muted);
}

.doc-btn.other-doc:hover {
  border-color: var(--text-main);
  color: var(--text-main);
  transform: translateY(-2px);
}

.doc-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.4px;
}

.doc-btn.lor-doc .doc-pill,
.doc-btn.other-doc .doc-pill {
  background: rgba(0, 0, 0, 0.08);
}

body.dark-mode .doc-btn.lor-doc .doc-pill,
body.dark-mode .doc-btn.other-doc .doc-pill {
  background: rgba(255, 255, 255, 0.12);
}

.doc-requested-pill {
  font-size: 0.78rem;
  color: var(--text-subtle);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   9. Grid View Layout Mode
   -------------------------------------------------------------------------- */
.timeline.grid-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.timeline.grid-layout .timeline-spine,
.timeline.grid-layout .timeline-node {
  display: none !important;
}

.timeline.grid-layout .timeline-item {
  margin-bottom: 0;
  width: 100%;
}

.timeline.grid-layout .timeline-item.even .timeline-item-content,
.timeline.grid-layout .timeline-item.odd .timeline-item-content {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}

.timeline.grid-layout .card-modern {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.timeline.grid-layout .card-actions {
  margin-top: auto;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--surface-card);
  border: 1px dashed var(--surface-card-border);
  border-radius: 20px;
  max-width: 500px;
  margin: 40px auto;
}

.empty-icon {
  font-size: 3rem;
  color: var(--text-subtle);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

.reset-action-btn {
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
  transition: transform 0.2s ease;
}

.reset-action-btn:hover {
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   10. High-End Certificate Viewer Modal
   -------------------------------------------------------------------------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 15, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.modal-container {
  position: relative;
  z-index: 2;
  width: 95%;
  max-width: 1020px;
  max-height: 92vh;
  margin: auto;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-window {
  background: var(--bg-base);
  border: 1px solid var(--surface-card-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  max-height: 92vh;
}

/* Modal Header */
.modal-header {
  padding: 18px 24px;
  background: var(--surface-card);
  border-bottom: 1px solid var(--surface-card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-heading-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--accent-gradient);
  color: #ffffff;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--input-bg);
  border: 1px solid var(--surface-card-border);
  color: var(--text-main);
  transition: all 0.2s ease;
}

.modal-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.modal-action-btn.primary {
  background: var(--accent-gradient);
  border: none;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.modal-action-btn.primary:hover {
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--input-bg);
  border: 1px solid var(--surface-card-border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.modal-close-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  transform: rotate(90deg);
}

/* Modal Body */
.modal-body {
  padding: 16px;
  min-height: 480px;
  max-height: calc(92vh - 90px);
  overflow-y: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .modal-body {
  background: rgba(0, 0, 0, 0.35);
}

/* Loading Ring */
.modal-loading {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.loading-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(99, 102, 241, 0.15);
  border-top-color: var(--primary);
  animation: preloaderSpin 1s linear infinite;
}

/* Certificate Frame */
.certificate-frame {
  width: 100%;
  height: 75vh;
  min-height: 520px;
  border: none;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  display: none;
}

.certificate-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 12px;
  object-fit: contain;
  display: none;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Mobile Fallback Card */
.mobile-doc-card {
  text-align: center;
  padding: 32px 20px;
  max-width: 400px;
  margin: auto;
}

.mobile-doc-icon {
  font-size: 3.5rem;
  color: #ef4444;
  margin-bottom: 14px;
}

.mobile-doc-card h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.mobile-doc-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  line-height: 1.5;
}

.mobile-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  background: var(--accent-gradient);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

/* --------------------------------------------------------------------------
   11. Scroll To Top Floating Button
   -------------------------------------------------------------------------- */
.scroll-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-card);
  border: 1px solid var(--surface-card-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(12px);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.35);
  color: #ffffff;
  background: var(--accent-gradient);
  border-color: transparent;
}

.progress-ring {
  position: absolute;
  inset: 1px;
  transform: rotate(-90deg);
  pointer-events: none;
}

.progress-ring-bg {
  stroke: var(--surface-card-border);
}

.progress-ring-circle {
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-dasharray: 125.66;
  stroke-dashoffset: 125.66;
  transition: stroke-dashoffset 0.15s ease;
}

.scroll-top-btn:hover .progress-ring-circle {
  stroke: #ffffff;
}

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--surface-card-border);
  padding: 48px 0 36px;
  position: relative;
  margin-top: 60px;
}

.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-monogram {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-gradient);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.footer-lead {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.footer-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-sub {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   13. Responsive Breakpoints
   -------------------------------------------------------------------------- */

/* Large Tablets & Small Desktops (max-width: 992px) */
@media (max-width: 992px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline.timeline-layout .timeline-spine {
    left: 28px;
    transform: none;
  }

  .timeline.timeline-layout .timeline-node {
    left: 28px;
    transform: translate(-50%, -50%);
  }

  .timeline.timeline-layout .timeline-item.even,
  .timeline.timeline-layout .timeline-item.odd {
    justify-content: flex-start;
  }

  .timeline.timeline-layout .timeline-item.even .timeline-item-content,
  .timeline.timeline-layout .timeline-item.odd .timeline-item-content {
    margin-left: 60px;
    margin-right: 0;
    width: calc(100% - 60px);
  }
}

/* Tablets (max-width: 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .site-navbar {
    padding: 0;
  }

  .nav-container {
    padding: 10px 16px;
  }

  .brand-name {
    font-size: 0.95rem;
  }

  .brand-tag {
    display: none;
  }

  .view-btn .btn-text {
    display: none;
  }

  .view-btn {
    padding: 6px 10px;
  }

  .hero-section {
    padding: 32px 0 20px;
  }

  .controls-section {
    padding: 16px;
    margin: 20px 0 30px;
  }

  .search-hint {
    display: none;
  }

  .timeline.grid-layout {
    grid-template-columns: 1fr;
  }

  .modal-actions .btn-text {
    display: none;
  }

  .modal-action-btn {
    padding: 8px 10px;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .certificate-frame {
    height: 65vh;
    min-height: 380px;
  }

  .scroll-top-btn {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}

/* Mobile Screens (max-width: 540px) */
@media (max-width: 540px) {
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .metric-card {
    padding: 14px;
  }

  .timeline.timeline-layout .timeline-spine {
    left: 18px;
  }

  .timeline.timeline-layout .timeline-node {
    left: 18px;
  }

  .timeline.timeline-layout .timeline-item.even .timeline-item-content,
  .timeline.timeline-layout .timeline-item.odd .timeline-item-content {
    margin-left: 42px;
    width: calc(100% - 42px);
    padding: 18px 16px;
  }

  .company-brand {
    gap: 10px;
  }

  .company-monogram {
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
    border-radius: 12px;
  }

  .role-title {
    font-size: 1.05rem;
  }

  .doc-btn {
    padding: 7px 12px;
    font-size: 0.8rem;
  }
}
