/* =========================================================
   Mayur Chavhan Portfolio  |  css/style.css
   Redesigned — premium dark theme, single accent, no AI gradients
   ========================================================= */

/* ── 1. CSS Custom Properties ── */
:root {
  /* backgrounds */
  --bg-primary:    #080808;
  --bg-secondary:  #0e0e0e;
  --bg-card:       #141414;
  --bg-card-hover: #1a1a1a;

  /* borders */
  --border:        rgba(255, 255, 255, 0.07);
  --border-hover:  rgba(34, 211, 238, 0.4);

  /* single accent — copper-amber */
  --accent:        #22d3ee;
  --accent-dim:    rgba(34, 211, 238, 0.07);
  --accent-glow:   rgba(34, 211, 238, 0.15);

  /* text */
  --text-primary:   #f0f0f0;
  --text-secondary: #888888;
  --text-muted:     #7a7a7a;

  /* spacing */
  --section-gap:  8rem;
  --container-w:  1200px;

  /* radii */
  --radius-sm:  4px;
  --radius-md:  10px;
  --radius-lg:  18px;
  --radius-xl:  28px;

  /* spring easing */
  --spring:          cubic-bezier(0.16, 1, 0.3, 1);
  --transition:      0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Grain / film noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

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

/* ── 3. Skip link (accessibility) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1.25rem;
  background: var(--accent);
  color: #06101a;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ── 4. Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 2px;
}

/* ── 5. Scroll progress bar ── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  z-index: 10000;
  pointer-events: none;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.08s linear;
}

/* ── 6. Utility ── */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: var(--section-gap) 0; }
.section-alt { background-color: var(--bg-secondary); }

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

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.85rem;
  letter-spacing: 0.02em;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

/* ── 7. Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.6rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
  font-family: 'Inter', system-ui, sans-serif;
}

.btn:active { transform: scale(0.97) translateY(1px) !important; }

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--accent);
  color: #06101a;
  font-weight: 700;
}
.btn-primary:hover {
  background: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* ── 8. Reveal Animations ── */
.reveal {
  opacity: 1;
  transform: none;
  transform-origin: center bottom;
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

/* Animations are an enhancement: only hide/animate when JS + motion are available. */
html.reveal-animate .reveal {
  opacity: 0;
  transform: translateY(24px) rotateX(8deg);
}

html.reveal-animate .reveal.visible {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
}

html.reveal-animate .reveal:nth-child(1) { transition-delay: 0.00s; }
html.reveal-animate .reveal:nth-child(2) { transition-delay: 0.07s; }
html.reveal-animate .reveal:nth-child(3) { transition-delay: 0.14s; }
html.reveal-animate .reveal:nth-child(4) { transition-delay: 0.21s; }
html.reveal-animate .reveal:nth-child(5) { transition-delay: 0.28s; }
html.reveal-animate .reveal:nth-child(6) { transition-delay: 0.35s; }

/* ── 9. Navigation ── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

#header.scrolled {
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.logo-bracket { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.nav-link {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  letter-spacing: -0.01em;
}

.nav-link:hover { color: var(--text-primary); }

.nav-link.active { color: var(--accent); }

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.15rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.25s var(--spring);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.nav-cta { margin-left: 0.75rem; }

.nav-cta-mobile { display: none; }

/* GitHub profile icon link — desktop navbar */
.nav-github {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-left: 0.75rem;
  border-radius: var(--radius-sm, 8px);
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-github:hover,
.nav-github:focus-visible {
  color: var(--accent);
  transform: translateY(-1px);
}

.nav-github-mobile { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── 10. Hero ── */
.hero-section {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 7rem 1.5rem 5rem;
  perspective: 1500px;
  perspective-origin: center center;
}

/* ambient glow behind hero */
.hero-section::after {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -62%);
  background: radial-gradient(circle, rgba(34, 211, 238, 0.06) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* line-grid background */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black 30%, transparent 100%);
  will-change: transform;
  transition: transform 0.1s linear;
}

/* hide old orbs — orb class kept for JS parallax compat */
.hero-orbs { position: absolute; inset: 0; pointer-events: none; }
.orb { display: none; }

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 860px;
  min-width: 0;
  text-align: center;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--spring);
}

