/* ===================================
   ROOT VARIABLES & RESET
=================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --primary-dark: #5b21b6;
  --secondary: #ec4899;
  --accent: #06b6d4;
  --bg: #0a0a0f;
  --bg-2: #0f0f1a;
  --bg-3: #141428;
  --surface: rgba(255,255,255,0.04);
  --surface-solid: rgba(255,255,255,0.05);
  --surface-hover: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-alt: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  --shadow: 0 25px 50px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(124,58,237,0.3);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --nav-h: 72px;
  --transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: clip;
  cursor: none;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: none; border: none; background: none; font-family: inherit; }

/* ===================================
   SCROLLBAR
=================================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* Custom cursor styling lives in the UPGRADED CURSOR block further down. */

/* ===================================
   NAVIGATION
=================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  z-index: 1000;
  transition: var(--transition);
}

.nav.scrolled {
  /* No backdrop-filter: it's a FIXED element over scrolling content, so the
     browser would re-blur the whole nav strip every scroll frame (major
     scroll jank). A more-opaque solid background reads the same here. */
  background: rgba(10,10,15,0.92);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-logo span { color: var(--primary); }

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  background: var(--gradient);
  color: #fff;
  padding: 0.55rem 1.4rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124,58,237,0.6);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: var(--transition);
}

.nav-toggle:hover {
  border-color: rgba(124,58,237,0.4);
  background: rgba(124,58,237,0.1);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10,10,15,0.98);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-h);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 0;
  list-style: none;
}

.mobile-menu a {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  transition: var(--transition);
  cursor: pointer;
}

.mobile-menu a:hover { color: var(--primary-light); }

.mobile-menu a.active {
  color: var(--primary-light);
  position: relative;
}

.mobile-menu a.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: var(--gradient);
  border-radius: 2px;
}

/* ===================================
   BUTTONS
=================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: none;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 24px rgba(124,58,237,0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(124,58,237,0.6);
}

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

.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--text);
  transform: translateY(-2px);
}

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

/* ===================================
   HERO SECTION
=================================== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  padding: var(--nav-h) clamp(1.5rem, 5vw, 4rem) 0;
  position: relative;
  overflow: clip;
}

/* Background blobs */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  will-change: transform;
}

.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
  animation: float 8s ease-in-out infinite;
  /* No `filter: blur()` — a radial-gradient IS a soft glow and costs a
     fraction of a live blur (which the GPU re-produced every frame across
     three animating blobs). The gradient paints once and just translates. */
  will-change: transform;
}

.blob-1 {
  width: 720px; height: 720px;
  background: radial-gradient(circle, var(--primary) 0%, rgba(124,58,237,0) 70%);
  top: -240px; left: -240px;
  animation-delay: 0s;
}

.blob-2 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--secondary) 0%, rgba(236,72,153,0) 70%);
  bottom: -180px; right: -120px;
  animation-delay: -3s;
}

.blob-3 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--accent) 0%, rgba(6,182,212,0) 70%);
  top: 50%; right: 30%;
  animation-delay: -6s;
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -30px, 0); }
}

/* When the hero is fully scrolled out of view, stop its decorative
   animations so the compositor isn't ticking off-screen layers while the
   rest of the page is being read (toggled by IntersectionObserver in JS). */
.hero.anim-paused .blob,
.hero.anim-paused .profile-circle,
.hero.anim-paused .floating-card,
.hero.anim-paused .role-cursor {
  animation-play-state: paused;
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
}

#gridCanvas {
  width: 100%;
  height: 100%;
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: fadeInLeft 0.9s 0.2s ease both;
}

.hero-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.5rem;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease forwards;
}

.badge-dot {
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 6px #22c55e;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.title-line {
  display: block;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.title-line:nth-child(1) { animation-delay: 0.1s; }
.title-line:nth-child(2) { animation-delay: 0.2s; }

.title-line.accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-roles {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  height: 2rem;
  animation: fadeInUp 0.8s 0.3s ease forwards;
  opacity: 0;
}

.role-dynamic {
  color: var(--primary-light);
  font-weight: 600;
}

.role-cursor {
  color: var(--primary);
  animation: blink 1s infinite;
}

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

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s 0.4s ease forwards;
  opacity: 0;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s 0.5s ease forwards;
  opacity: 0;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  animation: fadeInUp 0.8s 0.6s ease forwards;
  opacity: 0;
}

.stat { text-align: center; }

.stat-num {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  align-self: stretch;
  overflow: visible;
  min-height: 100vh;
  animation: fadeInRight 1s 0.5s cubic-bezier(0.22,1,0.36,1) both;
}

/* Large solid circle behind photo */
.profile-circle {
  position: absolute;
  width: clamp(420px, 52vw, 640px);
  height: clamp(420px, 52vw, 640px);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 55%, #8b46ff 0%, #6d28d9 40%, #4c1d95 75%, rgba(76,29,149,0.2) 100%);
  bottom: -60px;
  left: 60%;
  transform: translateX(-50%);
  z-index: 0;
  animation: circlePulse 7s ease-in-out infinite;
  will-change: transform;
}

@keyframes circlePulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50%       { transform: translateX(-50%) scale(1.04); }
}

