/* ============================================================
   Anik Sen — Glassmorphic Portfolio
   Custom CSS, no framework.
   ============================================================ */

/* ---- Theme tokens ---- */
:root {
  --bg: hsl(235, 50%, 6%);
  --bg-2: hsl(235, 45%, 9%);
  --fg: hsl(210, 40%, 98%);
  --muted: hsl(215, 20%, 65%);
  --border: hsla(0, 0%, 100%, 0.08);
  --border-soft: hsla(0, 0%, 100%, 0.05);

  --primary: hsl(270, 85%, 60%); /* electric violet */
  --primary-rgb: 159, 84, 240;
  --secondary: hsl(190, 90%, 50%); /* cyan */
  --secondary-rgb: 13, 200, 235;
  --accent: hsl(320, 85%, 60%); /* magenta */
  --accent-rgb: 239, 79, 191;

  --glass-bg: rgba(15, 17, 35, 0.45);
  --glass-bg-2: rgba(10, 11, 22, 0.65);

  --radius-sm: 0.5rem;
  --radius: 0.875rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;

  /* 8 px spacing system — use these everywhere */
  --space-1: 0.5rem; /*  8 */
  --space-2: 1rem; /* 16 */
  --space-3: 1.5rem; /* 24 */
  --space-4: 2rem; /* 32 */
  --space-5: 3rem; /* 48 */
  --space-6: 4rem; /* 64 */
  --space-7: 6rem; /* 96 */
  --space-8: 8rem; /* 128 */

  --shadow-glow-violet: 0 0 30px rgba(var(--primary-rgb), 0.35);
  --shadow-glow-cyan: 0 0 30px rgba(var(--secondary-rgb), 0.3);

  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;

  --container-w: 1240px;
  --container-hero: 1200px;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 20% 10%,
      rgba(var(--primary-rgb), 0.08),
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 90%,
      rgba(var(--secondary-rgb), 0.06),
      transparent 55%
    ),
    var(--bg);
}
body[data-appearance-background="solid"] {
  background: var(--bg);
}
body[data-appearance-background="linear"] {
  background: linear-gradient(
    135deg,
    var(--bg),
    rgba(var(--primary-rgb), 0.22),
    rgba(var(--secondary-rgb), 0.16)
  );
}
body[data-appearance-background="radial"] {
  background:
    radial-gradient(
      circle at 20% 10%,
      rgba(var(--primary-rgb), 0.28),
      transparent 55%
    ),
    var(--bg);
}
body[data-appearance-background="aurora"] {
  background:
    radial-gradient(
      circle at 20% 10%,
      rgba(var(--primary-rgb), 0.18),
      transparent 52%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(var(--secondary-rgb), 0.15),
      transparent 55%
    ),
    var(--bg);
}
body[data-appearance-animated="1"] .background-orbs {
  animation-duration: var(--appearance-speed, 18s);
}
body[data-appearance-animated="0"] .background-orbs .orb {
  animation: none;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
input,
textarea {
  font-family: inherit;
  color: inherit;
}

::selection {
  background: rgba(var(--primary-rgb), 0.4);
  color: white;
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 768px) {
  .container {
    padding: 0 3rem;
  }
}
.section {
  position: relative;
  padding: 6rem 0;
  z-index: 1;
}
@media (max-width: 640px) {
  .section {
    padding: 4rem 0;
  }
}

/* ---- Background orbs + noise ---- */
.background-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.starfield.is-visible {
  opacity: 0.8;
}
body[data-theme-mode="light"] .starfield {
  display: none;
}
body[data-theme-mode="system"] .starfield {
  display: block;
}
@media (max-width: 640px) {
  .starfield.is-visible {
    opacity: 0.55;
  }
}
body.theme-light {
  --bg: #f5f7fb;
  --bg-2: #e9edf5;
  --fg: #172033;
  --muted: #56627a;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-2: rgba(255, 255, 255, 0.88);
  --border: rgba(23, 32, 51, 0.14);
  --border-soft: rgba(23, 32, 51, 0.08);
}
body.theme-light .background-orbs,
body.theme-light .noise-overlay {
  opacity: 0.18;
}
.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  margin-left: auto;
}
.theme-switcher-select {
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--glass-bg-2);
  color: var(--fg);
  padding: 0.35rem 0.45rem;
  font-size: 0.75rem;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: orbFloat 18s ease-in-out infinite;
}
.orb-violet {
  width: 600px;
  height: 600px;
  top: -120px;
  left: -180px;
  background: radial-gradient(
    circle,
    rgba(var(--primary-rgb), 0.55),
    transparent 65%
  );
}
.orb-cyan {
  width: 520px;
  height: 520px;
  bottom: -120px;
  right: -120px;
  background: radial-gradient(
    circle,
    rgba(var(--secondary-rgb), 0.45),
    transparent 70%
  );
  animation-delay: -6s;
  animation-duration: 22s;
}
.orb-magenta {
  width: 460px;
  height: 460px;
  top: 45%;
  left: 55%;
  background: radial-gradient(
    circle,
    rgba(var(--accent-rgb), 0.35),
    transparent 70%
  );
  animation-delay: -12s;
  animation-duration: 26s;
}
@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(40px, -30px) scale(1.06);
  }
  66% {
    transform: translate(-30px, 40px) scale(0.96);
  }
}
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, var(--appearance-overlay, 0));
}
.site-notice {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  padding: 0.8rem 3.5rem 0.8rem 1rem;
  background: rgba(var(--primary-rgb), 0.16);
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  text-align: center;
}
.site-notice > div {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: center;
}
.site-notice span {
  color: var(--muted);
  font-size: 0.9rem;
}
.site-notice-close {
  position: absolute;
  right: 1rem;
  padding: 0.5rem;
  color: var(--muted);
}
.site-notice[hidden] {
  display: none;
}
.site-notice-critical {
  background: rgba(244, 63, 94, 0.16);
}
.site-notice-marquee > div {
  animation: noticeMarquee 18s linear infinite;
}
@keyframes noticeMarquee {
  from {
    transform: translateX(12%);
  }
  to {
    transform: translateX(-12%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .site-notice-marquee > div {
    animation: none;
  }
}
@media (max-width: 640px) {
  .site-notice {
    flex-direction: column;
    padding-right: 3rem;
  }
}
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 960px;
  margin: auto;
  padding: 1rem 1.25rem;
  background: var(--glass-bg-2);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.cookie-banner[hidden],
.cookie-settings[hidden] {
  display: none;
}
.cookie-banner h2 {
  margin: 0;
  font: 700 1rem var(--font-display);
}
.cookie-banner p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.cookie-actions,
.cookie-options {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.cookie-options {
  width: 100%;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-cookie-settings {
  color: var(--muted);
  text-decoration: underline;
  font-size: 0.8rem;
}
@media (max-width: 640px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-actions .btn {
    flex: 1;
    justify-content: center;
    min-width: 0;
    padding-inline: 0.6rem;
    font-size: 0.8rem;
  }
}

/* ---- Glass card primitive ---- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 20px 50px -10px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition:
    transform 0.25s ease,
    box-shadow 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
  will-change: transform;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}
.btn-pill {
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), hsl(280, 85%, 55%));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-primary.glow {
  box-shadow: var(--shadow-glow-violet);
}
.btn-primary.glow:hover {
  box-shadow: 0 0 40px rgba(var(--primary-rgb), 0.55);
}
.btn-primary-soft {
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb), 0.3);
}
.btn-primary-soft:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-glass {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--fg);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.07);
}
.btn-outline {
  background: transparent;
  border: 1px solid rgba(var(--secondary-rgb), 0.55);
  color: var(--fg);
  box-shadow: inset 0 0 0 1px rgba(var(--secondary-rgb), 0);
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}
.btn-outline i {
  color: var(--secondary);
  transition: transform 0.25s ease;
}
.btn-outline:hover {
  background: rgba(var(--secondary-rgb), 0.08);
  border-color: var(--secondary);
  box-shadow: 0 0 22px rgba(var(--secondary-rgb), 0.35);
  transform: translateY(-1px);
}
.btn-outline:hover i {
  transform: translateY(2px);
}
.btn-block {
  width: 100%;
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1rem var(--space-3);
  transition: padding 0.3s ease;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  max-width: var(--container-hero);
  margin: 0 auto;
  padding: 0.65rem 1rem 0.65rem 1.25rem;
  border-radius: 999px;
  background: rgba(10, 11, 20, 0.55);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.6);
  transition:
    padding 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}
.navbar.scrolled .nav-inner {
  padding: 0.45rem 1rem 0.45rem 1.25rem;
  background: rgba(10, 11, 20, 0.78);
  box-shadow: 0 10px 36px -12px rgba(0, 0, 0, 0.7);
}
@media (min-width: 900px) {
  .navbar {
    padding: 1.25rem var(--space-3);
  }
  .nav-inner {
    padding: 0.6rem 0.6rem 0.6rem 1.6rem;
  }
}
.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.logo-dot {
  color: var(--primary);
}
.nav-desktop {
  display: none;
  align-items: center;
  gap: 2.5rem;
}
.nav-desktop ul {
  display: flex;
  gap: 1.5rem;
}
.nav-desktop a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.25s ease;
  position: relative;
}
.nav-desktop a:hover {
  color: var(--fg);
}
.nav-desktop a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.nav-toggle {
  font-size: 1.25rem;
  padding: 0.5rem;
  color: var(--fg);
}
@media (min-width: 900px) {
  .nav-desktop {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}

/* ---- Mobile nav (compact glass panel) ---- */
.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 6, 14, 0);
  visibility: hidden;
  transition:
    background 0.3s ease,
    visibility 0s linear 0.35s;
  overscroll-behavior: contain;
}
.nav-mobile.open {
  background: rgba(5, 6, 14, 0.5);
  visibility: visible;
  transition:
    background 0.3s ease,
    visibility 0s linear 0s;
}

/* Compact card pinned to top-right, just below the navbar */
.nav-mobile-panel {
  position: absolute;
  top: max(env(safe-area-inset-top), 4.75rem);
  right: clamp(0.75rem, 4vw, 1.25rem);
  width: min(85vw, 18rem);
  display: flex;
  flex-direction: column;
  padding: 0.85rem;
  background:
    radial-gradient(
      420px 220px at 100% -10%,
      rgba(var(--secondary-rgb), 0.16),
      transparent 60%
    ),
    radial-gradient(
      360px 240px at 0% 110%,
      rgba(var(--primary-rgb), 0.18),
      transparent 65%
    ),
    rgba(10, 11, 22, 0.82);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 24px 60px -20px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform-origin: top right;
  transform: translateY(-8px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.25s ease;
}
.nav-mobile.open .nav-mobile-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Close button — small, top-right inside panel */
.nav-mobile-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.nav-mobile-close:hover,
.nav-mobile-close:focus-visible {
  background: rgba(var(--primary-rgb), 0.18);
  border-color: rgba(var(--primary-rgb), 0.55);
  color: #fff;
  transform: rotate(90deg);
}

/* Link list */
.nav-mobile-body {
  padding-top: 2rem;
}
.nav-mobile-body ul {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-mobile-link {
  display: block;
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--fg);
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}
.nav-mobile-link:hover,
.nav-mobile-link:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.nav-mobile-link.is-active {
  color: #fff;
  background: linear-gradient(
    135deg,
    rgba(var(--primary-rgb), 0.22),
    rgba(var(--secondary-rgb), 0.1)
  );
  border-color: rgba(var(--primary-rgb), 0.45);
}

/* Lock body scroll while menu is open */
body.menu-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .nav-mobile-panel {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ---- Reveal animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal[data-reveal="left"] {
  transform: translateX(-40px);
}
.reveal[data-reveal="right"] {
  transform: translateX(40px);
}
.reveal.in-view {
  opacity: 1;
  transform: translate(0, 0);
}

/* ---- Section eyebrows ---- */
.section-eyebrow,
.centered-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}
.section-eyebrow.centered,
.centered-eyebrow {
  justify-content: center;
  flex-direction: row;
}
.centered-eyebrow {
  flex-direction: column;
  gap: 1rem;
}
.eyebrow-line {
  height: 1px;
  width: 3rem;
  background: linear-gradient(90deg, transparent, var(--primary));
}
.section-eyebrow.centered .eyebrow-line:last-child {
  background: linear-gradient(90deg, var(--primary), transparent);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.section-title.centered {
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  margin-top: 0.5rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}
.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 1.5rem;
  backdrop-filter: blur(16px);
}

/* ---- Hero ---- */
.section-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: clamp(7rem, 14vw, 10rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
}
.hero-container {
  width: 100%;
  max-width: var(--container-hero);
  margin: 0 auto;
  padding: 0 var(--space-3);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
  text-align: center;
}
@media (min-width: 768px) {
  .hero-container {
    padding: 0 var(--space-4);
    grid-template-columns: 1.05fr 1fr;
    gap: var(--space-2); /* tighter gap for cohesive composition */
    text-align: left;
  }
}
@media (min-width: 1024px) {
  .hero-container {
    /* Pull text and avatar much closer together for a unified hero. */
    grid-template-columns: 1.1fr 1fr;
    gap: var(--space-1);
    padding: 0 var(--space-4);
  }
}
@media (min-width: 1280px) {
  .hero-container {
    gap: 0; /* avatar visually hugs the text block */
    max-width: 1280px;
  }
}
.hero-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 36rem;
  align-items: center;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .hero-text {
    align-items: flex-start;
    margin: 0;
  }
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.3);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
  width: max-content;
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.8);
  }
}
.hero-title {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  justify-content: flex-start;
}
.hero-title .line {
  display: block;
}
.hero-name {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 0%, #d8c8ff 45%, #8ab4ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.25),
    0 0 40px rgba(var(--primary-rgb), 0.18);
  filter: drop-shadow(0 6px 18px rgba(var(--primary-rgb), 0.18));
}
.hero-dynamic {
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  min-height: calc(1em * 1.25);
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.05em;
  min-width: 0;
}
.typing-accent {
  background: linear-gradient(135deg, #8ab4ff 0%, #b58dff 50%, #6dd5ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  white-space: pre;
  overflow-wrap: anywhere;
}
/* Refined typing cursor — thin vertical bar with a smooth fade
   instead of a hard binary blink. Matches the gradient text accent. */
.typed-cursor {
  display: inline-block;
  width: 2px; /* thin, not a thick "|" glyph */
  height: 1em;
  margin-left: 0.18em;
  border-radius: 2px;
  background: linear-gradient(180deg, #8ab4ff 0%, #b58dff 100%);
  box-shadow: 0 0 8px rgba(138, 180, 255, 0.55);
  color: transparent; /* hide the literal "|" glyph */
  vertical-align: -0.05em;
  transform-origin: center;
  animation: typed-blink 1.05s ease-in-out infinite;
  will-change: opacity;
}
@keyframes typed-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.05;
  }
}
@media (prefers-reduced-motion: reduce) {
  .typed-cursor {
    animation: none;
  }
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-1);
  justify-content: center;
}
@media (min-width: 768px) {
  .hero-ctas {
    justify-content: flex-start;
  }
}
/* Soft pulse on the primary hero CTA, calmed on hover */
.hero-ctas .btn-primary.glow {
  position: relative;
  animation: ctaPulse 2.6s ease-in-out infinite;
}
.hero-ctas .btn-primary.glow:hover {
  animation: none;
  box-shadow:
    0 0 50px rgba(var(--primary-rgb), 0.65),
    0 0 90px rgba(var(--accent-rgb), 0.3);
}
.hero-ctas .btn i {
  transition:
    transform 0.25s ease,
    color 0.25s ease;
}
.hero-ctas .btn:hover i {
  transform: translateX(3px);
}
.hero-ctas .btn-outline:hover i {
  color: var(--secondary);
}
@keyframes ctaPulse {
  0%,
  100% {
    box-shadow: 0 0 24px rgba(var(--primary-rgb), 0.3);
  }
  50% {
    box-shadow:
      0 0 42px rgba(var(--primary-rgb), 0.55),
      0 0 70px rgba(var(--accent-rgb), 0.25);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-ctas .btn-primary.glow {
    animation: none;
  }
}

/* Frameless 3D avatar — sits "naked" on the hero background, no border/frame */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  /* slow-motion floating composition */
  animation: heroFloat 9s ease-in-out infinite;
  will-change: transform;
}
@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-18px) rotate(-0.35deg);
  }
}
/* Soft circular halo that gently pulses behind the frameless avatar.
   Replaces the old hard conic-gradient ring frame — gives depth without
   a visible container box. */