.hero-content.hero-3d-active {
  transform: perspective(1200px) rotateX(var(--hero-rot-x, 0deg)) rotateY(var(--hero-rot-y, 0deg));
}

.hero-content > * {
  transform-style: preserve-3d;
}

/* subtle depth layers for hero children */
.hero-greeting    { transform: translateZ(20px); }
.hero-name        { transform: translateZ(50px); }
.hero-title-wrapper { transform: translateZ(35px); }
.hero-bio         { transform: translateZ(25px); }
.hero-actions     { transform: translateZ(40px); }
.hero-tech-strip  { transform: translateZ(15px); }

.hero-greeting {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeInUp 0.55s var(--spring) 0.2s forwards;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-transform: lowercase;
}

.hero-greeting::before,
.hero-greeting::after {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.55;
  flex-shrink: 0;
}

.hero-name {
  font-size: clamp(3.25rem, 8.5vw, 6rem);
  font-weight: 700;
  line-height: 0.98;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeInUp 0.55s var(--spring) 0.35s forwards;
  text-wrap: balance;
  word-break: break-word;
  overflow-wrap: break-word;
}

.hero-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.55s var(--spring) 0.5s forwards;
  letter-spacing: -0.015em;
}

.hero-typed {
  color: var(--accent);
  font-weight: 700;
}

.cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
  font-weight: 300;
  opacity: 0.75;
}

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

.hero-bio {
  color: var(--text-secondary);
  font-size: 0.975rem;
  width: 100%;
  max-width: 520px;
  margin: 0 auto 2.75rem;
  opacity: 0;
  animation: fadeInUp 0.55s var(--spring) 0.65s forwards;
  line-height: 1.8;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
  opacity: 0;
  animation: fadeInUp 0.55s var(--spring) 0.8s forwards;
}

.hero-tech-strip {
  display: block;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  opacity: 0;
  animation: fadeInUp 0.55s var(--spring) 0.95s forwards;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.marquee-track {
  display: flex;
  width: max-content;
  min-width: 0;
  animation: marquee-scroll 28s linear infinite;
  will-change: transform;
}

.hero-tech-strip:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-set {
  display: flex;
  align-items: center;
  gap: 3.25rem;
  padding: 0 1.625rem;
  flex-shrink: 0;
}

.marquee-set i {
  font-size: 2.5rem;
  transition: var(--transition);
  filter: grayscale(1) opacity(0.45);
  cursor: default;
}

.marquee-set i:hover {
  filter: grayscale(0) opacity(1);
  transform: translateY(-4px) scale(1.1);
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

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

.scroll-down {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  animation: fadeIn 1s ease 1.3s forwards;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
}

.scroll-arrow {
  display: block;
  width: 11px;
  height: 11px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(45deg);
  animation: scroll-hint 2s ease-in-out infinite;
}

@keyframes scroll-hint {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50%       { transform: rotate(45deg) translateY(5px); }
}
@keyframes fadeIn { to { opacity: 0.5; } }

/* ── 11. About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.55fr;
  gap: 5rem;
  align-items: start;
}

.about-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  position: sticky;
  top: 6.5rem;
}

.about-avatar {
  position: relative;
  width: 180px;
  height: 180px;
}

.avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid transparent;
  animation: spin 18s linear infinite;
}

.ring-1 {
  border-top-color: var(--accent);
  border-right-color: transparent;
  opacity: 0.5;
}

.ring-2 {
  inset: 14px;
  border-bottom-color: rgba(255, 255, 255, 0.15);
  border-left-color: transparent;
  animation-duration: 12s;
  animation-direction: reverse;
}

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

.avatar-inner {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-initials {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  width: 100%;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.stat-card {
  background: var(--bg-card);
  padding: 1.25rem 0.75rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    200px circle at var(--mouse-x, -400px) var(--mouse-y, -400px),
    var(--accent-dim),
    transparent 60%
  );
  pointer-events: none;
}

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

.stat-number {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.stat-unit {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-top: 0.3rem;
  font-family: 'JetBrains Mono', monospace;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.85;
  text-wrap: pretty;
}

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

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin: 0.5rem 0;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.83rem;
  color: var(--text-secondary);
  padding: 0.65rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.highlight-item:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.highlight-icon {
  font-style: normal;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.about-actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
}

/* ── 12. Skills ── */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skill-category {
  background: var(--bg-card);
  padding: 2rem 2rem;
  transition: background var(--transition);
  position: relative;
  overflow: hidden;
}

.skill-category:hover { background: var(--bg-card-hover); }

.skill-category::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    300px circle at var(--mouse-x, -400px) var(--mouse-y, -400px),
    var(--accent-dim),
    transparent 65%
  );
  pointer-events: none;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.35rem;
}