/* Big profile photo — fills full column height */
.profile-img {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 55%;
  transform: translateX(-50%);
  height: 110vh;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  /* Drop-shadow blur on a 110vh image is expensive to rasterize; keep the
     blur modest and DON'T animate it on hover (that re-rasterizes the whole
     giant shadow every frame). */
  filter: drop-shadow(-8px 0 28px rgba(109,40,217,0.5));
  animation: profileSlideUp 1.1s 0.6s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes profileSlideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(80px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Floating Cards */
.floating-card {
  position: absolute;
  background: rgba(15,15,26,0.94);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 0.75rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 10;
  white-space: nowrap;
  animation: floatCard 4s ease-in-out infinite;
}

.floating-card svg { width: 28px; height: 28px; flex-shrink: 0; }

/* Left side of profile */
.card-figma {
  left: 0;
  top: 28%;
  animation-delay: 0s;
}

/* Right side of profile */
.card-code {
  right: 0;
  top: 10%;
  color: var(--accent);
  animation-delay: -1.5s;
}

/* Right side lower */
.card-social {
  right: 0;
  top: 60%;
  color: var(--secondary);
  animation-delay: -3s;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

/* Scroll Down */
.scroll-down {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-subtle);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeInUp 0.8s 1s ease forwards;
  opacity: 0;
}

.scroll-wheel {
  width: 22px; height: 36px;
  border: 2px solid var(--border);
  border-radius: 12px;
  position: relative;
}

.scroll-wheel::after {
  content: '';
  position: absolute;
  top: 5px; left: 50%;
  width: 4px; height: 8px;
  background: var(--primary);
  border-radius: 2px;
  animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
  0%   { transform: translateX(-50%) translateY(0);    opacity: 1; }
  80%  { transform: translateX(-50%) translateY(13px); opacity: 0; }
  100% { transform: translateX(-50%) translateY(0);    opacity: 0; }
}

/* ===================================
   SECTIONS COMMON
=================================== */
.section {
  padding: clamp(4rem, 8vw, 8rem) 0;
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.section-tag::before {
  content: '';
  width: 24px; height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-title.centered { text-align: center; }

.section-title .accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Reveal animations */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Subtle fade in/out for Featured Work cards — minimal motion, re-triggers on scroll */
[data-fade] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-fade].in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-fade] { transform: none; transition: opacity 0.4s ease; }
}

/* ===================================
   ABOUT SECTION
=================================== */
.about { background: var(--bg-2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  margin-top: 2rem;
}

.about-text {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about-text strong { color: var(--text); font-weight: 600; }

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.tag {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.tag:hover {
  background: rgba(124,58,237,0.15);
  border-color: rgba(124,58,237,0.4);
  color: var(--primary-light);
}

.about-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.info-card {
  padding: 2rem;
  border-radius: var(--radius);
  transition: var(--transition);
  border-top: 2px solid rgba(124,58,237,0.2);
}

.info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124,58,237,0.3);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.info-icon {
  width: 2.75rem;
  height: 2.75rem;
  background: rgba(124,58,237,0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.info-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  stroke: var(--primary-light);
}

.info-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.info-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===================================
   ABOUT & SKILLS (merged compact section)
=================================== */
.about-skills-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-top: 2.5rem;
}

.about-skills-bio {}

.about-skills-chips {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.sk-chips-group {}

.sk-cat-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin-bottom: 0.65rem;
}

/* Glass effect — solid translucent panel (no live backdrop blur).
   backdrop-filter re-blurs everything behind the element on every scroll
   frame; with ~18 of these on the page it was the main scroll-jank source.
   A slightly-more-opaque flat surface reads almost identically over the
   dark background and composites essentially for free. */
.glass {
  background: var(--surface-solid);
  border: 1px solid var(--border);
}

/* ===================================
   SKILLS SECTION
=================================== */
.skills { background: var(--bg); }

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}

.skill-category:hover {
  border-color: rgba(124,58,237,0.3);
  box-shadow: var(--shadow-glow);
}

.full-width { grid-column: span 2; }

.skill-cat-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-cat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-cat-icon svg { stroke: var(--primary-light); }

.sk-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.sk-chip {
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.18);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
}

.sk-chip:hover {
  background: rgba(124,58,237,0.2);
  border-color: rgba(124,58,237,0.45);
  color: var(--primary-light);
  transform: translateY(-2px);
}

/* .skill-fill removed — replaced by .sk-chip approach */

.tool-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill {
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.2);
  padding: 0.45rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--primary-light);
  font-weight: 500;
  transition: var(--transition);
  cursor: default;
}

.pill:hover {
  background: rgba(124,58,237,0.25);
  border-color: rgba(124,58,237,0.5);
  transform: translateY(-2px);
}

/* ===================================
   EXPERIENCE SECTION
=================================== */
.experience {
  background: var(--bg-2);
}

.timeline {
  position: relative;
  margin-top: 4rem;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary), transparent);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 3rem;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 1.5rem;
  transform: translateX(-50%);
  width: 16px; height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-dot-inner {
  width: 12px; height: 12px;
  background: var(--gradient);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg-2), 0 0 0 6px rgba(124,58,237,0.3);
}

.timeline-dot-inner.pulse {
  animation: pulse-timeline 2s ease-in-out infinite;
}

@keyframes pulse-timeline {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.timeline-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.timeline-card:hover {
  border-color: rgba(124,58,237,0.3);
  transform: translateX(4px);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.timeline-period {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.4rem;
}

.timeline-period.current { color: #22c55e; }

.timeline-role {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--primary-light);
  font-weight: 500;
}

.timeline-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.current-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.35);
  color: #22c55e;
}

/* Pulsing live indicator for the "Current" badge */
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}

/* Highlights inside experience descriptions */
.timeline-duties strong {
  color: var(--text);
  font-weight: 600;
}
.timeline-duties em {
  font-style: normal;
  color: var(--primary-light);
  font-weight: 500;
}

.timeline-duties {
  list-style: none;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-duties li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.6;
}