.hero-glow {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(var(--primary-rgb), 0.55),
      transparent 55%
    ),
    radial-gradient(
      circle at 65% 60%,
      rgba(var(--secondary-rgb), 0.4),
      transparent 60%
    ),
    radial-gradient(
      circle at 35% 70%,
      rgba(var(--accent-rgb), 0.28),
      transparent 65%
    );
  filter: blur(70px);
  opacity: 0.85;
  z-index: 0;
  pointer-events: none;
  animation: heroGlowPulse 7s ease-in-out infinite;
  will-change: opacity, transform;
}
@keyframes heroGlowPulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

/* Frameless wrapper — no border, no ring, no mask. The transparent avatar
   PNG sits "naked" against the dark hero background. */
.hero-avatar-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-avatar-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  border: 0;
  background: transparent;
  object-fit: contain;
  object-position: center;
  /* Premium soft drop-shadow + theme-matched purple/blue glow */
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 55px rgba(var(--primary-rgb), 0.4))
    drop-shadow(0 0 90px rgba(var(--secondary-rgb), 0.22));
}
/* Slow-motion floating effect on the avatar itself for dynamic depth. */
.floaty {
  animation: floaty 7.5s ease-in-out infinite;
  will-change: transform;
}
@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(-0.5deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .floaty,
  .hero-glow {
    animation: none;
  }
}

