/**
 * Arun Shijo - Custom Stylesheet & Design System
 * Inspired by vaisakh.dev & riyarose.online
 */

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

:root {
  --bg-dark: #07090e;
  --bg-card: rgba(15, 23, 42, 0.65);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(16, 185, 129, 0.4);
  --emerald-accent: #10b981;
  --cyan-accent: #06b6d4;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --mono-font: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #090d16;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
}

body {
  overflow-x: hidden;
  min-height: 100vh;
}

body.terminal-active {
  overflow: hidden;
}

/* Ambient Background Mesh */
.ambient-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(800px 500px at 10% 0%, rgba(16, 185, 129, 0.08), transparent 70%),
    radial-gradient(700px 500px at 90% 20%, rgba(6, 182, 212, 0.07), transparent 70%),
    radial-gradient(600px 400px at 50% 90%, rgba(16, 185, 129, 0.05), transparent 70%);
}

.ambient-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 80%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 80%);
}

/* Monospace font helper */
.font-mono {
  font-family: var(--mono-font) !important;
}

/* Floating Glass Cards */
.spot-card {
  position: relative;
  background: rgba(14, 20, 31, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.spot-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -15px rgba(16, 185, 129, 0.12);
}

/* Floating Profile ID Card */
.profile-id-card {
  background: linear-gradient(145deg, rgba(22, 32, 50, 0.75), rgba(11, 17, 28, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 40px -10px rgba(16, 185, 129, 0.15);
  backdrop-filter: blur(20px);
  position: relative;
}
.profile-id-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.5), transparent 40%, transparent 70%, rgba(6, 182, 212, 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Gradient Texts */
.text-gradient-emerald {
  background: linear-gradient(120deg, #ffffff 15%, #34d399 75%, #06b6d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Terminal Window Styles */
.terminal-window {
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9), 0 0 60px -15px rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 23, 0.88);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

.terminal-titlebar {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  display: inline-block;
}

.terminal-dot-red {
  background-color: #ff5f56;
}
.terminal-dot-yellow {
  background-color: #ffbd2e;
}
.terminal-dot-green {
  background-color: #27c93f;
}

/* Blinking Cursor */
.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background-color: #10b981;
  vertical-align: -2px;
  margin-left: 2px;
  animation: cursorBlink 1s infinite steps(1);
}

@keyframes cursorBlink {
  50% {
    opacity: 0;
  }
}

/* Pulse Glows */
@keyframes pulseSubtle {
  0%, 100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

.pulse-glow {
  animation: pulseSubtle 4s ease-in-out infinite;
}

/* Print Styles for CV */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .ambient-mesh,
  .ambient-grid,
  nav,
  #mode-switch-pill,
  #terminal-view,
  #welcome-modal,
  #toast-container,
  .no-print {
    display: none !important;
  }
  .spot-card,
  .profile-id-card {
    background: transparent !important;
    border: 1px solid #d1d5db !important;
    box-shadow: none !important;
    color: #000000 !important;
  }
  .text-gradient-emerald {
    color: #000000 !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
  }
  .text-zinc-400,
  .text-zinc-300,
  .text-zinc-500 {
    color: #4b5563 !important;
  }
  a {
    text-decoration: underline !important;
    color: #000000 !important;
  }
}