.timeline-duties li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary-light);
  font-size: 0.8rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exp-tag {
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.2);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  font-size: 0.78rem;
  color: var(--primary-light);
  font-weight: 500;
}

/* ===================================
   PROJECTS SECTION
=================================== */
.projects { background: var(--bg); }

.project-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2.5rem 0 3rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: opacity 0.6s ease, transform 0.3s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  /* NOTE: no permanent `will-change` here. Leaving it on permanently forces
     every card onto its own GPU layer, which across all cards exhausts the
     compositor and lags the page. Promote only while hovering (below). */
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(124,58,237,0.4);
  will-change: transform;
}

.project-card.featured {
  grid-row: span 1;
}

.project-img {
  height: 200px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

/* Real project image covers */
.project-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}
.project-card:hover .project-cover {
  transform: scale(1.06);
  will-change: transform;
}
.project-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.65) 100%);
  pointer-events: none;
}

.featured-label {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(30,20,50,0.72);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}

/* Project mockups */
.project-mockup { pointer-events: none; }

.mock-browser {
  width: 240px;
  background: rgba(0,0,0,0.4);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
}

.mock-dots {
  background: rgba(0,0,0,0.3);
  padding: 6px 10px;
  display: flex;
  gap: 5px;
}

.mock-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
}

.mock-content { padding: 10px; }

.mock-nav {
  height: 10px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  margin-bottom: 8px;
}

.mock-hero {
  height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  margin-bottom: 8px;
}

.mock-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.mock-cards div {
  height: 25px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

.mock-blog-header {
  height: 30px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  margin-bottom: 8px;
}

.mock-blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.mock-blog-grid div {
  height: 35px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

.mock-form-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mock-input {
  height: 12px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}

.mock-input.short { width: 60%; }

.mock-btn-area {
  height: 18px;
  background: rgba(255,255,255,0.3);
  border-radius: 6px;
  width: 80%;
  margin-top: 4px;
}

.mock-mobile {
  width: 120px;
  height: 200px;
  background: rgba(0,0,0,0.4);
  border-radius: 16px;
  padding: 8px 6px;
  border: 1px solid rgba(255,255,255,0.2);
}

.mock-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mock-status {
  height: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  width: 60%;
  margin: 0 auto;
}

.mock-app-hero {
  height: 60px;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  flex-shrink: 0;
}

.mock-app-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.mock-app-list div {
  height: 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

.project-body { padding: 1.5rem; }

.project-type {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.project-tech span {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.proj-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-light);
  transition: var(--transition);
}

.proj-link.ghost {
  color: var(--text-subtle);
}

.proj-link:hover { color: var(--text); }
.proj-link.ghost:hover { color: var(--text-muted); }

.project-card.hidden { display: none; }

/* ===================================
   CONTACT SECTION
=================================== */
.contact { background: var(--bg-2); }

.contact-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  text-align: center;
  max-width: 480px;
  margin: 0 auto 4rem;
  line-height: 1.7;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
  align-items: start;
}

.contact-grid > * { min-width: 0; }

.contact-card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
}

.contact-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.reach-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: #10b981;
  font-weight: 600;
}

