/* ==========================================================================
   VAIBHAV JAIN PORTFOLIO - CORE DESIGN SYSTEM & STYLESHEET
   Aesthetics: Futuristic Glassmorphism, Neon Accents, Cybernetic AI & Modern Engineering Theme
   ========================================================================== */

:root {
  /* Dark Mode Color Palette (Default) */
  --bg: #070B14;
  --bg-subtle: #0D1527;
  --ink: #F8FAFC;
  --ink-secondary: #CBD5E1;
  --muted: #8F9EB3;
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(0, 240, 255, 0.35);
  --card-bg: rgba(14, 23, 42, 0.62);
  --card-hover-bg: rgba(18, 30, 56, 0.75);
  
  /* Brand Accents */
  --accent: #00F0FF;
  --accent-rgb: 0, 240, 255;
  --purple: #8B5CF6;
  --purple-rgb: 139, 92, 246;
  --emerald: #10B981;
  --emerald-rgb: 16, 185, 129;
  --warn: #FF3366;
  --warn-rgb: 255, 51, 102;
  --amber: #F59E0B;

  /* Typography */
  --font-head: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Monaco, Consolas, monospace;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-med: 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg: #F8FAFC;
  --bg-subtle: #EDF2F7;
  --ink: #0F172A;
  --ink-secondary: #334155;
  --muted: #64748B;
  --border: rgba(15, 23, 42, 0.1);
  --border-hover: rgba(14, 116, 144, 0.4);
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-hover-bg: rgba(255, 255, 255, 0.95);
  --accent: #0891B2;
  --accent-rgb: 8, 145, 178;
  --purple: #6D28D9;
  --purple-rgb: 109, 40, 217;
  --emerald: #059669;
  --emerald-rgb: 5, 150, 105;
  --warn: #E11D48;
  --warn-rgb: 225, 29, 72;
  --amber: #D97706;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color var(--transition-med), color var(--transition-med);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Canvas & Interactive Spotlight */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.cursor-spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    650px circle at var(--spot-x, 50%) var(--spot-y, 30%),
    rgba(var(--accent-rgb), 0.08),
    transparent 65%
  );
  transition: opacity 0.3s ease;
}

/* Top Scroll Progress Bar */
#scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--accent), var(--purple), var(--emerald));
  z-index: 100;
  pointer-events: none;
}

/* Layout Wrappers */
.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

/* NAVIGATION */
.nav-wrapper {
  position: sticky;
  top: 0.85rem;
  z-index: 80;
  max-width: 72rem;
  margin: 0.85rem auto 0;
  padding: 0 1.25rem;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.8rem 0.6rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: rgba(var(--bg), 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.24);
  transition: border-color var(--transition-fast);
}

.nav-container:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-badge {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: #050B14;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.nav-contact-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--ink) !important;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle-btn {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--ink);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1rem;
}

.theme-toggle-btn:hover {
  border-color: var(--accent);
  transform: rotate(15deg);
}

.mobile-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0.45rem;
  transition: all var(--transition-fast);
}

.mobile-toggle-btn span {
  display: block;
  height: 2px;
  width: 19px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-toggle-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle-btn.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* HERO SECTION */
.hero-section {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4.5rem 0 3.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  width: fit-content;
  backdrop-filter: blur(12px);
  margin-bottom: 1.25rem;
}

.radar-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(var(--emerald-rgb), 0.7);
  animation: radarPulse 2s infinite;
}

@keyframes radarPulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--emerald-rgb), 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(var(--emerald-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--emerald-rgb), 0); }
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(3.2rem, 9.5vw, 6.8rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0.5rem 0 1rem;
  color: var(--ink);
}

.hero-title .name-word {
  display: inline-block;
  white-space: nowrap;
}

.hero-title .letter-char {
  display: inline-block;
  color: var(--ink);
  transition: transform 0.25s ease, color 0.25s ease;
}

.hero-title .letter-char:hover {
  color: var(--accent);
  transform: translateY(-4px);
}

@keyframes riseUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-typewriter-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-size: clamp(1.35rem, 3.4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--ink-secondary);
}