/* Responsive scaling for the avatar — sized for the full composition
   (character + desk + tablet + floating icons) so nothing is ever cropped. */
@media (max-width: 767px) {
  .hero-visual {
    max-width: 460px;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-visual {
    max-width: 520px;
  }
}
@media (min-width: 1024px) {
  .hero-visual {
    max-width: 640px;
  }
}
@media (min-width: 1280px) {
  .hero-visual {
    max-width: 720px;
  }
}

/* Floating glass chip card — job titles as a glassmorphism accent badge.
   Anchored to the lower-right of the avatar composition so it reads as
   part of the floating-icons cluster instead of overlapping the figure. */
.hero-chip {
  position: absolute;
  z-index: 2;
  right: 2%;
  bottom: 6%;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.85rem 1.25rem;
  background:
    linear-gradient(
      135deg,
      rgba(var(--primary-rgb), 0.18),
      rgba(var(--secondary-rgb), 0.12)
    ),
    var(--glass-bg-2);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(var(--primary-rgb), 0.35);
  border-radius: 999px;
  box-shadow:
    0 12px 36px -10px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 28px rgba(var(--primary-rgb), 0.25);
  animation: floatyAlt 5s ease-in-out infinite;
}
@keyframes floatyAlt {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}
.hero-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow:
    0 0 12px var(--secondary),
    0 0 22px rgba(var(--secondary-rgb), 0.5);
}
.hero-chip-title {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 0 12px rgba(var(--primary-rgb), 0.55);
}
.hero-chip-sub {
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 0 10px rgba(var(--secondary-rgb), 0.45);
}

/* ---- Hero responsive typography & layout polish ---- */
/* Desktop & laptop (> 1024px): make the hero feel impactful and fill the space */
@media (min-width: 1024px) {
  .section-hero {
    padding-top: clamp(8rem, 12vw, 12rem);
    padding-bottom: clamp(5rem, 9vw, 8rem);
  }
  .hero-text {
    gap: var(--space-4);
    max-width: 42rem;
  }
  .hero-title {
    gap: 0.9rem;
    line-height: 1.02;
  }
  .hero-name {
    font-size: clamp(4.2rem, 5.4vw, 5.6rem);
  }
  .hero-dynamic {
    font-size: clamp(2rem, 2.6vw, 2.6rem);
  }
  .badge-pill {
    font-size: 0.95rem;
    padding: 0.5rem 1.15rem;
  }
  .hero-ctas {
    gap: var(--space-3);
    margin-top: var(--space-2);
  }
  .hero-ctas .btn {
    font-size: 1.05rem;
    padding: 1rem 2rem;
  }
  .hero-chip {
    padding: 1rem 1.4rem;
  }
  .hero-chip-title {
    font-size: 1.05rem;
  }
  .hero-chip-sub {
    font-size: 0.88rem;
  }
}
@media (min-width: 1440px) {
  .hero-name {
    font-size: clamp(5rem, 5.6vw, 6.2rem);
  }
  .hero-dynamic {
    font-size: clamp(2.4rem, 2.8vw, 3rem);
  }
  .hero-ctas .btn {
    font-size: 1.1rem;
    padding: 1.05rem 2.2rem;
  }
}

/* Reveal-on-load */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  animation-delay: var(--fade-delay, 0s);
}
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .fade-up {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .floaty,
  .hero-chip,
  .hero-glow {
    animation: none;
  }
}