.status-dot {
  width: 8px; height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.reach-sub {
  font-size: 0.88rem;
  color: var(--text-subtle);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-icon {
  width: 40px; height: 40px;
  background: rgba(124,58,237,0.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 18px; height: 18px;
  stroke: var(--primary-light);
}

.c-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.c-value {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
  overflow-wrap: break-word;
  word-break: break-all;
}

a.c-value:hover { color: var(--primary-light); }

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-btn {
  width: 42px; height: 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.social-btn svg { width: 18px; height: 18px; }

.social-btn:hover {
  background: rgba(124,58,237,0.2);
  border-color: rgba(124,58,237,0.4);
  color: var(--primary-light);
  transform: translateY(-3px);
}

/* Simplified Social Icons Row */
.social-icons-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.soc-btn {
  width: 42px; height: 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
  text-decoration: none;
}

.soc-btn svg { width: 17px; height: 17px; }

.soc-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }

.soc-linkedin:hover { background: rgba(10,102,194,0.15); border-color: rgba(10,102,194,0.4); color: #4da6ff; }
.soc-linkedin:hover svg { fill: #4da6ff; }
.soc-github:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); color: var(--text); }
.soc-github:hover svg { fill: var(--text); }
.soc-instagram:hover { background: rgba(225,48,108,0.12); border-color: rgba(225,48,108,0.35); color: #f472b6; }
.soc-instagram:hover svg { stroke: #f472b6; }
.soc-facebook:hover { background: rgba(24,119,242,0.12); border-color: rgba(24,119,242,0.35); color: #60a5fa; }
.soc-facebook:hover svg { fill: #60a5fa; }


.contact-form {
  padding: 2rem;
  border-radius: var(--radius-lg);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  transition: var(--transition);
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-subtle);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(124,58,237,0.5);
  background: rgba(124,58,237,0.05);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.1);
}

.form-success {
  display: none;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  color: #22c55e;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 1rem;
  text-align: center;
}

/* ===================================
   BLOG POST FEATURED IMAGE
=================================== */
.post-feat-image {
  padding: 0 0 2.5rem;
}
.post-feat-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--border);
  display: block;
}

/* ===================================
   FOOTER
=================================== */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer-top {
  text-align: center;
  margin-bottom: 1.5rem;
}

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.footer-logo span { color: var(--primary); }

.footer-tagline {
  color: var(--text-subtle);
  font-size: 0.875rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-subtle);
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.heart { color: var(--secondary); }

/* ===================================
   ANIMATIONS
=================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}


/* ===================================
   RESPONSIVE
=================================== */

/* ─── 1300px: Wide laptop ─── */
@media (max-width: 1300px) {
  .hero-visual { min-height: 95vh; }
  .profile-img { height: 95vh; left: 58%; }
  .profile-circle { width: clamp(340px, 42vw, 540px); height: clamp(340px, 42vw, 540px); }
}

/* ─── 1100px: Narrow laptop ─── */
@media (max-width: 1100px) {
  .profile-img { height: 86vh; }
  .profile-circle { width: clamp(320px, 40vw, 500px); height: clamp(320px, 40vw, 500px); }
}

/* ─── 1024px: Tablet / laptop ─── */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1.1fr 0.9fr; }
  .hero-visual { min-height: 50vh; }
  .profile-img { height: 78vh; }
  .profile-circle { width: clamp(280px, 36vw, 440px); height: clamp(280px, 36vw, 440px); }
}

/* ─── 900px: Nav collapse + tablet ─── */
@media (max-width: 900px) {
  /* Nav: always opaque on mobile so hamburger is always legible
     (no backdrop-filter — fixed element over scrolling content re-blurs
     every frame). */
  .nav {
    background: rgba(10,10,15,0.95);
    border-bottom: 1px solid var(--border);
  }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  /* Hero */
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-visual { order: 1; align-self: auto; min-height: 68vw; }
  .profile-circle { width: min(300px, 80vw); height: min(300px, 80vw); bottom: -30px; left: 50%; }
  .profile-img { height: 68vw; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); }
  .scroll-down { display: none; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-desc { margin: 0 auto 2rem; }

  /* Layout */
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-skills-wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .full-width { grid-column: span 1; }
  .contact-grid { grid-template-columns: 1fr; }

  /* Avatar rings */
  .ring-2 { width: 260px; height: 260px; }
  .ring-3 { display: none; }
}

/* ─── 768px: Mobile landscape / small tablet ─── */
@media (max-width: 768px) {
  .about-card-grid { grid-template-columns: 1fr; }
  .mobile-menu a { font-size: 2rem; }
  .mobile-menu ul { gap: 1.5rem; }

  /* Hero */
  .hero-visual { min-height: 74vw; }
  .profile-img { height: 74vw; }
  .profile-circle { width: min(280px, 78vw); height: min(280px, 78vw); }
}

/* ─── 640px: Mobile portrait ─── */
@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; }

  /* Hero */
  .hero-visual { min-height: 80vw; }
  .profile-img { height: 80vw; }
  .profile-circle { width: min(260px, 76vw); height: min(260px, 76vw); }

  /* Decorative floating cards are absolutely positioned with nowrap text and
     can overflow off the shrunken hero photo, causing horizontal scroll. Hide
     them on phones. */
  .floating-card { display: none; }

  /* Wrap hero stats so the 3 stats + dividers don't crowd on large phones
     (481–640px); the ≤480px block layers tighter spacing on top. */
  .hero-stats { flex-wrap: wrap; gap: 1.25rem; }

  .hero-title { font-size: clamp(1.9rem, 9vw, 2.8rem); }
  .hero-roles { font-size: 1rem; }
  .hero-desc { font-size: 0.95rem; }

  .timeline { padding-left: 0.75rem; }
  .timeline-item { padding-left: 1.75rem; }
  .timeline-header { flex-direction: column; gap: 0.5rem; }
  .timeline-card { padding: 1.25rem; }

  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }

  .mobile-menu a { font-size: 1.75rem; }
  .mobile-menu ul { gap: 1.25rem; }

  .project-filters { gap: 0.4rem; }
  .filter-btn { font-size: 0.8rem; padding: 0.45rem 0.9rem; }

  /* Custom cursor off on touch screens */
  .cursor, .cursor-ring { display: none !important; }
  body { cursor: auto; }
  button, a, .btn { cursor: pointer; }
}

/* ─── 480px: Small mobile ─── */
@media (max-width: 480px) {
  .section { padding: clamp(3rem, 7vw, 5rem) 0; }
  .section-title { font-size: clamp(1.6rem, 7vw, 2.2rem); }

  /* Hero */
  .hero-visual { min-height: 88vw; }
  .profile-img { height: 88vw; }
  .profile-circle { width: min(240px, 72vw); height: min(240px, 72vw); }

  .hero-title { font-size: clamp(1.75rem, 9vw, 2.4rem); }
  .hero-stats { flex-wrap: wrap; gap: 1.25rem; justify-content: center; }
  .stat-divider { display: none; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 280px; justify-content: center; }

  /* On small phones the Credly CTA fills the width — center its inner
     icon/text/arrow so it doesn't sit left-aligned inside the wide pill. */
  .credly-link {
    width: 100%;
    max-width: 320px;
    justify-content: center;
    text-align: center;
  }

  .timeline-card { padding: 1rem; }
  .timeline-role { font-size: 1.05rem; }

  .about-card-grid { grid-template-columns: 1fr; }

  .mobile-menu a { font-size: 1.5rem; }
  .mobile-menu ul { gap: 0.9rem; }
}

/* Project CTA row */
.proj-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 3rem 2rem 1rem;
  text-align: center;
}

.proj-cta p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============================================================
   BADGE IMAGE GRID  (digital credentials)
============================================================ */
.badges-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 1rem;
}

.badges-divider::before,
.badges-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.badges-divider span {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-subtle);
  white-space: nowrap;
}

.badges-img-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
}