.type-dynamic {
  background: linear-gradient(90deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  min-height: 1.3em;
}

.type-caret {
  display: inline-block;
  width: 3px;
  height: 1.15em;
  background: var(--accent);
  margin-left: 2px;
  animation: blink 0.9s infinite;
  vertical-align: middle;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-lede {
  max-width: 44rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.7;
  margin-bottom: 2.2rem;
}

.hero-lede strong {
  color: var(--ink);
  font-weight: 600;
}

/* BUTTONS */
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.96rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--ink);
  backdrop-filter: blur(8px);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px rgba(var(--accent-rgb), 0.3);
  border-color: rgba(var(--accent-rgb), 0.4);
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--purple));
  color: #050B14 !important;
  border: none;
  font-weight: 700;
}

.btn-primary:hover {
  box-shadow: 0 14px 32px -8px rgba(var(--accent-rgb), 0.5);
}

.btn-secondary:hover {
  background: var(--card-hover-bg);
}

.btn-danger {
  background: rgba(var(--warn-rgb), 0.15);
  border-color: rgba(var(--warn-rgb), 0.4);
  color: var(--warn);
}

.btn-danger:hover {
  background: var(--warn);
  color: #fff;
  box-shadow: 0 12px 28px -8px rgba(var(--warn-rgb), 0.5);
}

.btn-warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--amber);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.btn-sm {
  padding: 0.48rem 0.95rem;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* METRICS GRID */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.25rem;
  margin-top: 3.5rem;
}

.metric-card {
  border-left: 2px solid var(--border);
  padding: 0.5rem 0 0.5rem 1.25rem;
  transition: border-color var(--transition-fast);
}

.metric-card:hover {
  border-color: var(--accent);
}

.metric-number-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  font-family: var(--font-head);
  font-size: clamp(2rem, 3.8vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.metric-suffix {
  font-size: 0.55em;
  color: var(--accent);
  font-weight: 700;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.35rem;
}

/* SECTION STRUCTURE */
.section-container {
  padding: 5.5rem 0;
}

.section-header {
  margin-bottom: 2.8rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.section-desc {
  max-width: 44rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* INTERACTIVE PIPELINE SIMULATION BOARD */
.pipeline-board {
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.4);
}

.pipeline-lane-container {
  position: relative;
  margin: 1.5rem 0 2.5rem;
  padding: 1rem 0;
}

.pipeline-track-line {
  position: absolute;
  left: 12.5%;
  right: 12.5%;
  top: 40px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  z-index: 1;
}

.pipeline-nodes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
  z-index: 2;
}

.pipeline-node {
  text-align: center;
  padding: 0 0.5rem;
  transition: transform var(--transition-fast);
}

.node-icon-circle {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  font-size: 1.35rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.pipeline-node.node-hit .node-icon-circle {
  border-color: var(--emerald);
  box-shadow: 0 0 22px rgba(var(--emerald-rgb), 0.6);
  transform: scale(1.12);
}

.pipeline-node.node-threat .node-icon-circle {
  border-color: var(--warn);
  box-shadow: 0 0 24px rgba(var(--warn-rgb), 0.7);
  transform: scale(1.15);
}

.pipeline-node.node-throttled .node-icon-circle {
  border-color: var(--amber);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
  transform: scale(1.1);
}

.node-title {
  display: block;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.node-sub {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* Flying Packet Element */
.flying-packet {
  position: absolute;
  top: 33px;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
  pointer-events: none;
  z-index: 5;
}

.flying-packet.packet-threat {
  background: var(--warn);
  box-shadow: 0 0 20px var(--warn);
}

.pipeline-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

/* Terminal Console Log */
.pipeline-terminal {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #040810;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #FF5F56; }
.dot-yellow { background: #FFBD2E; }
.dot-green { background: #27C93F; }

.terminal-title {
  color: var(--muted);
}

.terminal-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--emerald);
  font-weight: 600;
}

.pulse-emerald {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
  animation: radarPulse 1.8s infinite;
}

.terminal-body {
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: #94A3B8;
  max-height: 12rem;
  min-height: 9rem;
  overflow-y: auto;
}

.log-row {
  animation: slideInUp 0.25s ease forwards;
}

.log-row.log-ok { color: var(--emerald); }
.log-row.log-warn { color: var(--warn); }
.log-row.log-throttled { color: var(--amber); }
.log-row.log-sys { color: var(--accent); }

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* PROJECTS GRID & 3D TILT CARDS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  position: relative;
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform-style: preserve-3d;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  will-change: transform;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    400px circle at var(--mx, 50%) var(--my, 0%),
    rgba(var(--accent-rgb), 0.16),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.project-card:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
}

.project-card:hover::before {
  opacity: 1;
}

.card-flagship {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.05) 0%, var(--card-bg) 60%);
  border-color: rgba(var(--accent-rgb), 0.25);
}

.project-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.project-category {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.project-title {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}

.project-summary {
  color: var(--ink-secondary);
  font-size: 0.98rem;
  margin-bottom: 0.85rem;
}

.project-bullets {
  list-style: none;
  padding: 0;
  margin: 0.85rem 0 1.25rem;
}

.project-bullets li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
  line-height: 1.55;
}

.project-bullets li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.project-tags, .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.1rem 0;
}

.tag {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.24rem 0.68rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.project-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.link-arrow:hover {
  color: var(--ink);
  transform: translateX(3px);
}

/* PRINCIPLES GRID */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.35rem;
}

.principle-card {
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.principle-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), 0.4);
}