/* ---- About ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 1080px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1.4fr 1fr;
    gap: 4rem;
  }
}
.about-bio p {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
  line-height: 1.75;
}
.about-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.about-card-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.about-card-title i {
  color: var(--primary);
}
.expertise-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.expertise-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  transition:
    background 0.25s,
    transform 0.25s;
}
.expertise-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}
.expertise-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.6rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.expertise-title {
  font-weight: 600;
}
.expertise-desc {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* ---- Skills ---- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1080px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.skills-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
}
.skills-card-title {
  margin: 0 0 2rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}
.skills-card-title.alt {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.skill-tag {
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-weight: 500;
  transition: all 0.3s ease;
}
.skill-tag:hover {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: rgba(var(--primary-rgb), 0.5);
  transform: translateY(-2px);
}
.software-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 0.85rem;
}
@media (min-width: 420px) {
  .software-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 720px) {
  .software-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1100px) {
  .software-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.software-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.01)
    ),
    rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.35s ease,
    border-color 0.35s ease,
    background 0.35s ease,
    box-shadow 0.35s ease;
}
.software-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, var(--brand), transparent 65%);
  opacity: 0;
  transition: opacity 0.45s ease;
  z-index: -1;
}
.software-tile::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--brand), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.software-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  box-shadow: 0 12px 30px -10px
    color-mix(in srgb, var(--brand) 45%, transparent);
}
.software-tile:hover::before {
  opacity: 0.18;
}
.software-tile:hover::after {
  opacity: 1;
}

.software-logo {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.7rem;
  background: var(--brand-bg);
  border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent);
  display: grid;
  place-items: center;
  color: var(--brand);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 0 color-mix(in srgb, var(--brand) 25%, transparent),
    inset 0 -8px 16px -8px color-mix(in srgb, var(--brand) 30%, transparent);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}
.software-tile:hover .software-logo {
  transform: scale(1.05) rotate(-2deg);
  border-color: var(--brand);
  box-shadow:
    inset 0 1px 0 0 color-mix(in srgb, var(--brand) 30%, transparent),
    inset 0 -8px 16px -8px color-mix(in srgb, var(--brand) 35%, transparent),
    0 0 24px color-mix(in srgb, var(--brand) 55%, transparent);
}
.logo-letters {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--brand);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}
.logo-svg {
  width: 1.65rem;
  height: 1.65rem;
  color: var(--brand);
  filter: drop-shadow(
    0 0 6px color-mix(in srgb, var(--brand) 60%, transparent)
  );
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .software-logo {
    border-color: var(--brand);
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
  }
  .software-tile:hover .software-logo {
    box-shadow: 0 0 18px var(--brand);
  }
  .logo-svg {
    filter: drop-shadow(0 0 5px var(--brand));
  }
}

.software-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.software-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.software-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .software-tile:hover {
    border-color: var(--brand);
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
  }
  .software-logo {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
  }
  .software-tile:hover .software-logo {
    box-shadow: 0 0 18px var(--brand);
  }
  .software-logo img {
    filter: drop-shadow(0 0 6px var(--brand));
  }
}

/* ---- Projects ---- */
.projects-header {
  text-align: center;
  margin-bottom: 3rem;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}
.filter-btn {
  padding: 0.55rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--glass-bg);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.filter-btn:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.08);
}
.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.4);
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}
@media (min-width: 600px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.project-card {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition:
    opacity 0.3s,
    transform 0.3s;
}
.project-card.is-hidden {
  display: none;
}
.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.project-card:hover img {
  transform: scale(1.08);
}
.project-overlay {
  position: absolute;
  inset: 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.5rem;
  background: linear-gradient(
    to top,
    rgba(10, 11, 22, 0.92) 10%,
    rgba(10, 11, 22, 0.4) 45%,
    transparent 75%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
}
.project-card:hover .project-overlay {
  opacity: 1;
}
.project-cat {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.project-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}
.project-link {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ---- Education ---- */
.education-container {
  max-width: 920px;
}
.education-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .education-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.education-card {
  position: relative;
  padding: 2rem;
  overflow: hidden;
  transition: border-color 0.3s;
}
.education-card:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
}
.edu-watermark {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 5rem;
  color: var(--accent);
  opacity: 0.06;
  transition: opacity 0.35s;
}
.education-card:hover .edu-watermark {
  opacity: 0.12;
}
.education-timeline {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem 0;
}
.education-timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    rgba(var(--secondary-rgb), 0.7),
    rgba(var(--primary-rgb), 0.25),
    transparent
  );
  border-radius: 2px;
}
.education-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  min-height: 9rem;
  margin-bottom: 2.5rem;
}
.education-timeline-item:nth-child(odd) .education-timeline-content {
  grid-column: 1;
  text-align: right;
}
.education-timeline-item:nth-child(even) .education-timeline-content {
  grid-column: 2;
}
.education-timeline-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  z-index: 2;
  border: 2px solid var(--secondary);
  border-radius: 50%;
  background: var(--bg);
  color: var(--secondary);
  box-shadow:
    0 0 0 8px rgba(var(--secondary-rgb), 0.1),
    0 0 24px rgba(var(--secondary-rgb), 0.25);
}
.education-timeline-content {
  padding: 1.5rem 1.75rem;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}
.education-timeline-content:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--secondary-rgb), 0.4);
}
.education-timeline-year {
  color: var(--secondary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.education-timeline-year i {
  margin-right: 0.35rem;
}
.education-timeline .edu-degree {
  margin: 0.45rem 0 0;
}
.education-timeline .edu-status {
  margin: 0.35rem 0 0;
  color: var(--muted);
}
.education-empty {
  padding: 2rem;
  color: var(--muted);
  text-align: center;
}
.pc-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}
.pc-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}
.pc-action:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--primary-rgb), 0.55);
}
.pc-action-live {
  color: var(--secondary);
  background: rgba(var(--secondary-rgb), 0.1);
}
.pc-action-code {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
}
@media (max-width: 767px) {
  .education-timeline {
    padding-left: 1.25rem;
  }
  .education-timeline::before {
    left: 1.25rem;
  }
  .education-timeline-item,
  .education-timeline-item:nth-child(odd),
  .education-timeline-item:nth-child(even) {
    display: block;
    min-height: 0;
    padding-left: 2rem;
  }
  .education-timeline-item:nth-child(odd) .education-timeline-content,
  .education-timeline-item:nth-child(even) .education-timeline-content {
    text-align: left;
  }
  .education-timeline-marker {
    left: 1.25rem;
    top: 1.5rem;
    width: 2rem;
    height: 2rem;
    font-size: 0.8rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .education-timeline-content {
    transition: none;
  }
}
.edu-year {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.edu-degree {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.edu-status {
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---- Reviews carousel ---- */
.reviews-header {
  text-align: center;
  margin-bottom: 3rem;
}
.carousel {
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
}
.carousel-viewport {
  overflow: hidden;
}
.carousel-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  padding: 1rem 0.75rem;
}
@media (min-width: 768px) {
  .carousel-slide {
    flex-basis: 60%;
  }
}
@media (min-width: 1024px) {
  .carousel-slide {
    flex-basis: 50%;
  }
}
.review-card {
  padding: 2.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  min-height: 280px;
}
.review-quote {
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  font-size: 2.5rem;
  color: rgba(var(--primary-rgb), 0.18);
}
.review-text {
  font-size: 1.1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
}
.review-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.review-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.review-name {
  font-weight: 700;
}
.review-role {
  font-size: 0.85rem;
  color: var(--primary);
}
.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}
.carousel-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  color: var(--muted);
  font-size: 1rem;
  transition: all 0.25s ease;
}
.carousel-btn:hover {
  background: rgba(var(--primary-rgb), 0.15);
  color: var(--primary);
  border-color: var(--primary);
}

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  max-width: 1100px;
  margin: 0 auto;
}
@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
  }
}
.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  line-height: 1.05;
  margin: 0 0 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.contact-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 26rem;
  margin: 0 0 2.5rem;
}
.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.contact-meta li {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
}
.contact-meta a {
  color: var(--muted);
  transition: color 0.25s;
}
.contact-meta a:hover {
  color: var(--primary);
}
.contact-meta-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.social-row {
  display: flex;
  gap: 0.85rem;
}
.social-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.social-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.4);
}

