/* ============================================================
   PORTFOLIO CMS — PREMIUM LUXURY AESTHETIC v3.0
   Dark & Light Mode · Mouse Animations · Glassmorphism
   ============================================================ */

/* ─── Dark Theme Tokens (Default) ─── */
:root,
[data-theme="dark"] {
  --bg: #05070f;
  --bg-alt: #0a0e1c;
  --surface: rgba(16, 22, 47, 0.55);
  --surface-hover: rgba(22, 31, 67, 0.7);
  --surface-solid: #0d1228;
  --border: rgba(148, 163, 184, 0.1);
  --border-focus: rgba(99, 102, 241, 0.45);
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --heading-color: #ffffff;
  --shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px var(--accent-glow);
  --card-bg: rgba(16, 22, 47, 0.55);
  --input-bg: rgba(5, 7, 15, 0.55);
  --input-border: rgba(148, 163, 184, 0.15);
  --navbar-bg: rgba(5, 7, 15, 0.72);
  --navbar-scrolled: rgba(5, 7, 15, 0.94);
  --footer-bg: rgba(5, 7, 15, 0.6);
  --overlay-bg: rgba(2, 4, 10, 0.96);
  --blob-opacity: 0.2;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

/* ─── Light Theme Tokens ─── */
[data-theme="light"] {
  --bg: #f0f2f8;
  --bg-alt: #e8ecf4;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-hover: rgba(255, 255, 255, 0.95);
  --surface-solid: #ffffff;
  --border: rgba(15, 23, 42, 0.1);
  --border-focus: rgba(99, 102, 241, 0.5);
  --text: #1e293b;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --heading-color: #0f172a;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
  --card-bg: rgba(255, 255, 255, 0.82);
  --input-bg: rgba(241, 245, 249, 0.8);
  --input-border: rgba(15, 23, 42, 0.12);
  --navbar-bg: rgba(255, 255, 255, 0.72);
  --navbar-scrolled: rgba(255, 255, 255, 0.94);
  --footer-bg: rgba(241, 245, 249, 0.85);
  --overlay-bg: rgba(255, 255, 255, 0.96);
  --blob-opacity: 0.1;
  color-scheme: light;
}

/* ─── Global Reset ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.06) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.06) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(59, 130, 246, 0.03) 0px, transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* ─── Typography ─── */
.font-serif {
  font-family: 'Playfair Display', Georgia, serif;
}

.font-heading {
  font-family: 'Outfit', system-ui, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--heading-color);
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ─── Override Bootstrap color utilities for theming ─── */
.text-white {
  color: var(--heading-color) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-accent {
  color: var(--accent) !important;
}

.border-secondary-subtle {
  border-color: var(--border) !important;
}

/* ============================================================
   MOUSE CURSOR GLOW (Decorative)
   ============================================================ */
.cursor-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
  mix-blend-mode: screen;
}

[data-theme="light"] .cursor-glow {
  mix-blend-mode: multiply;
  opacity: 0 !important;
}

.cursor-glow.active {
  opacity: 0.35;
}

/* ============================================================
   NAVBAR — Frosted Glass (Theme-aware)
   ============================================================ */
.nav-glass {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  transition: all 0.4s var(--ease-premium);
  z-index: 1050;
}

.nav-glass.scrolled {
  padding: 0.6rem 0;
  background: var(--navbar-scrolled);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--heading-color), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-brand img {
  border-radius: 6px;
}

.nav-link {
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-muted) !important;
  transition: color 0.3s ease;
  position: relative;
  margin: 0 0.4rem;
  padding: 0.5rem 0.15rem !important;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text) !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  transition: all 0.3s var(--ease-premium);
  transform: translateX(-50%);
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ─── Theme Toggle Button ─── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.4s var(--ease-premium);
  font-size: 1.1rem;
  margin-left: 0.75rem;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  transform: rotate(30deg) scale(1.08);
  box-shadow: var(--shadow-glow);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  transition: all 0.4s var(--ease-premium);
  position: absolute;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}

[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}

[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Light mode navbar toggler */
[data-theme="light"] .navbar-toggler-icon {
  filter: invert(1);
}

/* ─── Flash Message ─── */
.flash-message {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 2000;
  max-width: 360px;
}

.flash-content {
  background: var(--surface-solid);
  backdrop-filter: blur(12px);
  color: var(--text);
  padding: 16px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 0.9rem;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
}

/* Animated Background Blobs */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: var(--blob-opacity);
  animation: blobFloat 25s ease-in-out infinite;
  transition: opacity 0.5s ease;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--accent);
  top: -180px;
  left: -180px;
}

.blob-2 {
  width: 420px;
  height: 420px;
  background: #6366f1;
  bottom: -120px;
  right: -120px;
  animation-delay: 5s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: #d946ef;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 10s;
  opacity: calc(var(--blob-opacity) * 0.6);
}

.blob-4 {
  width: 280px;
  height: 280px;
  background: #3b82f6;
  top: 25%;
  right: 15%;
  animation: blobFloatAlt 20s ease-in-out infinite;
  opacity: calc(var(--blob-opacity) * 0.75);
}

@keyframes blobFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(60px, -60px) scale(1.15);
  }

  66% {
    transform: translate(-30px, 80px) scale(0.9);
  }
}

@keyframes blobFloatAlt {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-50px, 50px) scale(1.1);
  }
}

/* Hero Grid */
.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
  padding: 2rem 0;
}

.hero-greeting {
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 0.75rem;
  display: inline-block;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--heading-color) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.typing-wrapper {
  height: 3rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.typing-text {
  font-size: 1.6rem;
  font-weight: 600;
  position: relative;
  background: linear-gradient(90deg, var(--heading-color), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.typing-text::after {
  content: '|';
  position: absolute;
  right: -12px;
  animation: cursorBlink 0.8s infinite;
  -webkit-text-fill-color: var(--accent);
}

@keyframes cursorBlink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

.hero-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 520px;
  margin-bottom: 2.25rem;
  line-height: 1.8;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* ─── Premium Buttons ─── */
.btn {
  padding: 13px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s var(--ease-premium);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

/* Magnetic shimmer on buttons */
.btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), rgba(99, 102, 241, 0.85));
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.45), var(--shadow-glow);
  background: linear-gradient(135deg, var(--accent), rgba(99, 102, 241, 1));
  color: #fff;
}

.btn-outline-light {
  border: 1.5px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

[data-theme="light"] .btn-outline-light {
  border-color: var(--border);
  color: var(--text);
}

.btn-outline-light:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-3px);
  color: var(--heading-color);
}

.btn-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent) !important;
}

/* Hero Social Links */
.hero-socials {
  display: flex;
  gap: 10px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease-premium);
  font-size: 1rem;
}

.social-link:hover {
  background: var(--accent);
  border-color: transparent;
  transform: translateY(-3px) rotate(6deg);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

/* ============================================================
   GLASSMORPHIC ID CARD — Hero Centerpiece
   ============================================================ */
.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  perspective: 800px;
}

.profile-id-card {
  position: relative;
  width: 300px;
  max-width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: idCardFloat 6s ease-in-out infinite;
  z-index: 2;
  overflow: hidden;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

/* Animated glowing border */
.profile-id-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1.5px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6, #d946ef, var(--accent));
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: borderFlow 6s ease infinite;
}

@keyframes borderFlow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.profile-id-card-glow {
  position: absolute;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 160%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 55%);
  z-index: 0;
  pointer-events: none;
  animation: glowPulse 5s ease-in-out infinite;
  opacity: 0.5;
}

[data-theme="light"] .profile-id-card-glow {
  opacity: 0.15;
}

@keyframes glowPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.08);
    opacity: 0.7;
  }
}

.profile-id-card-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-id-card-tag {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  padding: 4px 14px;
  border-radius: 999px;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  margin-bottom: 1rem;
  text-align: center;
}

.profile-id-card-photo {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  margin-bottom: 1rem;
  background: var(--bg-alt);
  flex-shrink: 0;
}

.profile-id-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-premium);
}

.profile-id-card-photo:hover img {
  transform: scale(1.06);
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: var(--accent);
  background: var(--bg-alt);
}

.profile-id-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--heading-color);
  text-align: center;
  margin-bottom: 0.6rem;
}

.profile-id-card-info {
  width: 100%;
  border-top: 1px dashed var(--border);
  padding-top: 0.75rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-family: 'Outfit', sans-serif;
}