.principle-number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.principle-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.principle-text {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
}

/* EXPERIENCE TIMELINE */
.timeline-wrapper {
  position: relative;
  padding-left: 2rem;
  margin-top: 1.5rem;
}

.timeline-wrapper::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.75rem;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.2rem;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 0.55rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.2);
}

.timeline-card {
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color var(--transition-fast);
}

.timeline-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
}

.timeline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
}

.timeline-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.timeline-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}

.timeline-company {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-secondary);
  margin-bottom: 0.65rem;
}

.timeline-desc {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
}

/* SKILLS MATRIX & FILTER TABS */
.skills-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 2rem;
}

.skill-tab {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--muted);
  padding: 0.48rem 1.1rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.skill-tab:hover {
  color: var(--ink);
  border-color: rgba(var(--accent-rgb), 0.35);
}

.skill-tab.active {
  background: linear-gradient(120deg, var(--accent), var(--purple));
  color: #050B14;
  border-color: transparent;
  font-weight: 700;
}

.skills-chips-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.skill-chip {
  padding: 0.55rem 1.05rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}

.skill-chip:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 6px 18px -4px rgba(var(--accent-rgb), 0.2);
}

.skill-chip.chip-dimmed {
  opacity: 0.18;
  transform: scale(0.94);
  filter: grayscale(1);
  pointer-events: none;
}

/* CONTACT SECTION & SECURE FORM */
.contact-section {
  padding-bottom: 6rem;
}

.contact-box {
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.contact-inner {
  max-width: 38rem;
  margin: 0 auto;
}

.contact-headline {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0.8rem 0;
}

.contact-sub {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
}

.email-display-wrap {
  margin: 1.5rem 0 2rem;
}

.email-link {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: all var(--transition-fast);
  word-break: break-all;
}

.email-link:hover {
  background: linear-gradient(90deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.contact-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

/* Secure Quick Contact Form */
.quick-form-wrapper {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: left;
}

.secure-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.form-status {
  font-size: 0.88rem;
  min-height: 1.4em;
  margin-top: 0.4rem;
  text-align: center;
  font-weight: 500;
}

/* FOOTER */
.footer-wrap {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  position: relative;
  z-index: 2;
  background: rgba(var(--bg), 0.85);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  display: block;
}

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

.security-badge-footer, .footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--emerald);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(var(--emerald-rgb), 0.1);
  border: 1px solid rgba(var(--emerald-rgb), 0.25);
}

.dot-ok {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
}

/* TOAST NOTIFICATION */
.toast-box {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 180%);
  background: var(--ink);
  color: var(--bg);
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.92rem;
  z-index: 120;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast-box.show {
  transform: translate(-50%, 0);
}

/* REVEAL ANIMATIONS */
.rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--d, 0s);
}