.contact-form {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 600px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.field label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.field input,
.field textarea {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  width: 100%;
  color: var(--fg);
  font-size: 0.95rem;
}
.field textarea {
  resize: vertical;
  min-height: 140px;
}
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(var(--primary-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}
.field-error {
  color: hsl(0, 84%, 70%);
  font-size: 0.8rem;
  min-height: 1em;
}
.field.has-error input,
.field.has-error textarea {
  border-color: hsl(0, 84%, 60%);
  box-shadow: 0 0 0 3px hsla(0, 84%, 60%, 0.15);
}

#contactSubmit {
  padding: 1.1rem;
  font-size: 1rem;
}
#contactSubmit[disabled] {
  opacity: 0.7;
  cursor: wait;
}

/* ---- Footer ---- */
.footer {
  position: relative;
  z-index: 1;
  padding: 5rem 0 2rem;
  background: rgba(10, 11, 22, 0.6);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}
.footer-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .footer-row {
    flex-direction: row;
    justify-content: space-between;
  }
}
.footer-logo {
  font-size: 1.5rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}
.footer-links a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.25s;
}
.footer-links a:hover {
  color: var(--primary);
}
.back-to-top {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  color: var(--muted);
  transition: all 0.3s ease;
}
.back-to-top:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.45);
}
.footer-meta {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  padding-top: 2rem;
  border-top: 1px solid var(--border-soft);
}
.footer-meta p {
  margin: 0;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  min-width: 280px;
  max-width: 380px;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--glass-bg-2);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  color: var(--fg);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.6);
  transform: translateY(120%);
  opacity: 0;
  transition:
    transform 0.35s ease,
    opacity 0.35s;
  pointer-events: none;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast.error {
  border-color: rgba(239, 68, 68, 0.5);
}
.toast.success {
  border-color: rgba(var(--secondary-rgb), 0.6);
}

/* =====================================================================
   Projects v2 — two-tier filter, smart cards, video modal, lightbox
   ===================================================================== */
.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 560px;
  margin: 0.5rem auto 0;
  font-size: 0.95rem;
}
/* ---- Section eyebrow (small label above the title) ---- */
.section-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(168, 85, 247, 0.95);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.22);
  margin-bottom: 0.85rem;
}

/* ---- Filter stack ---- */
.filter-stack {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: center;
  width: 100%;
}

/* Main filter bar — pill group, centered, wraps on small screens */
.filter-bar.main-filter {
  flex-wrap: wrap;
  padding: 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
  margin-top: 0;
  max-width: 100%;
}
.filter-bar.main-filter .filter-btn {
  padding: 0.55rem 1.15rem;
  font-size: 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}
.filter-bar.main-filter .filter-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}
.filter-bar.main-filter .filter-btn.active {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 28px -10px rgba(168, 85, 247, 0.55);
}

/* Sub-filter bar — same pill look, horizontally scrollable on mobile */
.filter-bar.sub-filter {
  margin-top: 0;
  padding: 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  animation: subFade 0.35s ease;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
}
@keyframes subFade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.filter-btn.sub {
  padding: 0.4rem 0.95rem;
  font-size: 0.82rem;
  background: transparent;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  color: var(--muted);
}
.filter-btn.sub:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.filter-btn.sub.active {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.85),
    rgba(236, 72, 153, 0.85)
  );
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}
.sub-count {
  font-size: 0.65rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}

/* On phones, allow the sub-filter to scroll horizontally instead of wrapping into 4 lines */
@media (max-width: 640px) {
  .filter-bar.main-filter,
  .filter-bar.sub-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    max-width: calc(100vw - 2rem);
  }
  .filter-bar.main-filter::-webkit-scrollbar,
  .filter-bar.sub-filter::-webkit-scrollbar {
    display: none;
  }
}

/* ---- Toolbar above grid: counter + Load More + empty state ---- */
.projects-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0.5rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.projects-toolbar .pc-count strong {
  color: #fff;
  font-weight: 700;
}
.projects-loadmore-row {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}
.btn-loadmore {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  backdrop-filter: blur(14px);
}
.btn-loadmore:hover {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.25),
    rgba(236, 72, 153, 0.25)
  );
  border-color: rgba(168, 85, 247, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -14px rgba(168, 85, 247, 0.55);
}
.btn-loadmore[hidden] {
  display: none;
}
.projects-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}
.projects-empty i {
  color: rgba(168, 85, 247, 0.85);
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}
.projects-empty[hidden] {
  display: none;
}

/* Pagination "hidden because beyond current page" — kept separate from filter is-hidden */
.project-card.is-paged-hidden {
  display: none;
}