.info-row span:first-child {
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.info-row span:last-child {
  color: var(--text);
  font-weight: 500;
  text-align: right;
  max-width: 65%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-id-card-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 0.65rem;
  margin-top: auto;
}

.profile-id-card-barcode {
  display: flex;
  height: 12px;
  gap: 1.5px;
  opacity: 0.35;
}

.profile-id-card-barcode span {
  width: 1.5px;
  height: 100%;
  background-color: var(--text-muted);
}

.profile-id-card-barcode span:nth-child(2n) {
  width: 3px;
}

.profile-id-card-barcode span:nth-child(3n) {
  width: 1px;
}

.profile-id-card-barcode span:nth-child(5n) {
  width: 4px;
}

.profile-id-card-number {
  font-family: 'Courier New', monospace;
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  opacity: 0.6;
}

@keyframes idCardFloat {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  33% {
    transform: translateY(-10px) rotate(0.5deg);
  }

  66% {
    transform: translateY(-5px) rotate(-0.3deg);
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.scroll-indicator a {
  display: inline-flex;
  color: var(--text-muted);
  font-size: 1.2rem;
  animation: bounce 2s infinite;
  text-decoration: none;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

/* ============================================================
   SECTION GLOBALS
   ============================================================ */
.section {
  padding: 100px 0;
  position: relative;
  z-index: 3;
}

.section-dark {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.5s ease;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-subtitle {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--heading-color) 40%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4.5rem;
  align-items: center;
}

.about-img {
  width: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.about-placeholder {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--accent);
  border: 1px solid var(--border);
}

.about-content h3 {
  font-size: 2.15rem;
  margin-bottom: 0.5rem;
}

.about-role {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.about-text {
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  font-size: 1rem;
  line-height: 1.85;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.about-stats {
  display: flex;
  gap: 2.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--heading-color);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   SKILLS SECTION
   ============================================================ */
.skills-category-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  height: 100%;
  transition: all 0.4s var(--ease-premium);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  perspective: 600px;
}

.skills-category-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: var(--surface-hover);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), var(--shadow-glow);
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

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

.skill-bar-wrapper {
  height: 5px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 1.5s var(--ease-premium);
}

/* ============================================================
   PROJECTS / PORTFOLIO SECTION
   ============================================================ */
.portfolio-filters .filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 9px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.3s var(--ease-premium);
}

.portfolio-filters .filter-btn:hover {
  color: var(--text);
  border-color: rgba(99, 102, 241, 0.3);
}

.portfolio-filters .filter-btn.active {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.4s var(--ease-premium);
  display: flex;
  flex-direction: column;
  height: 100%;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  perspective: 600px;
}

.project-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow), var(--shadow-glow);
}

.project-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background-color: var(--bg-alt);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-premium);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 15, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 10;
}

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

.project-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  line-height: 1.7;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.project-tag {
  display: inline-block;
  padding: 3px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}

.bg-glass {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 5px 13px !important;
  font-size: 0.78rem !important;
  border-radius: 999px;
}

.text-accent-glow {
  text-shadow: 0 0 10px var(--accent-glow);
}

/* ============================================================
   TIMELINE — Experiences & Education
   ============================================================ */
.timeline-container {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, var(--border) 0%, var(--accent) 50%, var(--border) 100%);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-item {
  position: relative;
  width: 50%;
  margin-bottom: 3rem;
  z-index: 2;
}

.timeline-item.left {
  left: 0;
  padding-right: 3.5rem;
}

.timeline-item.right {
  left: 50%;
  padding-left: 3.5rem;
}

.timeline-dot {
  position: absolute;
  top: 24px;
  left: 100%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: var(--shadow-glow);
  transform: translate(-50%, -50%);
}

.timeline-item.right .timeline-dot {
  left: 0;
}

.timeline-content-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.4s var(--ease-premium);
  transform-style: preserve-3d;
}

.timeline-content-wrapper:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), var(--shadow-glow);
  background: var(--surface-hover);
}

.company-logo-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.company-logo-badge img {
  width: 85%;
  height: 85%;
  object-fit: contain;
}

.company-logo-badge.placeholder {
  font-size: 1.35rem;
  color: var(--text-muted);
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  display: block;
  margin-bottom: 2px;
}

.timeline-title {
  font-size: 1.15rem;
}

.timeline-company {
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.timeline-desc {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-muted);
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ============================================================
   CERTIFICATES — Compact Elegant List
   ============================================================ */
.cert-compact-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 880px;
  margin: 0 auto;
}

.cert-compact-card {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.4s var(--ease-premium);
  transform-style: preserve-3d;
}

.cert-compact-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: var(--surface-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), var(--shadow-glow);
  transform: translateX(6px);
}

.cert-compact-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 1.3rem;
  color: var(--accent);
}

.cert-compact-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 11px;
}

.cert-compact-info {
  flex: 1;
  min-width: 0;
}

.cert-compact-name {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--heading-color);
}

.cert-compact-issuer {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
}

.cert-compact-date {
  font-size: 0.75rem;
  display: inline-block;
  margin-top: 2px;
  color: var(--text-muted);
}

.cert-compact-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.cert-review-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: linear-gradient(135deg, var(--accent), rgba(99, 102, 241, 0.8));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-premium);
  white-space: nowrap;
}

.cert-review-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.cert-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.82rem;
}

.cert-link-btn:hover {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(10px);
  transition: all 0.4s var(--ease-premium);
  transform-style: preserve-3d;
}

.testimonial-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow);
  background: var(--surface-hover);
}

.testimonial-icon {
  font-size: 2rem;
  color: var(--accent);
}

.testimonial-text {
  font-size: 0.95rem;
  line-height: 1.8;
  font-style: italic;
  color: var(--text-secondary);
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border);
}

.testimonial-avatar.placeholder {
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.testimonial-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.testimonial-role {
  font-size: 0.82rem;
  color: var(--accent);
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4.5rem;
}

.contact-info-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  backdrop-filter: blur(10px);
  transition: all 0.4s var(--ease-premium);
  transform-style: preserve-3d;
}

.contact-info-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-glow);
}

.contact-info-card h6 {
  color: var(--heading-color) !important;
}

.contact-info-card p {
  color: var(--text-secondary) !important;
}

.contact-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-form-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.75rem;
  backdrop-filter: blur(10px);
}

.contact-form .form-label {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--heading-color) !important;
}

.contact-form .form-control {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.92rem;
  transition: all 0.3s ease;
}

.contact-form .form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.contact-form .form-control:focus {
  background: var(--input-bg);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  color: var(--text);
}

/* ============================================================
   PROJECT MODAL
   ============================================================ */