.db-card {
  padding: 0.875rem 0.75rem 1.75rem;
  border-radius: var(--radius-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  min-height: 140px;
}

.db-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

/* "View Certificate" label revealed on hover — fully covers the bottom so it
   never bleeds over the issuer/provider text underneath. */
.db-card[data-cert-src]::after {
  content: '⟢ View Certificate';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.4rem;
  padding: 0 0.5rem;
  background: var(--bg-3, #14141f);
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.95);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22,1,0.36,1);
  z-index: 3;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  pointer-events: none;
}

.db-card[data-cert-src]:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.db-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124,58,237,0.35);
}

.db-card:hover::before { opacity: 0.04; }

.db-img-wrap {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.db-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.35));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.db-card:hover .db-img {
  transform: scale(1.1) translateY(-3px);
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.5));
}

.db-group {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin-bottom: 0.35rem;
  position: relative;
  z-index: 1;
}

.db-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.25rem;
  position: relative;
  z-index: 1;
}

.db-issuer {
  font-size: 0.72rem;
  color: var(--text-subtle);
  position: relative;
  z-index: 1;
  margin-top: auto;
  transition: opacity 0.22s ease;
}

/* Fade the issuer line out on hover so the "View Certificate" band sits cleanly */
.db-card[data-cert-src]:hover .db-issuer { opacity: 0; }

/* Color accent top border per issuer group */
.db-card[data-issuer="pearson"]   { border-top: 2px solid rgba(6,182,212,0.5); }
.db-card[data-issuer="microsoft"] { border-top: 2px solid rgba(0,120,215,0.5); }
.db-card[data-issuer="cisco"]     { border-top: 2px solid rgba(0,188,212,0.5); }
.db-card[data-issuer="ic3"]       { border-top: 2px solid rgba(34,197,94,0.5); }
.db-card[data-issuer="pmi"]       { border-top: 2px solid rgba(184,115,51,0.5); }