/* ---- v2 grid + cards ---- */
.projects-grid.v2 {
  gap: 1.4rem;
}
@media (min-width: 700px) {
  .projects-grid.v2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  .projects-grid.v2 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1400px) {
  .projects-grid.v2 {
    grid-template-columns: repeat(4, 1fr);
  }
}
.project-card.v2 {
  aspect-ratio: auto;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  background: rgba(20, 22, 38, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    opacity 0.35s ease;
  backdrop-filter: blur(18px) saturate(140%);
}
.project-card.v2:hover {
  transform: translateY(-6px);
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 25px 55px -25px rgba(168, 85, 247, 0.55);
}
.project-card.v2.is-hidden {
  display: none;
}
.pc-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a0b16;
}
.pc-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.8s ease,
    filter 0.35s;
}
.project-card.v2:hover .pc-media img {
  transform: scale(1.07);
  filter: brightness(1.05);
}
.pc-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(8, 10, 24, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}
.pc-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 12px 30px -8px rgba(168, 85, 247, 0.6);
  opacity: 0;
  transition:
    opacity 0.35s,
    transform 0.35s;
}
.pc-play.kind-gallery {
  background: linear-gradient(135deg, #06b6d4, #6366f1);
}
.pc-play.kind-link {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-size: 1rem;
}
.project-card.v2:hover .pc-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.pc-body {
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.pc-title {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0;
  color: var(--fg);
}
.pc-skills {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}
.pc-software {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.15rem;
}
.sw-chip {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s;
}
.sw-chip:hover {
  transform: translateY(-2px);
}

/* ---- Modals (shared shell) ----
   Overlay sits above EVERYTHING — including the fixed glass navbar
   (z-index 50) and the mobile nav panel (z-index 60). A generous top
   padding guarantees the stage (and its close button) start well below
   the floating header on every breakpoint. */
body.pj-locked {
  overflow: hidden;
}
.pj-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 12, 0.88);
  backdrop-filter: blur(18px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 1.5rem; /* extra top padding clears the fixed navbar */
  animation: pjFade 0.25s ease;
}
.pj-modal[hidden],
.filter-bar[hidden] {
  display: none !important;
}
@media (min-width: 900px) {
  .pj-modal {
    padding: 6rem 2rem 2rem;
  }
}

/* ============ Trusted Clients section ============ */
.clients-strip {
  margin-top: 2.5rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
  padding: 0.5rem 0;
}
.clients-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: clientsScroll 36s linear infinite;
}
.clients-strip:hover .clients-track {
  animation-play-state: paused;
}
@keyframes clientsScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
.client-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 158px;
  height: 130px;
  padding: 1rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  cursor: default;
}
a.client-card {
  cursor: pointer;
}
.client-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 14px 36px -14px rgba(168, 85, 247, 0.55);
}
.client-card img {
  max-width: 100%;
  max-height: 56px;
  object-fit: contain;
  filter: grayscale(0.6) brightness(1.05);
  opacity: 0.85;
  transition:
    filter 0.25s ease,
    opacity 0.25s ease;
}
.client-card:hover img {
  filter: none;
  opacity: 1;
}
.client-name {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
}
.client-fallback {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: #fff;
  font-weight: 800;
  font-size: 1.4rem;
}
@media (max-width: 700px) {
  .client-card {
    width: 130px;
    height: 110px;
    padding: 0.75rem;
  }
  .client-card img {
    max-height: 44px;
  }
}
@keyframes pjFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---- MODAL STAGE ----
   Constrain the video/image to a professional 16:9 frame with a clean cap
   on every breakpoint. The width caps below the viewport on every device,
   so the iframe is never stretched edge-to-edge — and the close button
   always has a safe, visible hit zone in the top-right corner. */
.pj-modal-stage {
  width: min(92vw, 1100px);
  max-width: 1200px;
  max-height: calc(100vh - 8rem); /* leaves room for header + bottom padding */
  margin: auto; /* centers within the overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative; /* anchor for the absolutely-positioned X */
}
.pj-modal-stage.video-stage {
  width: min(92vw, 1100px);
  aspect-ratio: 16 / 9;
  max-height: min(78vh, calc(92vw * 9 / 16));
}
@media (min-width: 900px) {
  .pj-modal-stage {
    width: min(80vw, 1100px);
  }
  .pj-modal-stage.video-stage {
    width: min(80vw, 1100px);
    max-height: min(75vh, calc(80vw * 9 / 16));
  }
}

/* ---- CLOSE BUTTON ----
   Always visible on every breakpoint (mobile, tablet, desktop). Anchored
   INSIDE the stage at top-right so it can never be clipped by the overlay
   padding or hidden behind the fixed navbar. */
.pj-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  background: rgba(8, 10, 24, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 20; /* topmost within the stage stacking ctx */
  display: inline-flex !important; /* always shown — never hidden by media query */
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.8);
  transition:
    background 0.2s,
    transform 0.2s,
    border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  pointer-events: auto;
}
.pj-close:hover,
.pj-close:focus-visible {
  background: rgba(168, 85, 247, 1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: rotate(90deg) scale(1.05);
  outline: none;
}
.pj-close i {
  pointer-events: none;
} /* every click hits the button itself */

/* Tablet & desktop: nudge the X slightly outward for a polished feel,
   but keep it inside the visible viewport area (never negative-positioned
   far enough to hide behind the fixed header). */
@media (min-width: 720px) {
  .pj-close {
    top: 12px;
    right: 12px;
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
  }
}
@media (min-width: 1024px) {
  .pj-close {
    top: 14px;
    right: 14px;
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
  }
}

.pj-player {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 90px -25px rgba(0, 0, 0, 0.7);
}
.pj-player iframe,
.pj-player video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.pj-empty {
  color: #fff;
  padding: 3rem 1rem;
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.8;
}
.pj-empty i {
  color: #f59e0b;
  margin-right: 0.35rem;
}

/* ---- Lightbox specifics ---- */
.pj-lightbox .pj-modal-stage {
  overflow: hidden;
  border-radius: 12px;
}
.pj-lightbox img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center;
  transition: transform 0.25s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.pj-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
  z-index: 5;
  transition:
    background 0.2s,
    transform 0.2s;
}
.pj-nav.prev {
  left: 1.25rem;
}
.pj-nav.next {
  right: 1.25rem;
}
.pj-nav:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-50%) scale(1.05);
}
.pj-zoom-bar {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: rgba(8, 10, 24, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}
.pj-zoom-bar button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.pj-zoom-bar button:hover {
  background: rgba(255, 255, 255, 0.18);
}
.pj-counter {
  position: absolute;
  top: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 10, 24, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  color: #fff;
  font-size: 0.78rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  z-index: 5;
  max-width: 70%;
  text-align: center;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .pj-nav.prev {
    left: 0.5rem;
  }
  .pj-nav.next {
    right: 0.5rem;
  }
  .pj-counter {
    font-size: 0.7rem;
    max-width: 60%;
  }
  .pc-title {
    font-size: 0.95rem;
  }
  .filter-bar.sub-filter {
    padding: 0.3rem;
    gap: 0.4rem;
  }
  .filter-btn.sub {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
  }
}

/* ============================================================
   Hero v2 polish — eyebrow, lede, stats strip, scroll cue, BG orbs
   (additive only — does not override existing hero rules)
   ============================================================ */

.section-hero {
  position: relative;
  overflow: hidden;
}

/* Floating background gradient orbs to add depth */
.hero-bg-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.hero-bg-orbs .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: orbDrift 18s ease-in-out infinite;
  will-change: transform;
}
.hero-bg-orbs .orb-1 {
  width: 520px;
  height: 520px;
  left: -120px;
  top: -80px;
  background: radial-gradient(
    circle,
    rgba(var(--primary-rgb), 0.55),
    transparent 65%
  );
}
.hero-bg-orbs .orb-2 {
  width: 460px;
  height: 460px;
  right: -80px;
  bottom: -120px;
  background: radial-gradient(
    circle,
    rgba(var(--secondary-rgb), 0.45),
    transparent 65%
  );
  animation-delay: -6s;
}
.hero-bg-orbs .orb-3 {
  width: 320px;
  height: 320px;
  left: 35%;
  bottom: 8%;
  background: radial-gradient(
    circle,
    rgba(var(--accent-rgb), 0.35),
    transparent 65%
  );
  animation-delay: -12s;
}
@keyframes orbDrift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, -20px) scale(1.08);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg-orbs .orb {
    animation: none;
  }
}