.category-icon {
  font-style: normal;
  font-size: 1rem;
  line-height: 1;
}

.category-header h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.skill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.skill-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.skill-badge:hover {
  background: var(--accent-dim);
  border-color: rgba(34, 211, 238, 0.25);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.skill-badge i { font-size: 1rem; }

.skill-badge .skill-fallback {
  font-size: 0.95rem;
  font-style: normal;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── 12b. Certifications ── */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cert-card {
  background: var(--bg-card);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: background var(--transition);
  position: relative;
  overflow: hidden;
}

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

.cert-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    260px circle at var(--mouse-x, -400px) var(--mouse-y, -400px),
    var(--accent-dim),
    transparent 60%
  );
  pointer-events: none;
}

.cert-icon {
  font-size: 2.5rem;
  margin-bottom: 1.1rem;
  line-height: 1;
}

.cert-icon i { filter: grayscale(0.25); }

.cert-title {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.cert-issuer {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
}

.cert-badge {
  display: inline-block;
  padding: 0.28rem 0.6rem;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.22);
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'JetBrains Mono', monospace;
}

/* ── 13. Timeline / Experience ── */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent) 0%, var(--border) 40%, transparent 100%);
  opacity: 0.5;
}

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

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 0.45rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 1px var(--accent), 0 0 12px rgba(34, 211, 238, 0.35);
  transform: translateX(0.1rem);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
}

.timeline-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    380px circle at var(--mouse-x, -400px) var(--mouse-y, -400px),
    var(--accent-dim),
    transparent 60%
  );
  pointer-events: none;
}

.timeline-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

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

.timeline-role {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.timeline-company {
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 0.2rem;
  font-weight: 600;
}

.timeline-period {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 0.1rem;
  letter-spacing: 0.02em;
}

.timeline-achievements {
  list-style: none;
  padding: 0;
  margin-bottom: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.timeline-achievements li {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.65;
  padding-left: 1.25rem;
  position: relative;
}

.timeline-achievements li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1rem;
  top: -0.05rem;
  opacity: 0.7;
}

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

.timeline-tags span {
  padding: 0.18rem 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
}

/* ── 14. Projects ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* featured first card — full width */
.project-card:first-child {
  grid-column: 1 / -1;
}

.project-card {
  background: var(--bg-card);
  padding: 2.25rem;
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  position: relative;
  overflow: hidden;
}

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

/* spotlight */
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mouse-x, -400px) var(--mouse-y, -400px),
    var(--accent-dim),
    transparent 60%
  );
  pointer-events: none;
}

/* featured card horizontal layout */
.project-card:first-child {
  flex-direction: row;
  align-items: flex-start;
  gap: 2.5rem;
}

.project-card:first-child .project-content {
  flex: 1;
}

