:root {
  --bg: #070708; /* Deep rich near-black */
  --bg-2: #0e0e10;
  --card: rgba(255, 255, 255, 0.02);
  --card-border: rgba(255, 255, 255, 0.06);
  --text: #F4F1EB;
  --text-dim: #BDB9B0;
  --text-mute: #6b6860;
  --accent: #E8987B;
  --green: #A3D9A3;
  --grad: linear-gradient(135deg, #F4F1EB 0%, #BDB9B0 100%);

  /* brand colors */
  --b-nodiens: #B794F4;       /* purple */
  --b-thunderpick: #5EC2F0;   /* light blue */
  --b-crashino: #8B5CF6;      /* dark purple */
  --b-mbit: #FACC15;          /* yellow */
  --b-nodepay: #FB923C;       /* orange */
  --b-groovy: #84E654;        /* neon green */
}

.b-nodiens     { color: var(--b-nodiens); }
.b-thunderpick { color: var(--b-thunderpick); }
.b-crashino    { color: var(--b-crashino); }
.b-mbit        { color: var(--b-mbit); }
.b-nodepay     { color: var(--b-nodepay); }
.b-groovy      { color: var(--b-groovy); }
.b-freelance   { color: var(--accent); }

.summary .b-nodiens,
.summary .b-thunderpick,
.summary .b-crashino,
.summary .b-mbit,
.summary .b-nodepay,
.summary .b-groovy {
  font-weight: 600;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: 
    radial-gradient(circle at 85% -15%, rgba(183, 148, 244, 0.09) 0%, transparent 40%),
    radial-gradient(circle at 10% 45%, rgba(94, 194, 240, 0.07) 0%, transparent 35%),
    radial-gradient(circle at 85% 95%, rgba(232, 152, 123, 0.07) 0%, transparent 40%),
    var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Interactive Grid overlay sitting between canvas and content */
.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  /* Soft spotlight centered on user mouse position */
  mask-image: radial-gradient(350px circle at var(--cursor-x, 50%) var(--cursor-y, 50%), black 15%, transparent 80%);
  -webkit-mask-image: radial-gradient(350px circle at var(--cursor-x, 50%) var(--cursor-y, 50%), black 15%, transparent 80%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  transition: opacity 0.6s ease;
}

/* Canvas Particle Background */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Glowing blobs replaced by highly efficient native CSS radial gradients on body to maximize performance */

.wrap {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 56px 0 56px;
}

/* ----- Top nav strip ----- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 56px;
  opacity: 0;
  transform: translateY(-10px);
  animation: fade-down 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.2s;
  will-change: transform, opacity;
}
@keyframes fade-down {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.topbar .left { display: flex; gap: 24px; align-items: center; }
.topbar .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 8px var(--green), 0 0 15px var(--green);
  animation: pulse-glow 2s infinite;
}
@keyframes pulse-glow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 6px var(--green), 0 0 12px var(--green);
  }
  50% {
    transform: scale(1.25);
    box-shadow: 0 0 12px var(--green), 0 0 24px var(--green);
  }
}
.topbar .status { color: var(--green); }
.topbar a {
  color: var(--text-mute);
  text-decoration: none;
  transition: color .2s, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}
.topbar a:hover { color: var(--text); }

/* ----- Header / Hero ----- */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--card-border);
}

.hero-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid var(--card-border);
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.3s;
  will-change: transform;
  flex-shrink: 0;
}

.profile-avatar:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(232, 152, 123, 0.25);
  transform: scale(1.05) rotate(4deg);
}

/* Text reveal structures */
.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 84px;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--text);
}
.letter-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.25em;
  margin-bottom: -0.25em;
}
.letter {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s, text-shadow 0.3s;
  cursor: default;
  will-change: transform;
}
.letter:hover {
  color: var(--accent);
  text-shadow: 0 0 15px rgba(232, 152, 123, 0.35);
  transform: translateY(-4px) scale(1.05);
  transition: transform 0.1s ease-out, color 0.1s;
}