.hero-container {
  position: relative;
  z-index: 1;
}

/* Eyebrow above the name — softer typographic hierarchy */
.hero-eyebrow {
  display: block;
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 0.15em;
}

/* Premium support paragraph beneath the headline */
.hero-lede {
  margin: 0;
  color: rgba(230, 232, 244, 0.78);
  font-size: clamp(0.98rem, 1.15vw, 1.1rem);
  line-height: 1.6;
  max-width: 32rem;
}

/* Stats strip — three glassy mini cards */
.hero-stats {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  max-width: 30rem;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: center;
  border-radius: 16px;
  background:
    linear-gradient(
      135deg,
      rgba(var(--primary-rgb), 0.1),
      rgba(var(--secondary-rgb), 0.06)
    ),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px -22px rgba(0, 0, 0, 0.6);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}
.hero-stat:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--primary-rgb), 0.35);
  box-shadow: 0 18px 45px -20px rgba(var(--primary-rgb), 0.35);
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #b58dff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(230, 232, 244, 0.7);
  line-height: 1.25;
}

/* Center the stat strip on mobile, left-align on desktop */
@media (max-width: 767px) {
  .hero-stats {
    margin-left: auto;
    margin-right: auto;
    gap: 0.5rem;
  }
  .hero-stat {
    padding: 0.7rem 0.4rem;
  }
  .hero-stat-num {
    font-size: clamp(1.1rem, 5vw, 1.55rem);
  }
  .hero-stat-label {
    font-size: 0.6rem;
    letter-spacing: 0.04em;
  }
  .hero-lede {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .hero-stats {
    gap: 0.4rem;
  }
  .hero-stat {
    padding: 0.6rem 0.3rem;
    border-radius: 12px;
  }
  .hero-stat-num {
    font-size: 1rem;
  }
  .hero-stat-label {
    font-size: 0.55rem;
    letter-spacing: 0.02em;
  }
}

/* Scroll-down cue */
.hero-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(230, 232, 244, 0.65);
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  z-index: 2;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}
.hero-scroll-cue:hover {
  color: #fff;
  transform: translateX(-50%) translateY(-2px);
}
.hero-scroll-mouse {
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 12px;
  position: relative;
  display: block;
}
.hero-scroll-wheel {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 3px;
  height: 7px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 3px;
  transform: translateX(-50%);
  animation: scrollWheel 1.6s ease-in-out infinite;
}
@keyframes scrollWheel {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-4px);
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-wheel {
    animation: none;
  }
}
@media (max-width: 767px) {
  .hero-scroll-cue {
    display: none;
  }
}

/* ============================================================
   Experience Timeline — Professional vertical timeline with animations
   ============================================================ */
.experience-timeline {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Timeline line (vertical spine) */
.experience-timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(var(--primary-rgb), 0.6),
    rgba(var(--primary-rgb), 0.3),
    rgba(var(--primary-rgb), 0.1)
  );
  transform: translateX(-50%);
  animation: timelineReveal 0.8s ease-out 0.2s both;
  border-radius: 1px;
}

@keyframes timelineReveal {
  from {
    height: 0;
    opacity: 0;
  }
  to {
    height: 100%;
    opacity: 1;
  }
}

/* Individual timeline item */
.timeline-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  position: relative;
  align-items: center;
}

/* Alternate layout — odd items: content on left, marker on right */
.timeline-item:nth-child(odd) {
  grid-template-columns: 1fr 1fr;
  text-align: right;
}

/* Even items: marker on left, content on right */
.timeline-item:nth-child(even) {
  grid-template-columns: 1fr 1fr;
  text-align: left;
}

.timeline-item:nth-child(even) .timeline-marker {
  order: -1;
}

/* Timeline marker (circular dot on the spine) */
.timeline-marker {
  position: absolute;
  left: 50%;
  top: 1.75rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--primary);
  transform: translateX(-50%);
  z-index: 10;
  animation: markerPulse 0.6s ease-out 0.4s both;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.3);
}

.timeline-marker.active {
  width: 20px;
  height: 20px;
  box-shadow: 0 0 0 8px rgba(var(--primary-rgb), 0.15);
  animation: markerGlow 2s ease-in-out infinite;
}

@keyframes markerPulse {
  0% {
    transform: translateX(-50%) scale(0.3);
    opacity: 0;
  }
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}

@keyframes markerGlow {
  0%,
  100% {
    box-shadow: 0 0 0 8px rgba(var(--primary-rgb), 0.15);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(var(--primary-rgb), 0.08);
  }
}

/* Timeline content card */
.timeline-content {
  padding: 2rem;
  animation: cardSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
  opacity: 0.95;
  transition: all 0.3s ease;
}

.timeline-item:nth-child(odd) .timeline-content {
  animation-name: cardSlideRight;
}

.timeline-item:nth-child(even) .timeline-content {
  animation-name: cardSlideLeft;
}

@keyframes cardSlideRight {
  0% {
    transform: translateX(40px) scale(0.95);
    opacity: 0;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes cardSlideLeft {
  0% {
    transform: translateX(-40px) scale(0.95);
    opacity: 0;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

.timeline-content:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--primary-rgb), 0.5);
  box-shadow: 0 30px 60px -15px rgba(var(--primary-rgb), 0.25);
}

/* Experience header */
.experience-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.experience-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.company-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.5rem;
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.timeline-content:hover .company-logo {
  transform: scale(1.1) rotate(-2deg);
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.25);
}

.experience-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--fg);
}

.company-name {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0.25rem 0 0;
}

/* Badge for current/present status */
.badge-present {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.15),
    rgba(34, 197, 94, 0.08)
  );
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #86efac;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.3);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.1);
  }
}

/* Experience meta (dates, location, mode) */
.experience-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  transition: color 0.3s ease;
}

.timeline-content:hover .meta-item {
  color: rgba(var(--primary-rgb), 0.8);
}

.meta-item i {
  opacity: 0.7;
}

/* Experience description */
.experience-description {
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Experience section (responsibilities, achievements) */
.experience-section {
  margin-bottom: 1.5rem;
}

.experience-section h4 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(var(--primary-rgb), 0.9);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.experience-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.experience-list li {
  padding-left: 1.5rem;
  position: relative;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  line-height: 1.5;
}

.experience-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
  opacity: 0.6;
}

/* Technology badges */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  background: linear-gradient(
    135deg,
    rgba(var(--primary-rgb), 0.12),
    rgba(var(--secondary-rgb), 0.08)
  );
  border: 1px solid rgba(var(--primary-rgb), 0.25);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(var(--primary-rgb), 0.95);
  transition: all 0.3s ease;
}

.tech-badge:hover {
  background: linear-gradient(
    135deg,
    rgba(var(--primary-rgb), 0.2),
    rgba(var(--secondary-rgb), 0.15)
  );
  border-color: rgba(var(--primary-rgb), 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.2);
}

/* Experience footer */
.experience-footer {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.3);
  border-radius: 8px;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

.link-arrow:hover {
  background: rgba(var(--primary-rgb), 0.2);
  border-color: rgba(var(--primary-rgb), 0.6);
  transform: translateX(4px);
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.2);
}