.custom-modal .modal-content {
  background-color: var(--surface-solid);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.custom-modal .btn-close {
  padding: 1.25rem;
  box-shadow: none;
}

[data-theme="light"] .custom-modal .btn-close {
  filter: none;
}

.project-modal-image-wrapper {
  background-color: var(--bg-alt);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  width: 100%;
  height: auto;
  min-height: 250px;
}

.project-modal-img {
  max-width: 100%;
  max-height: 550px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.custom-modal .carousel-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 0 4px;
}

.custom-modal .carousel-control-prev,
.custom-modal .carousel-control-next {
  width: 42px;
  height: 42px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  margin: 0 14px;
  opacity: 0.7;
}

.custom-modal .carousel-control-prev:hover,
.custom-modal .carousel-control-next:hover {
  opacity: 1;
}

/* ============================================================
   LIGHTBOX IMAGE PREVIEW
   ============================================================ */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(15px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 24px;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.lightbox-close:hover {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

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

.footer p {
  color: var(--text-muted) !important;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.3s var(--ease-premium);
  font-size: 0.9rem;
}

.footer-social:hover {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* ============================================================
   3D TILT INTERACTIVE CARDS (JS applies inline transforms)
   ============================================================ */
.tilt-card {
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  will-change: transform;
}

.tilt-card .tilt-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(circle at var(--shine-x, 50%) var(--shine-y, 50%), rgba(255, 255, 255, 0.12) 0%, transparent 60%);
}

.tilt-card:hover .tilt-shine {
  opacity: 1;
}

/* ============================================================
   MAGNETIC BUTTON EFFECT
   ============================================================ */
.magnetic-btn {
  transition: transform 0.2s ease-out;
  will-change: transform;
}

/* ============================================================
   RESPONSIVE — Tablet
   ============================================================ */
@media (max-width: 991px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-text {
    order: 1;
  }

  .hero-image {
    order: 2;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons,
  .hero-socials {
    justify-content: center;
  }

  .profile-id-card {
    width: 280px;
  }

  .profile-id-card-photo {
    width: 140px;
    height: 140px;
  }

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

  .about-img,
  .about-placeholder {
    max-width: 360px;
    margin: 0 auto;
  }

  .about-content {
    text-align: center;
  }

  .about-stats {
    justify-content: center;
  }

  .timeline-line {
    left: 24px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 4rem !important;
    padding-right: 0 !important;
  }

  .timeline-item.right {
    left: 0%;
  }

  .timeline-dot {
    left: 24px !important;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .cursor-glow {
    display: none !important;
  }
}

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 575px) {
  .hero-section {
    padding: 100px 0 60px;
  }

  .profile-id-card {
    width: 260px;
    padding: 1.25rem;
  }

  .profile-id-card-photo {
    width: 120px;
    height: 120px;
  }

  .profile-id-card-name {
    font-size: 1.05rem;
  }

  .profile-id-card-tag {
    font-size: 0.55rem;
    padding: 3px 10px;
  }

  .section {
    padding: 70px 0;
  }

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

  .about-stats {
    gap: 1.5rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .contact-form-wrapper {
    padding: 1.5rem;
  }

  .cert-compact-card {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
  }

  .cert-compact-actions {
    width: 100%;
    justify-content: flex-end;
  }

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

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

  .custom-modal .carousel-control-prev,
  .custom-modal .carousel-control-next {
    margin: 0 4px;
  }
}

/* ============================================================
   UTILITY / ANIMATION HELPERS
   ============================================================ */
.filter-item {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.15;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.25;
  }
}

/* Smooth theme transition for all themed elements */
.section,
.nav-glass,
.footer,
.card,
.contact-info-card,
.contact-form-wrapper,
.skills-category-card,
.project-card,
.cert-compact-card,
.testimonial-card,
.timeline-content-wrapper,
.profile-id-card {
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.15s ease-out;
}

/* ============================================================
   🌟 FLOATING PARTICLES BACKGROUND
   ============================================================ */
.particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

[data-theme="light"] .particles-canvas {
  opacity: 0.25;
}

/* ============================================================
   🌟 CHARACTER-BY-CHARACTER TEXT REVEAL
   ============================================================ */
.char-reveal .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px) rotateX(40deg);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.char-reveal.revealed .char {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
}

/* ============================================================
   🌟 CLICK RIPPLE EFFECT
   ============================================================ */
.ripple-effect {
  position: fixed;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9998;
  animation: rippleExpand 0.6s ease-out forwards;
  opacity: 0.25;
}

@keyframes rippleExpand {
  0% {
    width: 0;
    height: 0;
    opacity: 0.35;
  }
  100% {
    width: 150px;
    height: 150px;
    opacity: 0;
    transform: translate(-50%, -50%);
  }
}

/* ============================================================
   🌟 GLITCH HOVER ON SECTION TITLES
   ============================================================ */
.section-title:hover {
  animation: glitchText 0.4s steps(4) 1;
}

@keyframes glitchText {
  0% { transform: translate(0); filter: hue-rotate(0deg); }
  25% { transform: translate(-2px, 1px); filter: hue-rotate(90deg); }
  50% { transform: translate(2px, -1px); filter: hue-rotate(180deg); }
  75% { transform: translate(-1px, -1px); filter: hue-rotate(270deg); }
  100% { transform: translate(0); filter: hue-rotate(360deg); }
}

/* ============================================================
   🌟 CARD SHINE SWEEP EFFECT
   ============================================================ */
.card-shine-sweep {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
  pointer-events: none;
  z-index: 3;
  animation: shineSweep 4s ease-in-out infinite;
}

@keyframes shineSweep {
  0%, 100% { left: -100%; opacity: 0; }
  50% { left: 150%; opacity: 1; }
}

/* ============================================================
   🌟 GLOWING SECTION DIVIDERS
   ============================================================ */
.section-glow-divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 20%, #d946ef 50%, var(--accent) 80%, transparent 100%);
  background-size: 200% 100%;
  animation: glowDividerFlow 3s ease infinite;
  margin: 0;
  border: none;
  opacity: 0.6;
  position: relative;
}

.section-glow-divider::after {
  content: '';
  position: absolute;
  inset: -3px 0;
  background: inherit;
  filter: blur(8px);
  opacity: 0.4;
}

@keyframes glowDividerFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============================================================
   🌟 ID CARD PULSE RINGS
   ============================================================ */
.id-card-pulse-ring {
  position: absolute;
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  inset: -12px;
  opacity: 0;
  animation: pulseRingExpand 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.id-card-pulse-ring:nth-child(2) {
  animation-delay: 1s;
}

.id-card-pulse-ring:nth-child(3) {
  animation-delay: 2s;
}

@keyframes pulseRingExpand {
  0% { inset: -5px; opacity: 0.5; }
  100% { inset: -40px; opacity: 0; }
}

/* ============================================================
   🌟 SKILL BAR SPARKLE TRAIL
   ============================================================ */
.skill-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 2px var(--accent), 0 0 14px 4px var(--accent);
  animation: sparkleGlow 1.5s ease-in-out infinite alternate;
  opacity: 0;
  transition: opacity 0.5s ease 1.5s;
}

.skill-fill[style*="width"]:not([style*="width: 0"]):not([style*="width:0"])::after {
  opacity: 1;
}

@keyframes sparkleGlow {
  0% { box-shadow: 0 0 4px 1px var(--accent); transform: translateY(-50%) scale(0.8); }
  100% { box-shadow: 0 0 12px 4px var(--accent), 0 0 20px 6px rgba(99,102,241,0.3); transform: translateY(-50%) scale(1.2); }
}

/* ============================================================
   🌟 FLOATING DECORATION ICONS
   ============================================================ */
.floating-icon {
  position: absolute;
  font-size: 1.2rem;
  color: var(--accent);
  opacity: 0.08;
  animation: floatIcon 12s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.floating-icon:nth-child(2) { animation-delay: 2s; animation-duration: 14s; }
.floating-icon:nth-child(3) { animation-delay: 4s; animation-duration: 10s; }
.floating-icon:nth-child(4) { animation-delay: 6s; animation-duration: 16s; }
.floating-icon:nth-child(5) { animation-delay: 3s; animation-duration: 11s; }
.floating-icon:nth-child(6) { animation-delay: 5s; animation-duration: 13s; }

@keyframes floatIcon {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-20px) rotate(10deg); }
  50% { transform: translateY(-35px) rotate(-5deg); }
  75% { transform: translateY(-15px) rotate(8deg); }
}

[data-theme="light"] .floating-icon {
  opacity: 0.05;
}

/* ============================================================
   🌟 MOUSE TRAIL SPARKLE DOTS
   ============================================================ */
.mouse-trail-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9997;
  opacity: 0.7;
  animation: trailFade 0.8s ease-out forwards;
  box-shadow: 0 0 6px var(--accent);
}

@keyframes trailFade {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(0); opacity: 0; }
}

/* ============================================================
   🌟 SCROLL PROGRESS BAR
   ============================================================ */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #d946ef, #3b82f6, var(--accent));
  background-size: 300% 100%;
  animation: progressGradient 3s linear infinite;
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--accent), 0 0 5px var(--accent);
}

@keyframes progressGradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* ============================================================
   🌟 HOVER CARD BORDER GRADIENT SPIN
   ============================================================ */
.project-card::before,
.testimonial-card::before,
.skills-category-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--gradient-angle, 0deg), transparent 40%, var(--accent) 50%, transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
  pointer-events: none;
}

.project-card:hover::before,
.testimonial-card:hover::before,
.skills-category-card:hover::before {
  opacity: 1;
  animation: borderSpin 3s linear infinite;
}

@keyframes borderSpin {
  0% { --gradient-angle: 0deg; }
  100% { --gradient-angle: 360deg; }
}

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

/* ============================================================
   🌟 HERO TEXT SHIMMER
   ============================================================ */
.hero-name {
  background-size: 200% auto;
  animation: textShimmer 4s ease-in-out infinite;
}

@keyframes textShimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* ============================================================
   🌟 SECTION ENTRANCE — ZOOM ROTATE
   ============================================================ */