.project-content {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex: 1;
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-icon i,
.project-icon .project-fallback-icon {
  font-size: 2.25rem;
  filter: grayscale(0.15);
  font-style: normal;
  line-height: 1;
}

.project-links { display: flex; gap: 0.65rem; }

.project-link {
  color: var(--text-muted);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}
.project-link:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}
.project-link:focus-visible { outline-offset: 1px; }

.project-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.845rem;
  line-height: 1.72;
  flex: 1;
  text-wrap: pretty;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.project-tags span {
  padding: 0.18rem 0.55rem;
  background: var(--accent-dim);
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.03em;
}

/* ── 15. Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 5rem;
  align-items: start;
}

.contact-intro {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.85;
  margin-bottom: 2.5rem;
  text-wrap: pretty;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: var(--transition);
  padding: 0.9rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-weight: 500;
}

.contact-link:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(3px);
}

.contact-link-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

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

.form-group label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'JetBrains Mono', monospace;
}

.form-group input,
.form-group textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  padding: 0.85rem 1rem;
  outline: none;
  transition: var(--transition);
  resize: vertical;
}

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

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.04);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #ef4444;
}

.field-error {
  font-size: 0.72rem;
  color: #ef4444;
  min-height: 1em;
}

.btn-submit {
  width: 100%;
  justify-content: center;
  padding: 0.9rem;
  font-size: 0.9rem;
}

.form-success {
  text-align: center;
  color: #4ade80;
  font-size: 0.875rem;
  padding: 0.85rem;
  background: rgba(74, 222, 128, 0.06);
  border: 1px solid rgba(74, 222, 128, 0.18);
  border-radius: var(--radius-md);
}

/* ── 16. Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--bg-secondary);
}

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

.footer-copy {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.01em;
}

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

.footer-social a {
  color: var(--text-muted);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}
.footer-social a:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}
.footer-social a:focus-visible { outline-offset: 1px; }

/* ── 17. Responsive ── */
@media (max-width: 1024px) {
  .skills-categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-visual {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  :root { --section-gap: 5rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(8, 8, 8, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 0.2rem;
    margin: 0;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 0.65rem 0.8rem; }
  .nav-cta { display: none; }
  .nav-github { display: none; }
  .nav-github-mobile { display: block; }
  .nav-github-mobile a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 44px;
    padding: 0.65rem 0.8rem;
  }
  .nav-github-mobile a svg { flex-shrink: 0; }
  .nav-cta-mobile { display: block; margin-top: 0.5rem; }
  .nav-cta-mobile a { width: 100%; justify-content: center; min-height: 44px; }
  .hamburger { display: flex; margin-left: auto; }

  /* Mobile floating icons: scaled-down, low-opacity texture that never blocks taps or text */
  .floating-icons-bg {
    display: block;
    opacity: 0.22;
    pointer-events: none;
  }
  .fi-item { transform: scale(0.5); transform-origin: center center; }
  .fi-card {
    width: 44px;
    height: 44px;
    padding: 8px;
    border-radius: 12px;
    pointer-events: none;
    cursor: default;
  }
  .fi-card i { font-size: 1.5rem; }
  /* Keep inner-spread icons from landing directly over the centered headline.
     nth-child is used (not [style*=…]) because JS appends --fi-z and the
     browser re-serializes the style attribute with spaces, breaking substring
     matches. Order matches the .floating-icons-bg markup in index.html. */
  .floating-icons-bg .fi-item:nth-child(7),
  .floating-icons-bg .fi-item:nth-child(8),
  .floating-icons-bg .fi-item:nth-child(9),
  .floating-icons-bg .fi-item:nth-child(10),
  .floating-icons-bg .fi-item:nth-child(11) { display: none; }
  /* Clear the marquee zone: hide lower-spread and bottom-row icons on mobile
     so nothing overlaps the tech strip at the hero's bottom edge */
  .floating-icons-bg .fi-item:nth-child(3),
  .floating-icons-bg .fi-item:nth-child(6),
  .floating-icons-bg .fi-item:nth-child(12),
  .floating-icons-bg .fi-item:nth-child(13),
  .floating-icons-bg .fi-item:nth-child(14),
  .floating-icons-bg .fi-item:nth-child(15),
  .floating-icons-bg .fi-item:nth-child(16) { display: none; }

  .hero-section { padding: 6rem 1.25rem 4.5rem; }

  /* Tech marquee — hero's bottom band: full-bleed, larger, unobstructed */
  .hero-tech-strip {
    margin: 3rem -1.25rem 0;
    width: auto;
    max-width: none;
    padding-top: 1.9rem;
  }
  .marquee-set { gap: 2.5rem; padding: 0 1.25rem; }
  .marquee-set i {
    font-size: 2.75rem;
    filter: grayscale(0.15) opacity(0.9);
  }

  .hero-name { letter-spacing: -0.035em; }

  .hero-greeting::before,
  .hero-greeting::after { width: 16px; }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card:first-child {
    flex-direction: column;
    gap: 0.9rem;
  }

  .skills-categories { grid-template-columns: 1fr; }
  .certifications-grid { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 1.75rem 1.5rem; }

  .footer-inner { flex-direction: column; text-align: center; }

  .timeline { padding-left: 1.5rem; }
  .timeline-card { padding: 1.5rem; }

  .about-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .hero-section { padding: 5.5rem 1rem 3.5rem; }
  .hero-name {
    font-size: clamp(2.6rem, 12vw, 3.5rem);
    letter-spacing: -0.03em;
  }
  .hero-greeting {
    font-size: 0.68rem;
    gap: 0.5rem;
  }
  .hero-greeting::before,
  .hero-greeting::after { width: 14px; }
  .hero-title-wrapper {
    font-size: clamp(0.85rem, 4vw, 1rem);
    gap: 0.35rem;
  }
  .hero-bio { font-size: 0.9rem; margin-bottom: 2rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
  .about-actions .btn { flex: 1; }
  .section-title { letter-spacing: -0.025em; }
  .timeline-header { flex-direction: column; }
  .section-header { margin-bottom: 2.5rem; }

  /* Marquee stays large on small screens — hero's bottom band */
  .marquee-set { gap: 2.1rem; padding: 0 1.05rem; }
  .marquee-set i { font-size: 2.4rem; }

  /* Widen the fade-in zone so more icons are visible at narrow widths */
  .hero-tech-strip {
    margin: 2.5rem -1rem 0;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  }

  .about-visual {
    gap: 1.5rem;
    width: 100%;
  }
  .about-avatar { transform: scale(0.85); }
  .about-stats { grid-template-columns: 1fr; }

  .stat-card { padding: 1rem 0.5rem; }
  .stat-number { font-size: 1.4rem; }

  .contact-form { padding: 1.5rem 1rem; }
  .contact-link { word-break: break-word; }

  .footer-copy { font-size: 0.7rem; }
}

@media (max-width: 360px) {
  .hero-name { font-size: 2.4rem; }
  .hero-bio { font-size: 0.85rem; }
  .btn { padding: 0.65rem 1.2rem; font-size: 0.82rem; }
  .section-title { font-size: clamp(1.6rem, 7vw, 1.9rem); }
  .about-highlights { grid-template-columns: 1fr; }
}

/* ── 18. Global focus indicator ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── 19. Selection ── */
::selection {
  background: rgba(34, 211, 238, 0.2);
  color: var(--text-primary);
}

/* ── 20. Floating Icons Hero Background ── */
.floating-icons-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Outer wrapper: handles mouse-repel transform */
.fi-item {
  position: absolute;
  pointer-events: auto;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Inner card: handles entrance + floating animation */
.fi-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(20, 20, 20, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  /* entrance */
  opacity: 0;
  scale: 0.5;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              scale 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.fi-card.fi-visible {
  opacity: 1;
  scale: 1;
}

.fi-card i {
  font-size: 2.4rem;
  line-height: 1;
}

/* Float animation keyframe variants */
@keyframes fi-float-a {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%       { transform: translate(6px, -8px) rotate(5deg); }
  75%       { transform: translate(-6px, 8px) rotate(-5deg); }
}
@keyframes fi-float-b {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33%       { transform: translate(-7px, -6px) rotate(-4deg); }
  66%       { transform: translate(5px, 9px) rotate(3deg); }
}
@keyframes fi-float-c {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  40%       { transform: translate(8px, 5px) rotate(6deg); }
  80%       { transform: translate(-4px, -7px) rotate(-3deg); }
}
@keyframes fi-float-d {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20%       { transform: translate(-5px, 7px) rotate(-5deg); }
  60%       { transform: translate(7px, -5px) rotate(4deg); }
}

.fi-card.fi-visible.fi-anim-a { animation: fi-float-a 7s ease-in-out infinite; }
.fi-card.fi-visible.fi-anim-b { animation: fi-float-b 9s ease-in-out infinite; }
.fi-card.fi-visible.fi-anim-c { animation: fi-float-c 6s ease-in-out infinite; }
.fi-card.fi-visible.fi-anim-d { animation: fi-float-d 8s ease-in-out infinite; }

/* floating icons are fully hidden at ≤768px via .floating-icons-bg { display: none } */

@media (prefers-reduced-motion: reduce) {
  .fi-card { animation: none !important; transition: none !important; }
  .fi-item { transition: none !important; }
  .avail-dot { animation: none !important; }
  .timeline-item:first-child .timeline-dot { animation: none !important; }
  .marquee-track { animation: none !important; }
}

/* ── 25. Scroll-to-top button ── */
.scroll-top {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 42px;
  height: 42px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 998;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition),
              border-color var(--transition), color var(--transition),
              background var(--transition);
  pointer-events: none;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top:hover {
  border-color: var(--border-hover);
  color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}

.scroll-top:active {
  transform: translateY(0) scale(0.95);
}

/* ── 21. Availability badge & dot ── */
.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(74, 222, 128, 0.06);
  border: 1px solid rgba(74, 222, 128, 0.18);
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #4ade80;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeInUp 0.55s var(--spring) 0.05s forwards;
}

.avail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  animation: dot-pulse 2.2s ease-in-out infinite;
}

.nav-cta .avail-dot {
  width: 5px;
  height: 5px;
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
  55%       { box-shadow: 0 0 0 4px rgba(74, 222, 128, 0); }
}

/* ── 22. Timeline live pulse (current role) ── */
.timeline-item:first-child .timeline-dot {
  animation: live-pulse 2.8s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% {
    box-shadow: 0 0 0 1px var(--accent), 0 0 12px rgba(34, 211, 238, 0.35);
  }
  50% {
    box-shadow: 0 0 0 1px var(--accent), 0 0 20px rgba(34, 211, 238, 0.5), 0 0 0 5px rgba(34, 211, 238, 0.1);
  }
}

/* ── 23. Confetti particles ── */
.confetti-particle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  animation: confetti-burst var(--duration, 0.85s) var(--spring) forwards;
}

@keyframes confetti-burst {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx, 0px), var(--ty, -60px)) rotate(var(--rot, 180deg)) scale(0.2); }
}