.rv.in {
  opacity: 1;
  transform: none;
}

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .card-flagship {
    grid-column: 1;
  }
  .pipeline-nodes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 0.5rem;
  }
  .pipeline-track-line {
    display: none;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  .wrap {
    padding: 0 1rem;
  }

  .nav-wrapper {
    padding: 0 0.8rem;
    position: sticky;
    top: 0.5rem;
    margin-top: 0.5rem;
  }

  .nav-container {
    padding: 0.5rem 0.75rem;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 0.5rem;
    right: 0.5rem;
    flex-direction: column;
    padding: 0.85rem;
    background-color: #070B14 !important;
    border: 1px solid rgba(0, 240, 255, 0.35) !important;
    border-radius: var(--radius-md);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95);
    gap: 0.35rem;
    z-index: 200;
  }

  [data-theme="light"] .nav-menu {
    background-color: #FFFFFF !important;
    border: 1px solid rgba(8, 145, 178, 0.35) !important;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.25);
  }

  .nav-menu.open {
    display: flex;
    animation: menuSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  @keyframes menuSlideDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-link {
    width: 100%;
    padding: 0.8rem 1rem;
    text-align: left;
    font-size: 0.98rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav-link:hover, .nav-link:active {
    background: rgba(0, 240, 255, 0.12);
    color: var(--accent);
  }

  .mobile-toggle-btn {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  .theme-toggle-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .hero-section {
    padding: 2.2rem 0 1.8rem;
    min-height: auto;
  }

  .hero-badge {
    font-size: 0.82rem;
    padding: 0.4rem 0.85rem;
    margin-bottom: 1.25rem;
    max-width: 100%;
    line-height: 1.4;
  }

  .hero-title {
    font-size: clamp(2.35rem, 11vw, 3.8rem);
    line-height: 1.1;
    word-break: normal;
    margin: 0.35rem 0 0.85rem;
  }

  .hero-typewriter-wrap {
    font-size: clamp(1.1rem, 4.6vw, 1.45rem);
    margin-bottom: 1rem;
  }

  .hero-lede {
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 1.8rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    width: 100%;
  }

  .hero-actions .btn:first-child {
    grid-column: 1 / -1;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 0.85rem;
    font-size: 0.9rem;
    min-height: 46px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    margin-top: 2rem;
  }

  .metric-card {
    padding: 1.25rem 0.9rem;
  }

  .metric-val {
    font-size: 1.9rem;
  }

  .metric-suffix {
    font-size: 1.2rem;
  }

  .metric-label {
    font-size: 0.82rem;
  }

  .pipeline-board {
    padding: 1.2rem 0.85rem;
  }

  .pipeline-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
  }

  .pipeline-toolbar .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    font-size: 0.88rem;
  }

  .terminal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
  }

  .terminal-title {
    font-size: 0.74rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
  }

  .terminal-status {
    font-size: 0.72rem;
    flex-shrink: 0;
  }

  .terminal-body {
    padding: 0.75rem;
    font-size: 0.76rem;
    max-height: 180px;
  }

  .log-row {
    word-break: break-word;
    line-height: 1.45;
    margin-bottom: 0.35rem;
  }

  .project-card {
    padding: 1.4rem 1.1rem;
  }

  .project-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .skills-filter-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding-bottom: 0.65rem;
    gap: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .skills-filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .skill-tab {
    flex-shrink: 0;
    padding: 0.52rem 1.1rem;
    font-size: 0.88rem;
    min-height: 40px;
  }

  .skills-chips-wrapper {
    gap: 0.5rem;
  }

  .skill-chip {
    padding: 0.48rem 0.85rem;
    font-size: 0.84rem;
  }

  .contact-box {
    padding: 2rem 1rem;
  }

  .contact-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    width: 100%;
  }

  .contact-actions .btn:first-child {
    grid-column: 1 / -1;
  }

  .contact-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 46px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Prevent automatic iOS Safari input zoom */
  .form-group input, 
  .form-group textarea {
    font-size: 16px !important;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
  }

  .btn-block {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
  }

  .email-link {
    font-size: clamp(1.18rem, 5.2vw, 1.7rem);
    word-break: break-all;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn:first-child {
    grid-column: auto;
  }

  .contact-actions {
    grid-template-columns: 1fr;
  }

  .contact-actions .btn:first-child {
    grid-column: auto;
  }

  .pipeline-nodes-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem 0.5rem;
  }

  .node-icon-circle {
    width: 48px;
    height: 48px;
    font-size: 1.15rem;
  }

  .node-title {
    font-size: 0.84rem;
  }

  .node-sub {
    font-size: 0.72rem;
  }
}

/* Accessibility / Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .rv {
    opacity: 1 !important;
    transform: none !important;
  }
}