.section-header .section-subtitle {
  animation: subtitleEntrance 1s ease-out;
}

@keyframes subtitleEntrance {
  0% { opacity: 0; transform: translateY(15px) scale(0.9); letter-spacing: 0.5em; }
  100% { opacity: 1; transform: translateY(0) scale(1); letter-spacing: 0.22em; }
}

/* ============================================================
   🌟 FLOATING ACTION BUTTON — BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: all 0.4s var(--ease-premium);
  pointer-events: none;
}

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

.back-to-top:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

.back-to-top::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: backToTopPulse 2s ease infinite;
}

@keyframes backToTopPulse {
  0% { inset: -4px; opacity: 0.6; }
  100% { inset: -18px; opacity: 0; }
}

/* ============================================================
   🎮 MINI GAME — CATCH THE STARS
   ============================================================ */
.game-section {
  padding: 80px 0;
  position: relative;
  z-index: 3;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.game-wrapper {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.game-container {
  position: relative;
  width: 100%;
  height: 400px;
  background: rgba(5, 7, 15, 0.85);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: crosshair;
  user-select: none;
  box-shadow: var(--shadow), inset 0 0 80px rgba(99,102,241,0.05);
  margin-bottom: 1.5rem;
}

[data-theme="light"] .game-container {
  background: rgba(15, 23, 42, 0.9);
}

.game-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.game-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  margin-bottom: 1rem;
}

.game-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-stat-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 600;
}

.game-stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-top: 2px;
}

.game-start-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 15, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(6px);
}

.game-start-overlay.hidden {
  display: none;
}

.game-start-btn {
  padding: 14px 36px;
  font-size: 1.1rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s var(--ease-premium);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  position: relative;
  overflow: hidden;
}

.game-start-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

.game-start-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-start-btn:hover::before {
  opacity: 1;
}

.game-title-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: gameIconFloat 3s ease-in-out infinite;
}

@keyframes gameIconFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-8px) rotate(5deg); }
  75% { transform: translateY(-4px) rotate(-3deg); }
}

.game-over-text {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent), #d946ef);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-final-score {
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ============================================================
   🌟 NAV LINK HOVER GLOW
   ============================================================ */
.nav-link:hover {
  text-shadow: 0 0 12px var(--accent-glow);
}

/* ============================================================
   🌟 SOCIAL LINK STAGGER ENTRANCE
   ============================================================ */
.hero-socials .social-link {
  animation: socialPop 0.5s ease-out backwards;
}

.hero-socials .social-link:nth-child(1) { animation-delay: 0.8s; }
.hero-socials .social-link:nth-child(2) { animation-delay: 0.95s; }
.hero-socials .social-link:nth-child(3) { animation-delay: 1.1s; }
.hero-socials .social-link:nth-child(4) { animation-delay: 1.25s; }
.hero-socials .social-link:nth-child(5) { animation-delay: 1.4s; }

@keyframes socialPop {
  0% { opacity: 0; transform: scale(0) rotate(-20deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* ============================================================
   🌟 ABOUT IMAGE HOVER ROTATION
   ============================================================ */
.about-img {
  transition: transform 0.8s var(--ease-premium), box-shadow 0.5s ease;
}

.about-img:hover {
  transform: rotate(-2deg) scale(1.03);
  box-shadow: 0 30px 60px rgba(99,102,241,0.2), var(--shadow-glow);
}

/* ============================================================
   🌟 STAT NUMBER GLOW ON VIEW
   ============================================================ */
.stat-number[data-counted="true"] {
  text-shadow: 0 0 20px var(--accent-glow);
  animation: statPop 0.6s ease-out;
}

@keyframes statPop {
  0% { transform: scale(1.3); opacity: 0.5; }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

/* ============================================================
   🌟 FOOTER WAVE ANIMATION
   ============================================================ */
.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), #d946ef, #3b82f6, var(--accent), transparent);
  background-size: 200% 100%;
  animation: footerWave 4s ease infinite;
}

.footer {
  position: relative;
}

@keyframes footerWave {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============================================================
   🌟 CERTIFICATE CARD HOVER LIFT & GLOW
   ============================================================ */
.cert-compact-card {
  position: relative;
  overflow: hidden;
}

.cert-compact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  transition: left 0.6s ease;
}

.cert-compact-card:hover::before {
  left: 150%;
}

/* ============================================================
   🌟 TIMELINE DOT PULSE
   ============================================================ */
.timeline-dot {
  animation: timelineDotPulse 2s ease-in-out infinite;
}

@keyframes timelineDotPulse {
  0%, 100% { box-shadow: var(--shadow-glow); }
  50% { box-shadow: 0 0 0 6px var(--accent-glow), var(--shadow-glow); }
}

/* ============================================================
   🌟 CONTACT ICON WRAPPER BREATHING
   ============================================================ */
.contact-icon-wrapper {
  animation: iconBreathe 3s ease-in-out infinite;
}

@keyframes iconBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ============================================================
   🌟 FORM INPUT FOCUS GLOW UNDERLINE
   ============================================================ */
.contact-form .form-control {
  position: relative;
}

.contact-form .form-control:focus {
  border-image: linear-gradient(90deg, var(--accent), #d946ef, #3b82f6) 1;
  border-image-slice: 1;
  border-radius: 12px;
  border-style: solid;
  border-width: 1px;
}

/* ============================================================
   🌟 RESPONSIVE GAME
   ============================================================ */
@media (max-width: 575px) {
  .game-container {
    height: 300px;
  }
  .game-hud {
    padding: 0.75rem 1rem;
  }
  .game-stat-value {
    font-size: 1.2rem;
  }
}

/* ============================================================
   🌟 PREMIUM CUSTOM CURSOR
   ============================================================ */
@media (min-width: 992px) {
  body, 
  a, 
  button, 
  input, 
  select, 
  textarea, 
  .filter-btn, 
  .social-link, 
  .footer-social, 
  .theme-toggle, 
  .cert-review-btn, 
  .cert-link-btn {
    cursor: none !important;
  }
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 99999;
  display: none;
}

@media (min-width: 992px) {
  .custom-cursor {
    display: block;
  }
}

.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 100000;
  transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.cursor-ring {
  position: fixed;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 99999;
  transition: width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
}

/* Custom Cursor Hover States */
.custom-cursor.hovered .cursor-dot {
  width: 0px;
  height: 0px;
}

.custom-cursor.hovered .cursor-ring {
  width: 54px;
  height: 54px;
  background-color: rgba(99, 102, 241, 0.1);
  border-color: var(--accent);
}

.custom-cursor.typing-mode .cursor-dot {
  width: 2px;
  height: 16px;
  border-radius: 0;
  background-color: var(--text);
}

.custom-cursor.typing-mode .cursor-ring {
  width: 0px;
  height: 0px;
  border-color: transparent;
}

/* Custom Cursor View/Play States */
.custom-cursor.view-more .cursor-dot {
  width: 0px;
  height: 0px;
}

.custom-cursor.view-more .cursor-ring {
  width: 68px;
  height: 68px;
  background-color: var(--accent);
  border-color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-cursor.view-more .cursor-ring::after {
  content: 'VIEW';
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.custom-cursor.play-mode .cursor-dot {
  width: 6px;
  height: 6px;
  background-color: #ef4444;
}

.custom-cursor.play-mode .cursor-ring {
  width: 54px;
  height: 54px;
  border-color: #ef4444;
  border-style: dashed;
  animation: cursorSpin 8s linear infinite;
  background-color: rgba(239, 68, 68, 0.05);
}

@keyframes cursorSpin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================================
   🌟 CARD SPOTLIGHT GLOW EFFECT (Cursor Tracking)
   ============================================================ */
.project-card,
.skills-category-card,
.testimonial-card,
.contact-info-card,
.contact-form-wrapper,
.timeline-content-wrapper {
  position: relative;
}

.project-card::after,
.skills-category-card::after,
.testimonial-card::after,
.contact-info-card::after,
.contact-form-wrapper::after,
.timeline-content-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    350px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(99, 102, 241, 0.08),
    transparent 80%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

/* Adjust spotlight gradient colors in light mode */
[data-theme="light"] .project-card::after,
[data-theme="light"] .skills-category-card::after,
[data-theme="light"] .testimonial-card::after,
[data-theme="light"] .contact-info-card::after,
[data-theme="light"] .contact-form-wrapper::after,
[data-theme="light"] .timeline-content-wrapper::after {
  background: radial-gradient(
    350px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(99, 102, 241, 0.04),
    transparent 80%
  );
}

.project-card:hover::after,
.skills-category-card:hover::after,
.testimonial-card:hover::after,
.contact-info-card:hover::after,
.contact-form-wrapper:hover::after,
.timeline-content-wrapper:hover::after {
  opacity: 1;
}

/* ============================================================
   🌟 CIRCULAR VIEW TRANSITIONS
   ============================================================ */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 99999;
}

/* ============================================================
   🎵 ZEN MODE WIDGET (Glassmorphic)
   ============================================================ */
.zen-widget {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 1000;
  pointer-events: auto;
}

.zen-toggle-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transition: all 0.4s var(--ease-premium);
}

.zen-toggle-btn:hover {
  color: var(--text);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15), var(--shadow-glow);
  transform: translateY(-2px);
}

.zen-widget.active .zen-toggle-btn {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(99, 102, 241, 0.1));
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.2);
}