/* ═════════════════════════════════════════════════════════════
   26. Magnetic buttons
   ═════════════════════════════════════════════════════════════ */
.btn.magnetic {
  transition: transform 0.25s var(--spring), background var(--transition),
              border-color var(--transition), box-shadow var(--transition);
}

.btn.magnetic:hover {
  transform: translate(var(--mag-x, 0px), calc(var(--mag-y, 0px) - 2px));
}

.btn.magnetic:active {
  transform: translate(var(--mag-x, 0px), calc(var(--mag-y, 0px) - 2px)) scale(0.97) !important;
}

/* ═════════════════════════════════════════════════════════════
   27. 3D card tilt + glare
   ═════════════════════════════════════════════════════════════ */
.project-card,
.skill-category,
.cert-card,
.timeline-card,
.stat-card,
.highlight-item,
.contact-form {
  transform-style: preserve-3d;
  transition: transform 0.35s var(--spring), background var(--transition), border-color var(--transition);
}

.project-card.tilt-active,
.skill-category.tilt-active,
.cert-card.tilt-active,
.timeline-card.tilt-active,
.stat-card.tilt-active,
.highlight-item.tilt-active,
.contact-form.tilt-active {
  transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) scale3d(1.015, 1.015, 1.015);
}

.card-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  border-radius: inherit;
  background: radial-gradient(
    280px circle at var(--mouse-x, -400px) var(--mouse-y, -400px),
    rgba(34, 211, 238, 0.12),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.tilt-active .card-glare {
  opacity: 1;
}

/* ═════════════════════════════════════════════════════════════
   28. Scroll-driven timeline progress line
   ═════════════════════════════════════════════════════════════ */
.timeline-progress {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  width: 1px;
  height: calc(100% - 1rem);
  background: linear-gradient(to bottom, var(--accent) 0%, rgba(34, 211, 238, 0.25) 100%);
  transform-origin: top center;
  transform: scaleY(0);
  pointer-events: none;
  z-index: 1;
}

/* ═════════════════════════════════════════════════════════════
   29. Skill-badge cascade stagger
   ═════════════════════════════════════════════════════════════ */
.skill-category.visible .skill-badge {
  animation: badge-pop 0.4s var(--spring) calc(var(--i, 0) * 45ms) both;
}

@keyframes badge-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═════════════════════════════════════════════════════════════
   30. Animated gradient border on featured project & certs
   ═════════════════════════════════════════════════════════════ */
.project-card:first-child,
.cert-card {
  position: relative;
}

.project-card:first-child::after,
.cert-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--border-angle, 0deg), transparent 0%, var(--accent) 18%, transparent 36%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 3;
}