.hero .role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 16px;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(10px);
  animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.5s;
}
.hero .role span { color: var(--text); }
.hero .role .sep { color: var(--text-mute); margin: 0 10px; }

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.9;
  color: var(--text-dim);
}
.contact div {
  opacity: 0;
  transform: translateY(10px);
  animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.contact div:nth-child(1) { animation-delay: 0.5s; }
.contact div:nth-child(2) { animation-delay: 0.6s; }
.contact div:nth-child(3) { animation-delay: 0.7s; }
.contact div:nth-child(4) { animation-delay: 0.8s; }

.contact .label {
  color: var(--text-mute);
  font-size: 11px;
  margin-right: 8px;
  font-family: 'Inter', sans-serif;
}
.contact a {
  color: var(--text);
  text-decoration: none;
  transition: color .2s, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}
.contact a:hover { color: var(--accent); }

/* ----- Section labels ----- */
.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 18px;
  font-weight: 500;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.section-label .count {
  color: var(--text-mute);
  margin-left: auto;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
}

/* ----- Scroll Reveal System ----- */
.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Summary ----- */
.summary {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  max-width: 920px;
  margin-bottom: 56px;
  font-weight: 300;
}
.summary strong {
  color: var(--text);
  font-weight: 600;
}

/* ----- Experience ----- */
.experience { margin-bottom: 48px; }

.exp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Job Cards with 3D perspective and Cursor Glow Border */
.job {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px 22px;
  position: relative;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, transform 0.15s ease-out, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  --glow-color: rgba(232, 152, 123, 0.18); /* Default brand-agnostic glow */
  will-change: transform;
}
.job:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

/* Dynamic brand-specific card glow colors */
.job:has(.b-thunderpick) { --glow-color: rgba(94, 194, 240, 0.26); }
.job:has(.b-nodiens)     { --glow-color: rgba(183, 148, 244, 0.26); }
.job:has(.b-mbit)        { --glow-color: rgba(250, 204, 21, 0.24); }
.job:has(.b-crashino)    { --glow-color: rgba(139, 92, 246, 0.26); }
.job:has(.b-nodepay)     { --glow-color: rgba(251, 146, 60, 0.26); }
.job:has(.b-groovy)      { --glow-color: rgba(132, 230, 84, 0.26); }

/* Inner elements translated forward for 3D depth */
.job-head, .job ul {
  transform: translateZ(12px);
}

/* Glowing border mask following card-specific color variable */
.job::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 14px;
  padding: 1px;
  background: radial-gradient(220px circle at var(--mx, 0px) var(--my, 0px), var(--glow-color) 0%, transparent 65%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 3;
}
.job:hover::after {
  opacity: 1;
}

.job.current::before {
  content: '';
  position: absolute;
  top: 18px; right: 18px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
  z-index: 4;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(163, 217, 163, 0.5); }
  50% { opacity: 0.4; box-shadow: 0 0 0 6px rgba(163, 217, 163, 0); }
}

.job-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
  gap: 12px;
}
.job-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.job-company {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  flex-shrink: 0;
  overflow: hidden;
  background: #0a0a08;
}
.brand-logo svg { width: 100%; height: 100%; display: block; }
.marquee-item .brand-logo { width: 28px; height: 28px; border-radius: 7px; }
.job-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.08em;
  white-space: nowrap;
  padding-top: 4px;
}

.job ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.job li {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
  padding: 3px 0 3px 14px;
  position: relative;
}
.job li::before {
  content: '';
  position: absolute;
  left: 0; top: 11px;
  width: 5px; height: 1px;
  background: rgba(255, 255, 255, 0.4);
}
.job li strong {
  color: var(--text);
  font-weight: 600;
}
.metric {
  color: var(--text);
  font-weight: 600;
}

/* ----- Skills + Certs ----- */
.bottom-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 6px 12px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  color: var(--text-dim);
  background: var(--card);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pill:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
}
.pill.cert {
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
}

/* ----- Logo Marquee ----- */
.marquee-wrap {
  position: relative;
  margin: 48px -56px 0 -56px;
  padding: 28px 0;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.01);
  overflow: hidden;
}
.marquee-wrap::before,
.marquee-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.marquee-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg) 30%, transparent);
}
.marquee-wrap::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg) 30%, transparent);
}
.marquee-label {
  position: absolute;
  top: 8px; left: 56px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
  z-index: 3;
}
.marquee {
  display: flex;
  width: max-content;
  animation: scroll 34s linear infinite;
  margin-top: 12px;
}
.marquee-wrap:hover .marquee {
  animation-play-state: paused;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0 40px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s, filter 0.3s;
  opacity: 0.75;
}
.marquee-item:hover {
  opacity: 1;
  transform: scale(1.04);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}
.marquee-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.marquee-logo svg { width: 100%; height: 100%; display: block; }
.marquee-item .dot-sep {
  color: var(--text-mute);
  margin: 0 4px;
  font-size: 8px;
}

/* ----- Footer ----- */
footer {
  padding: 36px 56px 48px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  position: relative;
  z-index: 2;
}
footer span { color: var(--accent); }

/* ----- Print / narrow ----- */
@media (max-width: 900px) {
  .wrap { padding: 28px; }
  .hero { grid-template-columns: 1fr; align-items: flex-start; }
  .hero h1 { font-size: 56px; }
  .contact { text-align: left; }
  .exp-grid { grid-template-columns: 1fr; }
  .bottom-grid { grid-template-columns: 1fr; gap: 28px; }
  .marquee-wrap { margin: 28px -28px 0 -28px; }

  /* Disable heavy rendering filters on touch/mobile screens to keep scrolling at 60 FPS */
  .job {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.025);
  }

  .reveal {
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  }

  .hero-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .profile-avatar {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 480px) {
  .wrap { padding: 20px 20px 0 20px; }
  .hero h1 { font-size: 38px; }
  .hero .role { font-size: 11px; margin-top: 12px; }
  .contact { font-size: 11px; line-height: 2.1; }
  .topbar { margin-bottom: 36px; }
  .marquee-wrap { margin: 28px -20px 0 -20px; }
  .marquee-item { font-size: 18px; padding: 0 20px; }
  .marquee-logo { width: 28px; height: 28px; }
  footer { padding: 28px 20px 36px; }

  .profile-avatar {
    width: 70px;
    height: 70px;
  }
}