.link-arrow i {
  transition: transform 0.3s ease;
  opacity: 0.8;
}

.link-arrow:hover i {
  transform: translate(2px, -2px);
  opacity: 1;
}

/* Responsive: Single column on tablet and mobile */
@media (max-width: 1024px) {
  .experience-timeline::before {
    left: 20px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0;
    margin-left: 60px;
    text-align: left !important;
  }

  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .timeline-marker {
    left: 0;
    top: 0;
  }

  .timeline-item:nth-child(even) .timeline-marker {
    order: 0;
  }

  .timeline-content {
    padding: 1.5rem;
  }

  .timeline-item:nth-child(odd) .timeline-content {
    animation: cardSlideLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
  }
}

@media (max-width: 640px) {
  .experience-timeline {
    padding: 1rem 0;
  }

  .experience-timeline::before {
    left: 8px;
  }

  .timeline-item {
    margin-left: 45px;
    margin-bottom: 2.5rem;
  }

  .timeline-marker {
    width: 14px;
    height: 14px;
    border-width: 2px;
    top: 0;
    left: 0;
  }

  .timeline-marker.active {
    width: 18px;
    height: 18px;
  }

  .timeline-content {
    padding: 1.25rem;
  }

  .experience-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .badge-present {
    align-self: flex-start;
  }

  .experience-title {
    font-size: 1.1rem;
  }

  .company-logo {
    width: 48px;
    height: 48px;
  }

  .experience-meta {
    flex-direction: column;
    gap: 0.6rem;
  }

  .tech-stack {
    gap: 0.5rem;
  }

  .tech-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
  }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .experience-timeline::before,
  .timeline-marker,
  .timeline-content,
  .company-logo,
  .badge-present,
  .tech-badge,
  .link-arrow {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================
   Certifications Section — Grid layout with card animations
   ============================================================ */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .certifications-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .certifications-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Certification card */
.certification-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  animation: certCardFade 0.6s ease-out both;
  opacity: 0.95;
}

.certification-card:nth-child(1) {
  animation-delay: 0.1s;
}
.certification-card:nth-child(2) {
  animation-delay: 0.15s;
}
.certification-card:nth-child(3) {
  animation-delay: 0.2s;
}
.certification-card:nth-child(n + 4) {
  animation-delay: 0.25s;
}

@keyframes certCardFade {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.certification-card:hover {
  transform: translateY(-8px);
  border-color: rgba(var(--primary-rgb), 0.5);
  box-shadow: 0 25px 60px -15px rgba(var(--primary-rgb), 0.3);
}

/* Certificate image container */
.cert-image-container {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(
    135deg,
    rgba(var(--primary-rgb), 0.08),
    rgba(var(--secondary-rgb), 0.06)
  );
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.certification-card:hover .cert-image {
  transform: scale(1.08);
}

.cert-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
}

.cert-placeholder i {
  font-size: 2.5rem;
  opacity: 0.4;
}

.cert-placeholder p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Certificate image overlay — "View Certificate" button */
.cert-image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
  z-index: 5;
}

.cert-image-container:hover .cert-image-overlay {
  opacity: 1;
}

.cert-view-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.cert-view-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.6);
}

.cert-view-btn:active {
  transform: scale(0.98);
}

.cert-view-btn i {
  opacity: 0.9;
}

/* Certificate content */
.cert-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.cert-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.4;
}

.cert-org {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.org-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem;
}

/* Certificate dates */
.cert-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.date-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: rgba(var(--secondary-rgb), 0.12);
  border: 1px solid rgba(var(--secondary-rgb), 0.25);
  border-radius: 8px;
  font-size: 0.8rem;
  color: rgba(var(--secondary-rgb), 0.9);
  font-weight: 500;
}

.date-badge i {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Certificate description */
.cert-description {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

/* Certification skills */
.cert-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  background: linear-gradient(
    135deg,
    rgba(var(--accent-rgb), 0.12),
    rgba(var(--primary-rgb), 0.08)
  );
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(var(--accent-rgb), 0.95);
  transition: all 0.3s ease;
}

.skill-badge:hover {
  background: linear-gradient(
    135deg,
    rgba(var(--accent-rgb), 0.2),
    rgba(var(--primary-rgb), 0.15)
  );
  border-color: rgba(var(--accent-rgb), 0.5);
  transform: translateY(-1px);
}

/* Certificate actions (View / Verify buttons) */
.cert-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-sm.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary),
    rgba(var(--primary-rgb), 0.8)
  );
  color: white;
  border: 1px solid rgba(var(--primary-rgb), 0.4);
}

.btn-sm.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.35);
  border-color: rgba(var(--primary-rgb), 0.6);
}

.btn-sm.btn-secondary {
  background: linear-gradient(
    135deg,
    var(--secondary),
    rgba(var(--secondary-rgb), 0.8)
  );
  color: white;
  border: 1px solid rgba(var(--secondary-rgb), 0.4);
}

.btn-sm.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(var(--secondary-rgb), 0.35);
  border-color: rgba(var(--secondary-rgb), 0.6);
}

.btn-sm i {
  font-size: 0.8rem;
}

/* Empty state for no certifications/experiences */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--muted);
  font-size: 1.05rem;
}

.empty-state p {
  margin: 0;
}

/* Responsive for certifications */
@media (max-width: 768px) {
  .certifications-grid {
    grid-template-columns: 1fr;
  }

  .cert-image-container {
    aspect-ratio: 16 / 9;
  }

  .cert-content {
    padding: 1.5rem;
  }

  .cert-title {
    font-size: 1rem;
  }

  .cert-actions {
    flex-direction: column;
  }

  .btn-sm {
    width: 100%;
    justify-content: center;
  }
}

/* Reduced motion for certifications */
@media (prefers-reduced-motion: reduce) {
  .certification-card,
  .cert-image,
  .cert-view-btn,
  .skill-badge,
  .btn-sm {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================
   Certificate Lightbox — Modal for full-size certificate preview
   ============================================================ */
#certLightbox {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 12, 0.88);
  backdrop-filter: blur(18px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 1.5rem;
  animation: pjFade 0.25s ease;
}

#certLightbox[hidden],
#certLightbox[hidden=""] {
  display: none !important;
}

#certStage {
  position: relative;
  width: min(92vw, 1000px);
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
}

.cert-lb-image {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center;
  transition: transform 0.25s ease;
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 12px;
  box-shadow: 0 30px 90px -25px rgba(0, 0, 0, 0.7);
}

@media (min-width: 900px) {
  #certLightbox {
    padding: 6rem 2rem 2rem;
  }

  #certStage {
    width: min(80vw, 1000px);
    max-height: min(75vh, calc(80vw * 0.75));
  }

  .cert-lb-image {
    max-height: 75vh;
  }
}

@media (max-width: 720px) {
  #certLightbox {
    padding: 4rem 1rem 1rem;
  }

  #certStage {
    width: min(95vw, 500px);
    max-height: calc(100vh - 6rem);
  }

  .cert-lb-image {
    max-height: calc(100vh - 6rem);
    border-radius: 8px;
  }
}