.zen-icon {
  display: inline-flex;
  font-size: 0.85rem;
  transition: color 0.3s;
}

.zen-widget.active .zen-icon {
  animation: musicSpin 4s linear infinite;
  color: #10b981;
}

@keyframes musicSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.zen-text {
  transition: color 0.3s;
}

.zen-visualizer {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
  width: 14px;
}

.zen-widget.active .zen-visualizer {
  display: flex;
}

.zen-visualizer span {
  width: 2px;
  background-color: #10b981;
  border-radius: 999px;
  height: 100%;
  transform-origin: bottom;
  animation: bounceBar 0.8s ease infinite alternate;
}

.zen-visualizer span:nth-child(2) { animation-delay: 0.15s; animation-duration: 0.6s; }
.zen-visualizer span:nth-child(3) { animation-delay: 0.3s; animation-duration: 0.9s; }
.zen-visualizer span:nth-child(4) { animation-delay: 0.05s; animation-duration: 0.7s; }

@keyframes bounceBar {
  0% { transform: scaleY(0.25); }
  100% { transform: scaleY(1); }
}

/* ============================================================
   🎵 ZEN MODE EXPANDED PANEL
   ============================================================ */
.zen-panel {
  position: absolute;
  bottom: 60px;
  left: 0;
  width: 290px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), var(--shadow-glow);
  opacity: 0;
  transform: translateY(15px) scale(0.95);
  pointer-events: none;
  transition: all 0.4s var(--ease-premium);
  z-index: 999;
}

.zen-widget.panel-open .zen-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.zen-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.zen-panel-header h6 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--heading-color);
  margin: 0;
}

.zen-panel-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px;
  transition: color 0.3s;
}

.zen-panel-close-btn:hover {
  color: var(--text);
}

.zen-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
}

.zen-panel-controls {
  transition: opacity 0.3s, pointer-events 0.3s;
}

.zen-panel-controls.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* Styled Range Sliders */
.zen-slider {
  accent-color: #10b981;
  height: 6px;
  background-color: var(--border);
  border-radius: 999px;
  cursor: pointer;
  outline: none;
}

/* Preset Buttons */
.zen-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.zen-preset-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.zen-preset-btn:hover {
  color: var(--text);
  border-color: rgba(99, 102, 241, 0.3);
}