.project-card:first-child:hover::after,
.cert-card:hover::after {
  opacity: 1;
  animation: border-rotate 3s linear infinite;
}

@property --border-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@keyframes border-rotate {
  to { --border-angle: 360deg; }
}

/* ═════════════════════════════════════════════════════════════
   31. Section label bracket pulse
   ═════════════════════════════════════════════════════════════ */
.section-label::before {
  transition: transform 0.3s var(--spring), box-shadow 0.3s;
  transform-origin: left center;
}

.section-header:hover .section-label::before {
  transform: scaleX(1.6);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.35);
}

/* ═════════════════════════════════════════════════════════════
   32. Floating icons 3D depth
   ═════════════════════════════════════════════════════════════ */
.fi-item {
  transform-style: preserve-3d;
}

.fi-card {
  transform: translateZ(var(--fi-z, 0px));
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* ═════════════════════════════════════════════════════════════
   33. Reduced-motion overrides for new animations
   ═════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .hero-content,
  .hero-content > *,
  .project-card,
  .skill-category,
  .cert-card,
  .timeline-card,
  .stat-card,
  .highlight-item,
  .contact-form,
  .fi-item,
  .fi-card {
    transform: none !important;
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .hero-grid {
    transform: none !important;
    transition: none !important;
  }

  .timeline-progress {
    transform: scaleY(1) !important;
    transition: none !important;
  }

  .card-glare,
  .project-card:first-child::after,
  .cert-card::after {
    opacity: 0 !important;
    animation: none !important;
  }

  .btn.magnetic:hover,
  .btn.magnetic:active {
    transform: none !important;
  }

  html.reveal-animate .reveal,
  html.reveal-animate .reveal.visible,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