/* Per-issuer "View Certificate" hover band accent matches badge color */
.db-card[data-issuer="pearson"][data-cert-src]::after   { color:#67e8f9; border-top-color: rgba(6,182,212,0.55); }
.db-card[data-issuer="microsoft"][data-cert-src]::after { color:#7cc4ff; border-top-color: rgba(0,120,215,0.6); }
.db-card[data-issuer="cisco"][data-cert-src]::after     { color:#67e8f9; border-top-color: rgba(0,188,212,0.55); }
.db-card[data-issuer="ic3"][data-cert-src]::after       { color:#86efac; border-top-color: rgba(34,197,94,0.55); }
.db-card[data-issuer="pmi"][data-cert-src]::after       { color:#e0b088; border-top-color: rgba(184,115,51,0.6); }

/* Credly profile CTA — on-theme glass pill with gradient accent */
.credly-cta {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.credly-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.85rem 0.7rem 0.7rem;
  border-radius: 100px;
  border: 1px solid rgba(124,58,237,0.28);
  background: rgba(124,58,237,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  overflow: hidden;
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

/* Icon chip with the brand gradient */
.credly-link .credly-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(124,58,237,0.4);
}

.credly-link strong {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.credly-link .credly-arrow {
  color: var(--primary-light);
  transition: transform 0.3s ease;
}

.credly-link:hover {
  color: var(--text);
  border-color: rgba(124,58,237,0.55);
  background: rgba(124,58,237,0.12);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(124,58,237,0.28);
}

.credly-link:hover .credly-arrow { transform: translateX(4px); }

/* Responsive */
@media (max-width: 1200px) { .badges-img-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1024px) { .badges-img-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px)  { .badges-img-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px)  { .badges-img-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   PAGE LOADER
============================================================ */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  text-align: center;
  width: 260px;
}

.loader-logo {
  font-family: 'Syne', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 2rem;
}

.loader-logo span { color: var(--primary); }

.loader-bar {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.loader-fill {
  height: 100%;
  width: 0;
  background: var(--gradient);
  border-radius: 2px;
  transition: width 0.1s ease;
}

.loader-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-subtle);
  letter-spacing: 0.15em;
}

/* ============================================================
   NOISE OVERLAY
============================================================ */
.noise {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 9998;
}

/* ============================================================
   SCROLL PROGRESS BAR
============================================================ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient);
  z-index: 2000;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 12px rgba(124,58,237,0.6);
  transition: width 0.1s linear;
}

/* ============================================================
   UPGRADED CURSOR
============================================================ */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  will-change: transform;
  /* No mix-blend-mode: blending the moving cursor against the busy hero
     backdrop forced a repaint on every mouse move. The dot is light enough
     to stay visible on the dark theme without it. */
}

.cursor-dot {
  width: 10px; height: 10px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 40px; height: 40px;
  border: 1.5px solid rgba(124,58,237,0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease;
}

.cursor-ring.hovered {
  width: 64px; height: 64px;
  border-color: rgba(124,58,237,0.9);
}

/* ============================================================
   BACK TO TOP
============================================================ */
.back-top {
  position: fixed;
  /* Sits to the LEFT of the Chatbase bubble (anchored bottom-right, ~60px wide),
     side-by-side and close together along the bottom-right corner. */
  bottom: 1.5rem; right: 5rem; left: auto;
  width: 46px; height: 46px;
  background: var(--gradient);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 500;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
  cursor: pointer;
}

.back-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-top:hover {
  box-shadow: 0 8px 30px rgba(124,58,237,0.7);
  transform: translateY(-3px);
}

/* ============================================================
   SECTION GLOWS
============================================================ */
.section-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}
.section-glow.glow-purple { background: var(--primary); top: -200px; left: -200px; }
.section-glow.glow-cyan   { background: var(--accent);  top: -200px; right: -200px; }
.section-glow.glow-pink   { background: var(--secondary); bottom: -200px; right: -100px; }
.section-glow.glow-yellow { background: #f59e0b; top: -100px; left: 50%; transform: translateX(-50%); }

/* Ensure sections are relative for absolute glows */
.section { position: relative; }

/* ============================================================
   SECTION SUB
============================================================ */
.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 3rem;
  line-height: 1.75;
}
.section-sub.centered { text-align: center; }

/* ============================================================
   FOOTER UPGRADE
============================================================ */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
}

.footer-glow {
  position: absolute;
  width: 400px; height: 400px;
  background: var(--primary);
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.05;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .footer-logo {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.footer-brand .footer-logo span { color: var(--primary); }

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 0.5rem;
}

.footer-social a:not(.soc-btn) {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  transition: var(--transition);
}

.footer-social a:not(.soc-btn):hover {
  background: rgba(124,58,237,0.2);
  border-color: rgba(124,58,237,0.4);
  color: var(--primary-light);
}

.footer-col h5 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin-bottom: 1.25rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: 0.75rem; }

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-col a:hover { color: var(--primary-light); padding-left: 4px; }

/* ============================================================
   EDUCATION SECTION
============================================================ */
.education { background: var(--bg-2); overflow: hidden; }

.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  position: relative;
  z-index: 1;
}

.edu-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.edu-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.edu-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(0,0,0,0.4), var(--shadow-glow);
  border-color: rgba(124,58,237,0.4);
}

.edu-card:hover::before { opacity: 0.04; }

.edu-icon-wrap { flex-shrink: 0; }

.edu-icon {
  width: 54px; height: 54px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.1);
}

.edu-uni     { background: linear-gradient(135deg, rgba(159,18,57,0.35), rgba(190,18,60,0.2)); color: #fca5a5; border-color: rgba(190,18,60,0.25); }
.edu-tech    { background: linear-gradient(135deg, rgba(6,182,212,0.3), rgba(59,130,246,0.2)); color: var(--accent); border-color: rgba(59,130,246,0.25); }
.edu-hs      { background: linear-gradient(135deg, rgba(22,163,74,0.35), rgba(21,128,61,0.2)); color: #86efac; border-color: rgba(22,163,74,0.25); }
.edu-elem    { background: linear-gradient(135deg, rgba(234,88,12,0.35), rgba(249,115,22,0.2)); color: #fdba74; border-color: rgba(234,88,12,0.25); }

.edu-body { flex: 1; }

.edu-year {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-subtle);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.edu-school {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
  line-height: 1.35;
}

.edu-degree {
  font-size: 0.875rem;
  color: var(--primary-light);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.edu-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.edu-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.edu-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: 100px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.current-pill {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.3);
  color: #22c55e;
}

/* ============================================================
   BADGES SECTION
============================================================ */
.badges { background: var(--bg); overflow: hidden; }

.badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  position: relative;
  z-index: 1;
}

.badge-card {
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.badge-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

/* Hover shine sweep */
.badge-shine {
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.badge-card:hover .badge-shine { left: 125%; }

.badge-ring {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  position: relative;
  box-shadow: 0 0 0 6px rgba(124,58,237,0.15), 0 0 0 12px rgba(124,58,237,0.07);
}

.badge-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--gradient) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: rotateBadge 4s linear infinite;
}

@keyframes rotateBadge {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.badge-ring-inner { font-size: 2rem; z-index: 1; }

.badge-meta h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.badge-meta p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.badge-from {
  display: block;
  font-size: 0.72rem;
  color: var(--text-subtle);
  font-style: italic;
}

/* Ribbon */
.badge-label {
  position: absolute;
  top: 1rem; right: -0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.7rem;
  border-radius: 2px;
  color: #fff;
}
.badge-label::after {
  content: '';
  position: absolute;
  right: 0; bottom: -4px;
  border-left: 4px solid transparent;
  border-right: 0 solid transparent;
  border-top: 4px solid rgba(0,0,0,0.3);
}

.bl-gold   { background: linear-gradient(90deg,#b45309,#f59e0b); }
.bl-blue   { background: linear-gradient(90deg,#1d4ed8,#3b82f6); }
.bl-purple { background: linear-gradient(90deg,#7c3aed,#a78bfa); }
.bl-pink   { background: linear-gradient(90deg,#be185d,#ec4899); }
.bl-cyan   { background: linear-gradient(90deg,#0e7490,#06b6d4); }
.bl-green  { background: linear-gradient(90deg,#065f46,#10b981); }

/* ============================================================
   FEEDBACK / TESTIMONIALS SECTION
============================================================ */
.feedback { background: var(--bg-2); }

.fb-carousel {
  max-width: 800px;
  margin: 3.5rem auto 0;
}

.fb-stage {
  display: grid;
}

.fb-card {
  grid-area: 1 / 1;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  opacity: 0;
  transform: translateX(var(--fb-shift, 40px)) scale(0.97);
  filter: blur(4px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), filter 0.55s ease;
  pointer-events: none;
}

/* Direction of the incoming card — set by JS before activating */
.fb-stage.dir-next .fb-card { --fb-shift: 40px; }
.fb-stage.dir-prev .fb-card { --fb-shift: -40px; }

.fb-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.fb-card::after {
  content: '';
  position: absolute;
  bottom: -80px; right: -80px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(124,58,237,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.fb-card.fb-active {
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0);
  pointer-events: auto;
  z-index: 2;
}

/* Staggered reveal of the active card's content */
.fb-card.fb-active .fb-top,
.fb-card.fb-active .fb-text,
.fb-card.fb-active .fb-author {
  animation: fbContentIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.fb-card.fb-active .fb-top    { animation-delay: 0.1s; }
.fb-card.fb-active .fb-text   { animation-delay: 0.18s; }
.fb-card.fb-active .fb-author { animation-delay: 0.28s; }

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

@media (prefers-reduced-motion: reduce) {
  .fb-card {
    transform: none;
    filter: none;
    transition: opacity 0.4s ease;
  }
  .fb-card.fb-active .fb-top,
  .fb-card.fb-active .fb-text,
  .fb-card.fb-active .fb-author { animation: none; }
}

.fb-deco {
  position: absolute;
  bottom: -0.5rem; right: 1.25rem;
  font-family: 'Syne', sans-serif;
  font-size: 11rem;
  font-weight: 800;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.05;
  user-select: none;
  pointer-events: none;
  z-index: 0;
}

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

.fb-stars {
  font-size: 1.1rem;
  color: #f59e0b;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.fb-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.28rem 0.75rem;
  border-radius: 100px;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.22);
  color: #c4b5fd;
}

.fb-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.85;
  font-style: italic;
  position: relative;
  z-index: 1;
}

.fb-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.fb-av {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

.fb-info { flex: 1; }

.fb-info strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.fb-info strong a { color: inherit; text-decoration: none; }
.fb-info strong a:hover { text-decoration: underline; opacity: 0.85; }

.fb-info span {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

/* Per-category accent: top border */
.fb-card[data-category="social"]::before        { background: linear-gradient(90deg,#ec4899,#be185d); }
.fb-card[data-category="ui-ux"]::before         { background: linear-gradient(90deg,#7c3aed,#a78bfa); }
.fb-card[data-category="collaboration"]::before { background: linear-gradient(90deg,#3b82f6,#60a5fa); }
.fb-card[data-category="web-dev"]::before       { background: linear-gradient(90deg,#0891b2,#2dd4bf); }
.fb-card[data-category="e-commerce"]::before    { background: linear-gradient(90deg,#d97706,#fbbf24); }

/* Per-category accent: tag chip */
.fb-card[data-category="social"] .fb-tag        { background:rgba(236,72,153,0.12); border-color:rgba(236,72,153,0.3); color:#f9a8d4; }
.fb-card[data-category="ui-ux"] .fb-tag         { background:rgba(124,58,237,0.12); border-color:rgba(124,58,237,0.3); color:#c4b5fd; }
.fb-card[data-category="collaboration"] .fb-tag { background:rgba(59,130,246,0.12); border-color:rgba(59,130,246,0.3); color:#93c5fd; }
.fb-card[data-category="web-dev"] .fb-tag       { background:rgba(8,145,178,0.12); border-color:rgba(8,145,178,0.3); color:#67e8f9; }
.fb-card[data-category="e-commerce"] .fb-tag    { background:rgba(217,119,6,0.12); border-color:rgba(217,119,6,0.3); color:#fde68a; }

/* Per-category accent: quote deco color */
.fb-card[data-category="social"] .fb-deco        { background:linear-gradient(135deg,#ec4899,#be185d); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.fb-card[data-category="ui-ux"] .fb-deco         { background:linear-gradient(135deg,#7c3aed,#a78bfa); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.fb-card[data-category="collaboration"] .fb-deco { background:linear-gradient(135deg,#3b82f6,#60a5fa); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.fb-card[data-category="web-dev"] .fb-deco       { background:linear-gradient(135deg,#0891b2,#2dd4bf); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.fb-card[data-category="e-commerce"] .fb-deco    { background:linear-gradient(135deg,#d97706,#fbbf24); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }

/* ===================================
   CERTIFICATE MODAL
=================================== */
.cert-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(4px);
}

.cert-modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.cert-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 920px;
  height: 90vh;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.cert-modal-overlay.is-open .cert-modal {
  transform: translateY(0) scale(1);
}

.cert-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface);
}

.cert-modal-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.cert-close-btn {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.cert-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.cert-modal-body {
  flex: 1;
  overflow: auto;
  background: #111;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#certImg {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

@media (max-width: 768px) {
  .cert-modal-overlay {
    padding: 0;
    align-items: stretch;
  }

  .cert-modal {
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
}

/* ============================================================
   PAGE TRANSITIONS
============================================================ */
#pageOverlay {
  position: fixed;
  inset: 0;
  background: var(--bg, #0a0a0f);
  opacity: 1;
  z-index: 99998;
  transition: opacity 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
#pageOverlay.pt-loaded {
  opacity: 0;
}

@media (max-width: 480px) {
  .cert-modal-header {
    padding: 0.7rem 0.9rem;
  }

  .cert-modal-title {
    font-size: 0.78rem;
  }

  .cert-close-btn {
    width: 28px;
    height: 28px;
  }
}

.fb-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.fb-btn {
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  cursor: none;
}

.fb-btn:hover {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 20px rgba(124,58,237,0.5);
  transform: scale(1.08);
}

.fb-dots { display: flex; gap: 0.5rem; align-items: center; }

.fb-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: width 0.4s cubic-bezier(0.22,1,0.36,1), background 0.3s ease;
  cursor: none;
  border: none;
  position: relative;
  overflow: hidden;
}

.fb-dot:hover { background: var(--text-muted); }

.fb-dot.active {
  background: rgba(124,58,237,0.25);
  width: 28px;
  border-radius: 4px;
}

/* Autoplay progress fill on the active dot */
.fb-dot.active::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: var(--gradient);
  transform-origin: left;
  animation: fbDotFill 5s linear forwards;
}
.fb-dots.is-paused .fb-dot.active::after { animation-play-state: paused; }

@keyframes fbDotFill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .fb-dot.active::after { animation: none; transform: scaleX(1); }
}

/* ============================================================
   BLOG PREVIEW SECTION
============================================================ */
.blog-preview { background: var(--bg); }

.bp-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.75rem;
  margin-top: 3rem;
  align-items: start;
}

.bp-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  background: var(--surface);
  border: 1px solid var(--border);
}

.bp-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124,58,237,0.4);
  box-shadow: 0 24px 56px rgba(0,0,0,0.4), var(--shadow-glow);
}

.bp-card-cover {
  position: relative;
  height: 200px;
  background: linear-gradient(140deg, #12062e 0%, #0e1f3a 45%, #051a1a 100%);
  overflow: hidden;
}

/* Real cover photo for the featured journal card */
.bp-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1);
}
.bp-card:hover .bp-cover-img { transform: scale(1.05); }
.bp-card-cover .bp-cat,
.bp-card-cover .bp-feat-badge { z-index: 2; }

.bp-cover-art {
  position: absolute;
  inset: 0;
}

.bp-cover-art::before {
  content: '';
  position: absolute;
  width: 280px; height: 280px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(124,58,237,0.2);
  box-shadow:
    0 0 0 40px rgba(124,58,237,0.05),
    0 0 0 80px rgba(6,182,212,0.03);
  animation: b-pulse 5s ease-in-out infinite;
}

.bp-dot {
  position: absolute;
  border-radius: 50%;
  background: var(--gradient);
}
.bp-dot-1 { width: 12px; height: 12px; top: 38%; left: 40%; opacity: 0.8; }
.bp-dot-2 { width: 8px;  height: 8px;  top: 55%; left: 60%; opacity: 0.65; }
.bp-dot-3 { width: 10px; height: 10px; top: 42%; left: 62%; opacity: 0.7; }

.bp-cat {
  position: absolute;
  bottom: 1rem; left: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
  background: rgba(124,58,237,0.25);
  border: 1px solid rgba(124,58,237,0.4);
  color: #c4b5fd;
  z-index: 1;
}

.bp-feat-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  z-index: 1;
}

.bp-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.bp-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
}

.bp-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.bp-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.bp-cta {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.2s ease;
}

.bp-card:hover .bp-cta { gap: 0.7rem; }

.bp-side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.bp-coming {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
}

.bp-soon-icon { font-size: 1.75rem; flex-shrink: 0; }

.bp-coming h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.bp-coming p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.bp-view-all {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
}

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

/* ============================================================
   CONTACT SECTION UPGRADE
============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 2rem;
  align-items: start;
}

.contact-grid > * { min-width: 0; }

.contact-info {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: var(--radius-lg);
}

.contact-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.ci-items { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 2rem; }

.ci-item { display: flex; align-items: center; gap: 1rem; }

.ci-ico {
  width: 40px; height: 40px;
  background: rgba(124,58,237,0.12);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.ci-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.ci-val {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
}

a.ci-val:hover { color: var(--primary-light); }

.social-row {
  display: flex;
  gap: 0.6rem;
}

.s-btn {
  width: 40px; height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.s-btn:hover {
  background: rgba(124,58,237,0.2);
  border-color: rgba(124,58,237,0.4);
  color: var(--primary-light);
  transform: translateY(-3px);
}

.contact-form {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: var(--radius-lg);
}

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

.fg { margin-bottom: 1.25rem; }
.fg:last-of-type { margin-bottom: 1.5rem; }

.fg label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.5rem;
}

.fg input,
.fg textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  transition: var(--transition);
  resize: vertical;
}

.fg input::placeholder,
.fg textarea::placeholder { color: var(--text-subtle); }

.fg input:focus,
.fg textarea:focus {
  outline: none;
  border-color: rgba(124,58,237,0.5);
  background: rgba(124,58,237,0.04);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.1);
}

.form-feedback {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  display: none;
  text-align: center;
}

.form-feedback.success {
  display: block;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  color: #22c55e;
}

.form-feedback.error {
  display: block;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
}

/* Full-width button */
.full-w { width: 100%; justify-content: center; }

/* ============================================================
   RESPONSIVE ADDITIONS FOR NEW SECTIONS
============================================================ */
@media (max-width: 1024px) {
  .badges-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .edu-grid { grid-template-columns: 1fr; }
  .badges-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
  .badges-grid { grid-template-columns: 1fr; }
  /* On mobile the Chatbase bubble owns the bottom-right corner and is larger,
     so stack the back-top button ABOVE it (same right edge) to avoid overlap. */
  .back-top { bottom: 5.5rem; right: 1rem; left: auto; width: 42px; height: 42px; }
}

/* ===================================
   ACCESSIBILITY — COARSE POINTER (TOUCH DEVICES)
   Restore native cursor for touch/stylus users on all screen sizes
=================================== */
@media (pointer: coarse) {
  body { cursor: auto; }
  button, a, .btn { cursor: pointer; }
  .cursor, .cursor-ring { display: none !important; }
}

/* ===================================
   ACCESSIBILITY — REDUCED MOTION
   Respect user's OS-level "reduce motion" preference
=================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   Chatbase Widget — height override
   The open chat window is #chatbase-bubble-window, which Chatbase
   sizes with inline styles (height: 85dvh; max-height: 824px).
   We cap it here so it isn't too tall. Adjust the two values to taste.
   ============================================ */
#chatbase-bubble-window {
  height: 70dvh !important;
  max-height: 620px !important;
}