.zen-preset-btn.active {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
  color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

/* Adjust widgets position on mobile so they don't overlap */
@media (max-width: 575px) {
  .zen-widget {
    bottom: 20px;
    left: 20px;
  }
  .zen-toggle-btn {
    padding: 8px 14px;
    font-size: 0.65rem;
  }
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  .zen-panel {
    bottom: 50px;
    left: 0;
    width: 260px;
    padding: 1rem;
  }
}

/* ============================================================
   📝 GLOBAL TYPOGRAPHY POLISH — Justified Text
   ============================================================ */

/* Modal body paragraphs */
.custom-modal .modal-body p,
.custom-modal .modal-body .project-modal-desc {
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
  line-height: 1.8;
}

/* Contact left-column text */
.contact-left-text,
.contact-info p,
.contact-info-card p {
  text-align: justify;
  text-align-last: left;
  line-height: 1.75;
}

/* Section lead / intro paragraph */
.section-lead,
.section-desc {
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
  line-height: 1.85;
}

/* Service / feature card descriptions */
.service-desc,
.feature-desc,
.card-desc {
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  -webkit-hyphens: auto;
  line-height: 1.75;
}

/* Zen panel label text (small) — keep left aligned */
.zen-label,
.zen-widget label {
  text-align: left;
}

/* Smooth font rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* ============================================================
   MOBILE RESPONSIVE FIXES — Portfolio CMS
   Tambahkan di bagian PALING BAWAH style.css
   ============================================================ */

/* ─── HERO SECTION MOBILE FIX ─── */
@media (max-width: 991px) {
  .hero-section {
    padding: 80px 0 60px;
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
    padding: 1rem 0;
  }

  .hero-text {
    order: 1;
  }

  .hero-image {
    order: 2;
    margin-top: 1rem;
  }

  .hero-greeting {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
  }

  .hero-name {
    font-size: clamp(1.9rem, 7vw, 3rem);
    line-height: 1.1;
    margin-bottom: 0.75rem;
    word-break: break-word;
    hyphens: auto;
  }

  .typing-wrapper {
    height: auto;
    min-height: 2.5rem;
    margin-bottom: 1rem;
    justify-content: center;
  }

  .typing-text {
    font-size: clamp(1rem, 4vw, 1.4rem);
    text-align: center;
    word-break: break-word;
  }

  .hero-description {
    font-size: 0.92rem;
    margin: 0 auto 1.75rem;
    max-width: 100%;
    padding: 0 0.5rem;
  }

  .hero-buttons {
    justify-content: center;
    gap: 0.75rem;
  }

  .hero-buttons .btn {
    padding: 11px 22px;
    font-size: 0.88rem;
  }

  .hero-socials {
    justify-content: center;
  }

  /* ID Card */
  .profile-id-card {
    width: 260px;
    padding: 1.25rem;
  }

  .profile-id-card-photo {
    width: 130px;
    height: 130px;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-img,
  .about-placeholder {
    max-width: 320px;
    margin: 0 auto;
  }

  .about-content {
    text-align: center;
  }

  .about-stats {
    justify-content: center;
    gap: 2rem;
  }

  /* Timeline */
  .timeline-line {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 3.5rem !important;
    padding-right: 0 !important;
    left: 0 !important;
  }

  .timeline-dot {
    left: 20px !important;
    transform: translate(-50%, -50%);
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  /* Hide cursor glow on tablet+ */
  .cursor-glow {
    display: none !important;
  }
}

/* ─── SMALL MOBILE (max 575px) ─── */
@media (max-width: 575px) {
  /* Container padding */
  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* Hero */
  .hero-section {
    padding: 90px 0 50px;
  }

  .hero-name {
    font-size: clamp(1.7rem, 8vw, 2.4rem);
    line-height: 1.1;
  }

  .typing-text {
    font-size: clamp(0.9rem, 4.5vw, 1.2rem);
  }

  .typing-wrapper {
    min-height: 2.2rem;
  }

  .hero-description {
    font-size: 0.88rem;
    line-height: 1.7;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  /* ID Card kecil */
  .profile-id-card {
    width: 240px;
    padding: 1rem;
    gap: 0.75rem;
  }

  .profile-id-card-photo {
    width: 110px;
    height: 110px;
  }

  .profile-id-card-name {
    font-size: 1rem;
  }

  .profile-id-card-tag {
    font-size: 0.52rem;
    padding: 3px 10px;
    letter-spacing: 0.1em;
  }

  .id-card-pulse-ring {
    display: none; /* hide pulse rings on very small screens */
  }

  /* Sections */
  .section {
    padding: 60px 0;
  }

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

  .section-title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  /* About stats */
  .about-stats {
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .stat-number {
    font-size: 1.9rem;
  }

  /* Skills */
  .skills-category-card {
    padding: 1.5rem;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .project-content {
    padding: 1.25rem;
  }

  /* Testimonials */
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Certificates */
  .cert-compact-card {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
  }

  .cert-compact-actions {
    width: 100%;
    justify-content: flex-end;
  }

  /* Timeline */
  .timeline-line {
    left: 16px;
  }

  .timeline-item {
    padding-left: 3rem !important;
    margin-bottom: 1.75rem;
  }

  .timeline-dot {
    left: 16px !important;
    width: 12px;
    height: 12px;
  }

  .timeline-content-wrapper {
    padding: 1.25rem;
  }

  .timeline-title {
    font-size: 1rem;
  }

  /* Contact form */
  .contact-form-wrapper {
    padding: 1.5rem 1.25rem;
  }

  /* Filter buttons */
  .portfolio-filters {
    gap: 0.5rem !important;
  }

  .filter-btn {
    padding: 7px 14px !important;
    font-size: 0.8rem !important;
  }

  /* Game */
  .game-container {
    height: 280px;
  }

  .game-hud {
    padding: 0.75rem 1rem;
  }

  .game-stat-value {
    font-size: 1.2rem;
  }

  /* Zen widget */
  .zen-widget {
    bottom: 15px;
    left: 15px;
  }

  .zen-toggle-btn {
    padding: 8px 13px;
    font-size: 0.65rem;
    gap: 7px;
  }

  .zen-panel {
    bottom: 55px;
    left: 0;
    width: 265px;
    padding: 1rem;
  }

  /* Back to top */
  .back-to-top {
    bottom: 15px;
    right: 15px;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }

  /* Modal */
  .custom-modal .modal-body {
    padding: 1rem;
  }

  .custom-modal .carousel-control-prev,
  .custom-modal .carousel-control-next {
    margin: 0 4px;
    width: 36px;
    height: 36px;
  }

  /* Navbar */
  .navbar-brand {
    font-size: 1.1rem;
  }

  /* Footer */
  .footer-content {
    text-align: center;
    gap: 1rem;
  }

  .footer-socials {
    justify-content: center;
  }
}

/* ─── EXTRA SMALL (max 380px, e.g. older phones) ─── */
@media (max-width: 380px) {
  .hero-name {
    font-size: 1.6rem;
  }

  .typing-text {
    font-size: 0.88rem;
  }

  .profile-id-card {
    width: 220px;
    padding: 0.9rem;
  }

  .profile-id-card-photo {
    width: 100px;
    height: 100px;
  }

  .hero-buttons .btn {
    max-width: 260px;
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

/* ─── TYPING TEXT FIX (overflow pada mobile) ─── */
.typing-wrapper {
  overflow: hidden;
  flex-wrap: wrap;
}

.typing-text {
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}

/* ─── HERO CONTENT safe padding ─── */
@media (max-width: 767px) {
  .hero-content {
    padding: 0 0.5rem;
  }

  /* Pastikan hero buttons tidak overflow */
  .hero-buttons {
    width: 100%;
  }

  /* Social links lebih compact */
  .hero-socials {
    flex-wrap: wrap;
    gap: 8px;
  }

  .social-link {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 0.9rem;
  }
}

/* ─── SECTION DARK fix di mobile ─── */
@media (max-width: 575px) {
  .section-dark {
    padding: 60px 0;
  }
}

/* ─── NAVBAR FIX mobile ─── */
@media (max-width: 991px) {
  .nav-glass .navbar-collapse {
    background: var(--navbar-scrolled);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 0.75rem;
  }

  .nav-glass .nav-link {
    padding: 0.6rem 0.5rem !important;
    border-bottom: 1px solid var(--border);
    margin: 0;
  }

  .nav-glass .nav-link:last-child {
    border-bottom: none;
  }

  .theme-toggle {
    margin-top: 0.75rem;
    margin-left: 0;
    width: 100%;
    border-radius: var(--radius-sm);
    justify-content: center;
  }
}

/* ─── IMAGE responsive override ─── */
img {
  max-width: 100%;
  height: auto;
}

/* ─── Prevent horizontal scroll ─── */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* ─── GAME section responsive ─── */
@media (max-width: 767px) {
  .game-wrapper {
    padding: 0 0.5rem;
  }
}

/* ─── ABOUT section mobile tweak ─── */
@media (max-width: 575px) {
  .about-content h3 {
    font-size: 1.6rem;
  }

  .about-role {
    font-size: 0.95rem;
  }

  .about-text {
    font-size: 0.9rem;
  }

  .about-img {
    border-radius: var(--radius-md);
  }
}

/* ─── CONTACT grid single column mobile ─── */
@media (max-width: 767px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-info {
    gap: 1rem !important;
  }

  .contact-info-card {
    padding: 1rem;
  }
}

/* ─── SKILLS grid single column on mobile ─── */
@media (max-width: 575px) {
  .row.g-4 > .col-lg-6 {
    padding: 0;
  }

  .skills-list {
    gap: 1rem;
  }

  .skill-bar-wrapper {
    height: 4px;
  }
}

/* ─── CERTIFICATES mobile ─── */
@media (max-width: 575px) {
  .cert-compact-grid {
    gap: 0.65rem;
  }

  .cert-compact-icon {
    width: 44px;
    height: 44px;
  }

  .cert-compact-name {
    font-size: 0.88rem;
  }

  .cert-compact-issuer {
    font-size: 0.78rem;
  }

  .cert-review-btn {
    font-size: 0.75rem;
    padding: 6px 11px;
  }
}

/* ─── TESTIMONIALS mobile ─── */
@media (max-width: 575px) {
  .testimonial-card {
    padding: 1.5rem;
  }

  .testimonial-text {
    font-size: 0.88rem;
  }
}
/* ─── THEME TOGGLE MOBILE FIX ─── */
@media (max-width: 991px) {
  .theme-toggle {
    width: 42px !important;
    height: 42px !important;
    margin-top: 0.75rem;
    margin-left: 0;
    border-radius: var(--radius-sm);
    /* Jangan full width & jangan rotate di mobile */
  }

  .theme-toggle:hover {
    transform: scale(1.05) !important; /* override rotate */
  }
}
/* ============================================================
   PORTFOLIO CMS — IMPROVEMENT PACK v1.0
   Paste di bawah mobile-fix.css (paling bawah style.css)
   ============================================================ */

/* ─────────────────────────────────────────────
   1. iOS AUTO-ZOOM FIX
   Input font harus ≥16px agar iOS tidak zoom
   ───────────────────────────────────────────── */
.contact-form .form-control,
.contact-form textarea,
.contact-form input {
  font-size: 16px !important;
}

/* ─────────────────────────────────────────────
   2. TOUCH TARGET FIX
   Min 44×44px untuk semua elemen yang di-tap
   ───────────────────────────────────────────── */
@media (max-width: 991px) {
  .social-link,
  .footer-social {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    min-height: 44px;
  }

  .nav-link {
    min-height: 44px;
    display: flex !important;
    align-items: center;
  }

  .filter-btn {
    min-height: 44px;
    padding: 10px 18px !important;
  }

  .cert-review-btn,
  .cert-link-btn {
    min-height: 44px;
    min-width: 44px;
  }

  .back-to-top {
    min-width: 44px;
    min-height: 44px;
  }

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

/* ─────────────────────────────────────────────
   3. HIDE FLOATING ICONS DI MOBILE
   Cegah ganggu tap & scroll
   ───────────────────────────────────────────── */
@media (max-width: 767px) {
  .floating-icon {
    display: none !important;
  }
}

/* ─────────────────────────────────────────────
   4. SKILL BAR OVERFLOW FIX
   Sparkle ::after tidak keluar batas card
   ───────────────────────────────────────────── */
.skill-bar-wrapper {
  overflow: visible;
  position: relative;
}

.skills-category-card {
  overflow: hidden;
}

.skill-fill {
  position: relative;
}

/* ─────────────────────────────────────────────
   5. SECTION TITLE RESPONSIVE CLAMP
   Judul tidak terlalu besar & tidak wrap aneh
   ───────────────────────────────────────────── */
@media (max-width: 767px) {
  .section-title {
    font-size: clamp(1.4rem, 6vw, 2rem) !important;
    letter-spacing: -0.01em;
  }

  .section-subtitle {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
  }
}

/* ─────────────────────────────────────────────
   6. PROJECT CARD IMAGE ASPECT RATIO MOBILE
   4/3 lebih proporsional di layar sempit
   ───────────────────────────────────────────── */
@media (max-width: 575px) {
  .project-image {
    aspect-ratio: 4 / 3;
  }
}

/* ─────────────────────────────────────────────
   7. NAVBAR BRAND FALLBACK
   Fix gradient text di Android browser lama
   ───────────────────────────────────────────── */
.navbar-brand {
  color: var(--accent); /* fallback jika gradient clip tidak support */
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .navbar-brand {
    background: linear-gradient(135deg, var(--heading-color), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
  }
}

/* ─────────────────────────────────────────────
   8. REDUCED MOTION — AKSESIBILITAS & BATERAI
   Matikan animasi berat jika user prefer
   ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.1ms !important;
  }

  .blob,
  .id-card-pulse-ring,
  .mouse-trail-dot,
  .card-shine-sweep,
  .floating-icon,
  .scroll-progress-bar,
  .profile-id-card,
  .timeline-dot,
  .hero-name,
  .section-glow-divider,
  .footer::before {
    animation: none !important;
  }
}

/* ─────────────────────────────────────────────
   9. KURANGI ANIMASI BERAT DI MOBILE
   Hemat baterai HP mid-range
   ───────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Matikan blur berat di semua card — hanya pertahankan di navbar & modal */
  .skills-category-card,
  .project-card,
  .cert-compact-card,
  .testimonial-card,
  .timeline-content-wrapper,
  .contact-info-card,
  .contact-form-wrapper {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Kurangi jumlah animasi blob */
  .blob-3,
  .blob-4 {
    display: none;
  }

  /* Matikan pulse rings di mobile */
  .id-card-pulse-ring {
    display: none;
  }

  /* Matikan mouse trail (tidak relevan di touch) */
  .mouse-trail-dot {
    display: none !important;
  }

  /* Matikan cursor glow */
  .cursor-glow,
  .custom-cursor,
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }

  /* Skill sparkle — sederhana di mobile */
  .skill-fill::after {
    display: none;
  }

  /* Card shine sweep — matikan di mobile */
  .card-shine-sweep {
    display: none !important;
  }

  /* Ripple effect tetap aktif (lightweight & satisfying) */
}

/* ─────────────────────────────────────────────
   10. BETTER SCROLL SMOOTHNESS MOBILE
   Momentum scroll di iOS
   ───────────────────────────────────────────── */
html {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* ─────────────────────────────────────────────
   11. IMAGE LAZY LOADING PLACEHOLDER
   Supaya tidak layout shift saat gambar load
   ───────────────────────────────────────────── */
img {
  max-width: 100%;
  height: auto;
}

.project-image img,
.about-img,
.profile-id-card-photo img,
.testimonial-avatar,
.cert-compact-thumb {
  will-change: auto;
}

/* ─────────────────────────────────────────────
   12. BETTER TAP HIGHLIGHT
   Hilangkan highlight biru default di Android
   ───────────────────────────────────────────── */
a,
button,
.filter-btn,
.social-link,
.footer-social,
.cert-review-btn,
.cert-link-btn,
.zen-toggle-btn,
.zen-preset-btn,
.game-start-btn,
.back-to-top,
.theme-toggle {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

/* ─────────────────────────────────────────────
   13. HERO SECTION — PREVENT LAYOUT SHIFT
   Stabilkan layout saat font load
   ───────────────────────────────────────────── */
.hero-name,
.typing-text,
.hero-greeting {
  font-display: optional;
}

.typing-wrapper {
  contain: layout;
}

/* ─────────────────────────────────────────────
   14. NAVBAR COLLAPSE ANIMATION SMOOTH
   Halus saat buka/tutup menu di mobile
   ───────────────────────────────────────────── */
@media (max-width: 991px) {
  .navbar-collapse {
    transition: all 0.3s ease !important;
  }

  /* Pastikan navbar collapse tidak overflow horizontal */
  #navMain {
    max-width: 100%;
    overflow: hidden;
  }
}

/* ─────────────────────────────────────────────
   15. GAME CANVAS TOUCH FIX
   Agar canvas bisa di-tap dengan benar di mobile
   ───────────────────────────────────────────── */
#gameCanvas {
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.game-container {
  touch-action: none;
}

/* ─────────────────────────────────────────────
   16. FOOTER RESPONSIVE FIX
   ───────────────────────────────────────────── */
@media (max-width: 575px) {
  .footer-content {
    flex-direction: column !important;
    text-align: center;
    gap: 1rem !important;
  }

  .footer-socials {
    justify-content: center;
    flex-wrap: wrap;
  }

  .footer p {
    font-size: 0.82rem;
  }
}

/* ─────────────────────────────────────────────
   17. LIGHTBOX MOBILE FIX
   Agar preview gambar tidak overflow di HP
   ───────────────────────────────────────────── */
@media (max-width: 575px) {
  .lightbox-overlay {
    padding: 16px;
  }

  .lightbox-content img {
    max-height: 75vh;
    border-radius: var(--radius-sm);
  }

  .lightbox-close {
    top: -42px;
    right: 0;
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

/* ─────────────────────────────────────────────
   18. PROJECT MODAL MOBILE FIX
   ───────────────────────────────────────────── */
@media (max-width: 575px) {
  .custom-modal .modal-dialog {
    margin: 0.5rem;
  }

  .custom-modal .modal-content {
    border-radius: var(--radius-md);
  }

  .custom-modal .modal-body {
    padding: 1rem 0.875rem;
  }

  .project-modal-image-wrapper {
    min-height: 180px;
  }

  .project-modal-img {
    max-height: 300px;
  }
}

/* ─────────────────────────────────────────────
   19. ZEN PANEL MOBILE — TIDAK OVERFLOW SCREEN
   ───────────────────────────────────────────── */
@media (max-width: 400px) {
  .zen-panel {
    width: calc(100vw - 30px);
    left: 0;
  }
}

/* ─────────────────────────────────────────────
   20. SAFE AREA INSET (iPhone Notch / Dynamic Island)
   Elemen fixed tidak tertutup notch atau home bar
   ───────────────────────────────────────────── */
.zen-widget {
  bottom: max(30px, calc(20px + env(safe-area-inset-bottom)));
  left: max(30px, calc(15px + env(safe-area-inset-left)));
}

.back-to-top {
  bottom: max(30px, calc(20px + env(safe-area-inset-bottom)));
  right: max(30px, calc(15px + env(safe-area-inset-right)));
}

@media (max-width: 575px) {
  .zen-widget {
    bottom: max(15px, calc(10px + env(safe-area-inset-bottom)));
    left: max(15px, calc(10px + env(safe-area-inset-left)));
  }

  .back-to-top {
    bottom: max(15px, calc(10px + env(safe-area-inset-bottom)));
    right: max(15px, calc(10px + env(safe-area-inset-right)));
  }
}

.nav-glass {
  padding-top: max(1rem, calc(0.5rem + env(safe-area-inset-top)));
}
/* ============================================================
   PORTFOLIO CMS — IMPROVEMENT PACK v2.0
   Paste di bawah improvements.css (paling bawah style.css)
   ============================================================ */

/* ─────────────────────────────────────────────
   1. ABOUT PLACEHOLDER HEIGHT FIX
   Batasi tinggi placeholder agar tidak terlalu
   panjang di layar kecil
   ───────────────────────────────────────────── */
@media (max-width: 575px) {
  .about-placeholder {
    aspect-ratio: 3 / 2 !important;
    max-height: 260px;
    font-size: 3.5rem;
  }

  .about-img {
    max-height: 320px;
    object-fit: cover;
    width: 100%;
  }
}

/* ─────────────────────────────────────────────
   2. TIMELINE CONNECTOR LINE FIX MOBILE
   Sinkronkan garis dengan dot
   ───────────────────────────────────────────── */
@media (max-width: 991px) {
  .timeline-container {
    padding-left: 0;
    padding-right: 0;
  }

  .timeline-line {
    left: 20px;
    width: 2px;
  }

  .timeline-item {
    padding-left: 52px !important;
    padding-right: 0 !important;
    left: 0 !important;
    width: 100% !important;
  }

  .timeline-dot {
    left: 20px !important;
    top: 28px !important;
    transform: translateX(-50%) !important;
    width: 12px;
    height: 12px;
  }

  .timeline-content-wrapper {
    padding: 1.25rem;
  }
}

/* ─────────────────────────────────────────────
   3. SCROLL INDICATOR FIX
   Pastikan arrow tidak tertutup ID card
   ───────────────────────────────────────────── */
.scroll-indicator {
  z-index: 10;
  bottom: 20px;
}

@media (max-width: 991px) {
  .scroll-indicator {
    display: none; /* ID card sudah cukup sebagai visual anchor */
  }
}

/* ─────────────────────────────────────────────
   4. BUTTON PRESS EFFECT
   Terasa "ditekan" saat di-tap di HP
   ───────────────────────────────────────────── */
.btn:active {
  transform: scale(0.97) translateY(1px) !important;
  transition: transform 0.08s ease !important;
}

.btn-primary:active {
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3) !important;
}

.filter-btn:active,
.cert-review-btn:active,
.game-start-btn:active,
.zen-preset-btn:active {
  transform: scale(0.96) !important;
  transition: transform 0.08s ease !important;
}

.social-link:active,
.footer-social:active {
  transform: scale(0.92) !important;
}

.back-to-top:active {
  transform: scale(0.93) !important;
}

/* ─────────────────────────────────────────────
   5. NAV ACTIVE LINK STYLE
   Highlight nav link sesuai section aktif
   ───────────────────────────────────────────── */
.nav-link.active {
  color: var(--text) !important;
  font-weight: 600;
}

.nav-link.active::after {
  width: 100% !important;
}

@media (max-width: 991px) {
  .nav-link.active {
    color: var(--accent) !important;
    background: rgba(99, 102, 241, 0.08);
    border-radius: var(--radius-sm);
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .nav-link.active::after {
    display: none;
  }
}

/* ─────────────────────────────────────────────
   6. FOCUS VISIBLE — AKSESIBILITAS & SEO
   Outline yang bagus untuk keyboard navigation
   ───────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Hilangkan outline default yang jelek */
:focus:not(:focus-visible) {
  outline: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.form-control:focus-visible {
  outline: none; /* sudah ada border focus */
}

.social-link:focus-visible,
.footer-social:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ─────────────────────────────────────────────
   7. SKELETON LOADING SHIMMER
   Placeholder animasi saat gambar belum load
   ───────────────────────────────────────────── */
@keyframes shimmer {
  0% {
    background-position: -400px 0;
  }
  100% {
    background-position: 400px 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface) 25%,
    var(--surface-hover) 50%,
    var(--surface) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--radius-sm);
}

/* Auto skeleton untuk gambar yang belum load */
.project-image img:not([src]),
.project-image img[src=""] {
  background: linear-gradient(
    90deg,
    var(--surface) 25%,
    var(--surface-hover) 50%,
    var(--surface) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
  color: transparent;
}

.profile-id-card-photo img:not([src]),
.profile-id-card-photo img[src=""],
.about-img:not([src]),
.testimonial-avatar:not([src]) {
  background: linear-gradient(
    90deg,
    var(--surface) 25%,
    var(--surface-hover) 50%,
    var(--surface) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
  color: transparent;
  min-height: 80px;
}

/* Skeleton untuk cert thumbnail */
.cert-compact-thumb:not([src]),
.cert-compact-thumb[src=""] {
  background: linear-gradient(
    90deg,
    var(--surface) 25%,
    var(--surface-hover) 50%,
    var(--surface) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
  color: transparent;
}

/* ─────────────────────────────────────────────
   8. CONTENT-VISIBILITY: AUTO
   Section belum di-scroll tidak dirender penuh
   Bisa 2-3x lebih cepat loading di HP
   ───────────────────────────────────────────── */
#about,
#skills,
#projects,
#experiences,
#educations,
#certificates,
#testimonials,
#game,
#contact {
  content-visibility: auto;
  contain-intrinsic-size: 0 600px; /* estimasi tinggi section */
}

/* ─────────────────────────────────────────────
   9. WILL-CHANGE OPTIMIZATION
   Elemen animasi tidak drop frame di HP
   ───────────────────────────────────────────── */
.profile-id-card {
  will-change: transform;
}

.blob {
  will-change: transform, opacity;
}

.skill-fill {
  will-change: width;
}

.nav-glass {
  will-change: background, padding;
}

.scroll-progress-bar {
  will-change: width;
}

/* Cleanup will-change setelah animasi selesai */
.skill-fill.animated {
  will-change: auto;
}

/* ─────────────────────────────────────────────
   10. PRINT STYLESHEET
   Rapi saat di-print atau save as PDF
   ───────────────────────────────────────────── */
@media print {
  /* Sembunyikan elemen tidak perlu */
  .nav-glass,
  .scroll-indicator,
  .back-to-top,
  .zen-widget,
  .particles-canvas,
  .cursor-glow,
  .custom-cursor,
  .floating-icon,
  .blob,
  .hero-bg,
  .scroll-progress-bar,
  .section-glow-divider,
  #game,
  .portfolio-filters,
  .project-overlay,
  .flash-message,
  .hero-buttons,
  .hero-socials,
  footer .footer-socials {
    display: none !important;
  }

  /* Reset background & color */
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 12pt;
  }

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

  .hero-name,
  .section-title,
  h1, h2, h3, h4, h5, h6 {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    background: none !important;
  }

  .text-white,
  .text-muted,
  .text-accent,
  .text-secondary {
    color: #333 !important;
  }

  /* Satu kolom semua */
  .hero-content,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .projects-grid,
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Card tanpa background / blur */
  .skills-category-card,
  .project-card,
  .cert-compact-card,
  .testimonial-card,
  .timeline-content-wrapper,
  .contact-info-card,
  .contact-form-wrapper {
    background: #fff !important;
    border: 1px solid #ddd !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  /* Timeline */
  .timeline-line {
    background: #ddd !important;
  }

  .timeline-dot {
    background: #6366f1 !important;
    box-shadow: none !important;
  }

  /* Skill bar */
  .skill-bar-wrapper {
    background: #eee !important;
  }

  .skill-fill {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Section padding lebih kecil di print */
  .section {
    padding: 2rem 0 !important;
  }

  .section-dark {
    background: #f9f9f9 !important;
  }

  /* Navbar brand */
  .navbar-brand {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    background: none !important;
  }

  /* Link warna */
  a {
    color: #6366f1 !important;
    text-decoration: underline;
  }

  /* Pagination / page break */
  #about { page-break-before: always; }
  #contact { page-break-before: always; }

  /* Footer sederhana */
  footer {
    padding: 1rem 0 !important;
    border-top: 1px solid #ddd !important;
  }

  footer p {
    color: #666 !important;
  }
}

/* ─────────────────────────────────────────────
   11. DARK MODE SHIMMER ADJUSTMENT
   Skeleton lebih halus di dark mode
   ───────────────────────────────────────────── */
[data-theme="dark"] .skeleton,
[data-theme="dark"] .project-image img:not([src]),
[data-theme="dark"] .profile-id-card-photo img:not([src]),
[data-theme="dark"] .about-img:not([src]),
[data-theme="dark"] .testimonial-avatar:not([src]) {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.03) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.03) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
}

/* ─────────────────────────────────────────────
   12. SMOOTH SECTION TRANSITIONS
   Section masuk lebih smooth saat scroll
   ───────────────────────────────────────────── */
.section,
.section-dark,
.game-section {
  transition: background-color 0.5s ease;
}

/* ─────────────────────────────────────────────
   13. BETTER MOBILE TYPOGRAPHY
   Line height & letter spacing optimal di HP
   ───────────────────────────────────────────── */
@media (max-width: 575px) {
  body {
    font-size: 15px;
    line-height: 1.65;
  }

  p {
    line-height: 1.7;
  }

  .about-text,
  .hero-description,
  .project-desc,
  .testimonial-text,
  .timeline-desc {
    font-size: 0.9rem;
    line-height: 1.75;
  }

  h4, .timeline-title {
    font-size: 1rem;
    line-height: 1.3;
  }

  h5, .project-title {
    font-size: 1rem;
  }

  h6, .cert-compact-name,
  .testimonial-name {
    font-size: 0.9rem;
  }
}

/* ─────────────────────────────────────────────
   14. OVERFLOW WORD BREAK GLOBAL
   Cegah teks panjang (URL, nama, dll) overflow
   ───────────────────────────────────────────── */
.project-title,
.timeline-title,
.cert-compact-name,
.testimonial-name,
.about-content h3 {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ─────────────────────────────────────────────
   15. CONTACT FORM SUBMIT LOADING STATE
   Visual feedback saat form dikirim
   ───────────────────────────────────────────── */
.contact-form button[type="submit"].loading {
  pointer-events: none;
  opacity: 0.75;
  position: relative;
}

.contact-form button[type="submit"].loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: formSpinner 0.6s linear infinite;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes formSpinner {
  to { transform: translateY(-50%) rotate(360deg); }
}