/* ============================================
   IMPORTS & FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Space+Mono:wght@400;700&display=swap');

/* ============================================
   CSS VARIABLES - DARK THEME (default)
   ============================================ */
:root {
  /* Dark Theme - Galaxy / Stars */
  --bg-primary: #000000;
  --bg-secondary: #0A0A0A;
  --bg-tertiary: #111111;
  --bg-card: rgba(12, 12, 12, 0.75);
  --bg-card-hover: rgba(20, 20, 20, 0.9);
  --primary: #F59E0B;
  --primary-light: #FBBF24;
  --primary-dark: #D97706;
  --accent: #F59E0B;
  --accent-light: #FCD34D;
  --cyan: #F97316;
  --text-primary: #F1F0F5;
  --text-secondary: #9896A8;
  --text-muted: #5E5C6E;
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(245, 158, 11, 0.35);
  --shadow-glow: 0 0 40px rgba(245, 158, 11, 0.12);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
  --gradient-primary: linear-gradient(135deg, #F59E0B, #F97316);
  --gradient-accent: linear-gradient(135deg, #FBBF24, #F97316);
  --gradient-warm: linear-gradient(135deg, #F59E0B, #EF4444);
  --glass-bg: rgba(12, 12, 12, 0.6);
  --glass-blur: blur(16px);
  --nav-bg: rgba(0, 0, 0, 0.85);
  --code-bg: rgba(255, 255, 255, 0.04);
  --toggle-bg: rgba(255, 255, 255, 0.08);
  --invert: 0;
}

/* ============================================
   LIGHT THEME
   ============================================ */
[data-theme="light"] {
  --bg-primary: #FFFBF0;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #FFF5E1;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --primary: #D97706;
  --primary-light: #F59E0B;
  --primary-dark: #B45309;
  --accent: #D97706;
  --accent-light: #F59E0B;
  --text-primary: #1A1A2E;
  --text-secondary: #5A5873;
  --text-muted: #9290A3;
  --border-glass: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(217, 119, 6, 0.25);
  --shadow-glow: 0 0 40px rgba(245, 158, 11, 0.08);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.06);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-blur: blur(16px);
  --nav-bg: rgba(255, 251, 240, 0.85);
  --code-bg: rgba(245, 158, 11, 0.06);
  --toggle-bg: rgba(0, 0, 0, 0.06);
  --invert: 1;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s ease, color 0.4s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

code,
.mono {
  font-family: 'Space Mono', monospace;
}

::selection {
  background: var(--primary);
  color: #fff;
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

img {
  max-width: 100%;
  display: block;
}

/* ============================================
   THEME TOGGLE
   ============================================ */
.theme-toggle {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9999;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--accent);
  box-shadow: var(--shadow-card);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  border-color: var(--accent);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.25);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: all 0.4s ease;
}

[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-toggle .icon-sun,
:root:not([data-theme]) .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-toggle .icon-moon,
:root:not([data-theme]) .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar-custom {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  padding: 20px 0;
  transition: all 0.4s ease;
  background: transparent;
}

.navbar-custom.scrolled {
  padding: 10px 0;
  background: var(--nav-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.nav-brand span {
  -webkit-text-fill-color: var(--accent);
}

.navbar-nav .nav-link {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary) !important;
  padding: 6px 16px !important;
  position: relative;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--text-primary) !important;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta-btn {
  background: var(--gradient-primary) !important;
  border-radius: 10px !important;
  padding: 8px 22px !important;
  font-weight: 600 !important;
  border: none;
  transition: all 0.3s ease !important;
}

.navbar-nav .nav-cta-btn,
.navbar-nav .nav-cta-btn:hover {
  color: #fff !important;
}

[data-theme="light"] .navbar-nav .nav-cta-btn,
[data-theme="light"] .navbar-nav .nav-cta-btn:hover {
  color: #000 !important;
}

.nav-cta-btn::after {
  display: none !important;
}

.nav-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.4);
}

.navbar-toggler {
  border: 1px solid var(--border-glass) !important;
  padding: 6px 10px;
}

.navbar-toggler-icon {
  background-image: none !important;
  width: 22px;
  height: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after,
.navbar-toggler-icon span {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: 0.3s ease;
}

/* ============================================
   HERO
   ============================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 1;
}

#heroCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 40%, rgba(255, 255, 255, 0.02) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 25%, rgba(255, 255, 255, 0.015) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, #000000 0%, transparent 40%);
  z-index: 1;
  pointer-events: none;
}

[data-theme="light"] .hero-gradient {
  background: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: var(--code-bg);
  border: 1px solid var(--border-hover);
  border-radius: 50px;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--primary-light);
  margin-bottom: 28px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero-name {
  font-size: clamp(2.8rem, 6.5vw, 5rem);
  font-weight: 700;
  letter-spacing: -2.5px;
  margin-bottom: 4px;
  line-height: 1.05;
}

.gradient-text {
  color: #FFFFFF;
}

[data-theme="light"] .gradient-text {
  color: #1A1A2E;
}

.hero-typewriter {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 8px;
  min-height: 2.4em;
}

.typewriter-text {
  color: var(--accent);
  font-weight: 600;
  border-right: 2px solid var(--accent);
  padding-right: 3px;
  animation: blink 1s step-end infinite;
}

.hero-tagline {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.hero-tagline span {
  color: var(--primary-light);
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-glow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.btn-glow.primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.btn-glow.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 35px rgba(245, 158, 11, 0.5);
}

.btn-glow.outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(8px);
}

.btn-glow.outline:hover {
  border-color: var(--primary-light);
  background: rgba(245, 158, 11, 0.06);
  transform: translateY(-3px);
}

/* Parallax floating shapes */
.parallax-shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.15;
  transition: transform 0.1s linear;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent 70%);
  top: 15%;
  right: 8%;
}

.shape-2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent 70%);
  bottom: 20%;
  left: 5%;
}

.shape-3 {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25), transparent 70%);
  top: 60%;
  right: 25%;
}

/* ============================================
   HERO DASHBOARD - 3D Interactive
   ============================================ */
.dashboard-perspective {
  perspective: 1200px;
  perspective-origin: 50% 50%;
}

.hero-dashboard {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 20px;
  transform-style: preserve-3d;
  transform: rotateX(2deg) rotateY(-4deg);
  transition: transform 0.12s ease-out, box-shadow 0.3s ease;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(245, 158, 11, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  will-change: transform;
  position: relative;
  z-index: 3;
}

.hero-dashboard:hover {
  box-shadow:
    0 35px 80px rgba(0, 0, 0, 0.35),
    0 0 60px rgba(245, 158, 11, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Dashboard Header */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-glass);
}

.dash-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dash-title i {
  color: var(--primary-light);
}

.dash-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  color: #10B981;
  font-weight: 500;
}

.dash-status-dot {
  width: 6px;
  height: 6px;
  background: #10B981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* KPI Cards */
.dash-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.dash-kpi {
  background: var(--code-bg);
  border: 1px solid rgba(245, 158, 11, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.dash-kpi::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.dash-kpi:hover::after {
  opacity: 0.06;
}

.dash-kpi:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.15);
}

.dash-kpi>* {
  position: relative;
  z-index: 1;
}

.dash-kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.12);
  color: var(--primary-light);
  font-size: 0.82rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.dash-kpi:hover .dash-kpi-icon {
  background: var(--gradient-primary);
  color: #fff;
}

.dash-kpi-info {
  flex: 1;
  min-width: 0;
}

.dash-kpi-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  transition: color 0.3s ease;
}

.dash-kpi-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dash-kpi-trend {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.dash-kpi-trend.up {
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
}

.dash-kpi-trend.down {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Filter Pills */
.dash-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.dash-filter {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  flex: 1;
  text-align: center;
}

.dash-filter:hover {
  border-color: var(--primary-light);
  color: var(--text-primary);
  background: rgba(245, 158, 11, 0.04);
}

.dash-filter.active {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.3);
  transform: scale(1.03);
}

/* Chart Containers */
.dash-charts-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.dash-chart-box {
  background: rgba(245, 158, 11, 0.025);
  border: 1px solid rgba(245, 158, 11, 0.05);
  border-radius: 12px;
  padding: 12px;
  transition: border-color 0.3s ease;
}

.dash-chart-box:hover {
  border-color: rgba(245, 158, 11, 0.12);
}

.dash-chart-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.dash-chart-main {
  position: relative;
  height: 160px;
}

.dash-chart-main .dash-chart-title {
  position: relative;
  z-index: 1;
}

.dash-chart-side {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dash-chart-side canvas {
  max-height: 100px;
  width: 100% !important;
}

.dash-donut-legend {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.dash-donut-legend span {
  font-family: 'Space Mono', monospace;
  font-size: 0.55rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.dash-chart-spark {
  padding: 10px 12px;
}

.dash-spark-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.dash-spark-value {
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  color: #10B981;
  font-weight: 700;
  transition: all 0.3s ease;
}

.dash-chart-spark {
  position: relative;
  height: auto;
}

.dash-chart-spark canvas {
  height: 55px !important;
}



/* ============================================
   SECTIONS - SHARED
   ============================================ */
.section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 14px;
}

.section-label::before,
.section-label::after {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--primary);
  opacity: 0.4;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -1.5px;
}

.section-title .highlight {
  color: #FFFFFF;
}

[data-theme="light"] .section-title .highlight {
  color: #1A1A2E;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 14px auto 0;
}

/* ============================================
   GLASS CARD
   ============================================ */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  padding: 32px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), transparent 50%, rgba(249, 115, 22, 0.15));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.glass-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
}

.glass-card:hover::before {
  opacity: 1;
}

/* ============================================
   ABOUT
   ============================================ */
.about-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 14px;
}

.about-text .emphasis {
  color: var(--primary-light);
  font-weight: 600;
}

.about-stats .stat-card {
  text-align: center;
  padding: 22px 14px;
  background: var(--code-bg);
  border: 1px solid rgba(245, 158, 11, 0.1);
  border-radius: 14px;
  transition: all 0.35s ease;
}

.about-stats .stat-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
}

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #FFFFFF;
  display: block;
}

[data-theme="light"] .stat-number {
  color: #1A1A2E;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
}

.about-chart-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.about-chart-card canvas {
  max-width: 100%;
  max-height: 360px;
}

/* ============================================
   SKILLS
   ============================================ */
.skill-card {
  text-align: center;
  padding: 26px 14px;
  cursor: default;
}

.skill-icon-wrap {
  font-size: 2.2rem;
  margin-bottom: 14px;
  display: block;
  transition: all 0.4s ease;
}

.skill-card:hover .skill-icon-wrap {
  transform: scale(1.18) translateY(-4px);
  filter: drop-shadow(0 0 14px var(--primary-light));
}

.skill-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 3px;
}

.skill-category {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   PROJECTS
   ============================================ */
.project-card {
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.project-card-inner {
  padding: 28px;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.project-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 20px;
  background: var(--code-bg);
  color: var(--primary-light);
  border: 1px solid rgba(245, 158, 11, 0.15);
  transition: all 0.35s ease;
}

.project-card:hover .project-icon-wrap {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
  transform: scale(1.05);
}

.project-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  line-height: 1.35;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.project-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: 50px;
  background: rgba(245, 158, 11, 0.08);
  color: var(--primary-light);
  border: 1px solid rgba(245, 158, 11, 0.12);
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(249, 115, 22, 0.30));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 18px;
}

.project-overlay span {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(12px);
  transition: transform 0.4s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-card:hover .project-overlay span {
  transform: translateY(0);
}

/* ============================================
   EXPERIENCE TIMELINE
   ============================================ */
.timeline-wrap {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  padding-left: 44px;
}

.timeline-wrap::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--cyan), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 44px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -36px;
  top: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--primary);
  z-index: 2;
  transition: all 0.35s ease;
}

.timeline-item:hover .timeline-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.4);
}

.timeline-date {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 400;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.timeline-content h3 {
  font-size: 1.15rem;
  margin-bottom: 2px;
}

.timeline-content h4 {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.timeline-content ul {
  list-style: none;
  padding: 0;
}

.timeline-content ul li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
  margin-bottom: 6px;
  line-height: 1.65;
}

.timeline-content ul li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary-light);
  font-size: 0.85rem;
}

/* ============================================
   ACHIEVEMENTS
   ============================================ */
.achieve-column h3 {
  font-size: 1.15rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.achieve-column h3 i {
  color: var(--accent);
}

.achieve-item {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.achieve-item:hover {
  background: var(--code-bg);
  border-color: var(--border-glass);
  transform: translateX(4px);
}

.achieve-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: var(--code-bg);
  color: var(--primary-light);
  border: 1px solid rgba(245, 158, 11, 0.1);
}

.achieve-item h4 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.achieve-item p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ============================================
   CONTACT
   ============================================ */
.contact-form .form-control {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  padding: 14px 18px;
  transition: all 0.3s ease;
}

.contact-form .form-control:focus {
  background: var(--bg-tertiary);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
  color: var(--text-primary);
}

.contact-form .form-control::placeholder {
  color: var(--text-muted);
}

.contact-form textarea.form-control {
  resize: vertical;
  min-height: 130px;
}

.form-submit {
  width: 100%;
  padding: 14px 32px;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.35s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.form-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.4);
}

.form-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.form-status--success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10B981;
}

.form-status--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #EF4444;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.fa-spin {
  animation: spin 0.8s linear infinite;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
}

.contact-item:hover {
  background: var(--code-bg);
  border-color: var(--border-glass);
  color: inherit;
}

.contact-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--code-bg);
  border: 1px solid rgba(245, 158, 11, 0.12);
  color: var(--primary-light);
  font-size: 1.15rem;
  transition: all 0.35s ease;
}

.contact-item:hover .contact-icon {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  transform: scale(1.08);
}

.contact-item h4 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1px;
}

.contact-item p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  position: relative;
  padding: 40px 0 0;
  background: rgba(10, 10, 10, 0.85);
  overflow: hidden;
  border-top: 1px solid var(--border-glass);
  z-index: 1;
}

[data-theme="light"] .footer {
  background: rgba(245, 240, 232, 0.88);
  border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .footer-watermark {
  color: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .footer-tagline {
  color: #1A1A2E;
}

[data-theme="light"] .footer-desc,
[data-theme="light"] .footer-nav a,
[data-theme="light"] .footer-social a,
[data-theme="light"] .footer-cta-btn {
  color: #5A5873;
}

[data-theme="light"] .footer-cta-btn {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .footer-cta-btn:hover {
  color: var(--primary-dark);
  border-color: var(--primary);
  background: rgba(217, 119, 6, 0.08);
}

[data-theme="light"] .footer-bottom {
  border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .footer-bottom p {
  color: #9290A3;
}

/* Watermark */
.footer-watermark {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(8rem, 22vw, 22rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.03);
  letter-spacing: 10px;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  z-index: 0;
  width: 100%;
  text-align: center;
}



/* Footer grid */
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  position: relative;
  z-index: 1;
  padding-bottom: 50px;
}

/* Column: Tagline */
.footer-tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #F1F0F5;
  line-height: 1.3;
  margin-bottom: 16px;
}

.footer-tagline em {
  font-style: italic;
  color: var(--primary-light);
}

.footer-desc {
  font-size: 0.85rem;
  color: #9896A8;
  line-height: 1.6;
  max-width: 280px;
}

/* Column titles */
.footer-col-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

/* Nav links */
.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: #9896A8;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-nav a:hover {
  color: var(--primary-light);
  transform: translateX(4px);
}

/* Social links */
.footer-social {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: #9896A8;
  transition: all 0.3s ease;
}

.footer-social a i {
  font-size: 1rem;
  width: 18px;
  text-align: center;
}

.footer-social a:hover {
  color: var(--primary-light);
  transform: translateX(4px);
}

/* CTA column */
.footer-col-cta {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-cta-block .footer-col-title {
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.footer-cta-btn {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #9896A8;
  padding: 8px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.footer-cta-btn:hover {
  color: var(--primary-light);
  border-color: var(--primary);
  background: rgba(245, 158, 11, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
}

/* Bottom bar */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 1;
}

.footer-bottom p {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: #5E5C6E;
  margin: 0;
}

/* ============================================
   PARALLAX ELEMENTS
   ============================================ */
.parallax-el {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.08s linear;
  will-change: transform;
}

.floating-code {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--primary);
  opacity: 0.08;
  white-space: nowrap;
  font-weight: 700;
}

.floating-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0.06;
}

.floating-square {
  width: 40px;
  height: 40px;
  border: 2px solid var(--accent);
  opacity: 0.06;
  transform: rotate(45deg);
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: perspective(1200px) translateY(80px) rotateX(-15deg) scale(0.95);
  transition: opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.2),
    transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

.reveal.active {
  opacity: 1;
  transform: perspective(1200px) translateY(0) rotateX(0) scale(1);
}

.reveal-left {
  opacity: 0;
  transform: perspective(1200px) translateX(-100px) rotateY(15deg) rotateX(5deg) scale(0.95);
  transition: opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.2),
    transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

.reveal-left.active {
  opacity: 1;
  transform: perspective(1200px) translateX(0) rotateY(0) rotateX(0) scale(1);
}

.reveal-right {
  opacity: 0;
  transform: perspective(1200px) translateX(100px) rotateY(-15deg) rotateX(5deg) scale(0.95);
  transition: opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.2),
    transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

.reveal-right.active {
  opacity: 1;
  transform: perspective(1200px) translateX(0) rotateY(0) rotateX(0) scale(1);
}

.reveal-scale {
  opacity: 0;
  transform: perspective(1200px) translateZ(-150px) scale(0.8) rotateX(10deg);
  transition: opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.2),
    transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

.reveal-scale.active {
  opacity: 1;
  transform: perspective(1200px) translateZ(0) scale(1) rotateX(0);
}

.stagger-1 {
  transition-delay: 0.05s;
}

.stagger-2 {
  transition-delay: 0.1s;
}

.stagger-3 {
  transition-delay: 0.15s;
}

.stagger-4 {
  transition-delay: 0.2s;
}

.stagger-5 {
  transition-delay: 0.25s;
}

.stagger-6 {
  transition-delay: 0.3s;
}

.stagger-7 {
  transition-delay: 0.35s;
}

.stagger-8 {
  transition-delay: 0.4s;
}

.stagger-9 {
  transition-delay: 0.45s;
}

.stagger-10 {
  transition-delay: 0.5s;
}

.stagger-11 {
  transition-delay: 0.55s;
}

.stagger-12 {
  transition-delay: 0.6s;
}

.stagger-13 {
  transition-delay: 0.65s;
}

.stagger-14 {
  transition-delay: 0.7s;
}

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(1.6);
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

@keyframes scrollWheel {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(14px);
  }
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-anim-1 {
  animation: heroFadeIn 0.6s ease 0.2s both;
}

.hero-anim-2 {
  animation: heroFadeIn 0.6s ease 0.4s both;
}

.hero-anim-3 {
  animation: heroFadeIn 0.6s ease 0.55s both;
}

.hero-anim-4 {
  animation: heroFadeIn 0.6s ease 0.7s both;
}

.hero-anim-5 {
  animation: heroFadeIn 0.6s ease 0.85s both;
}

.hero-anim-6 {
  animation: heroFadeIn 0.6s ease 1.1s both;
}

/* ============================================
   RESPONSIVE — TABLET (≤991px)
   ============================================ */
@media (max-width: 991px) {

  /* --- Navbar --- */
  .navbar-collapse {
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 16px 20px;
    margin-top: 12px;
    border: 1px solid var(--border-glass);
  }

  .navbar-nav .nav-link {
    padding: 10px 16px !important;
    font-size: 0.9rem;
  }

  .nav-cta-btn {
    text-align: center;
    margin-top: 4px;
  }

  /* --- Hero --- */
  .hero-content {
    text-align: center;
    padding-top: 100px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-tagline {
    margin-bottom: 28px;
  }

  /* Flatten the Dashboard 3D on tablets */
  .hero-dashboard {
    transform: none !important;
    margin-top: 30px;
  }

  .dashboard-perspective {
    perspective: none;
  }

  /* --- Sections --- */
  .section {
    padding: 80px 0;
  }

  .section-header {
    margin-bottom: 44px;
  }

  /* --- About --- */
  .about-chart-card {
    padding: 16px;
    margin-top: 8px;
  }

  .about-chart-card canvas {
    max-height: 300px;
  }

  /* --- Glass Cards --- */
  .glass-card {
    padding: 24px;
    border-radius: 16px;
  }

  /* --- Timeline --- */
  .timeline-wrap {
    max-width: 100%;
  }

  /* --- Contact --- */
  .contact-form .form-control {
    padding: 12px 16px;
  }
}

/* ============================================
   RESPONSIVE — MOBILE (≤767px)
   ============================================ */
@media (max-width: 767px) {

  /* --- Base --- */
  html {
    font-size: 16px;
  }

  .section {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 36px;
  }

  .section-subtitle {
    font-size: 0.9rem;
  }

  /* --- Hero --- */
  #hero {
    min-height: auto;
    padding-bottom: 56px;
  }

  .hero-content {
    padding-top: 90px;
  }

  .hero-name {
    font-size: clamp(2rem, 8vw, 3rem);
    letter-spacing: -1px;
  }

  .hero-typewriter {
    font-size: clamp(0.95rem, 3.5vw, 1.2rem);
    min-height: 2em;
  }

  .hero-tagline {
    font-size: 0.75rem;
    margin-bottom: 24px;
  }

  .hero-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .btn-glow {
    width: auto;
    flex: 1 1 calc(50% - 12px);
    justify-content: center;
    padding: 12px 20px;
    font-size: 0.95rem;
    text-align: center;
    min-width: 140px;
  }

  /* --- Dashboard on mobile: simplified flat card --- */
  .dashboard-perspective {
    perspective: none;
    margin-top: 32px;
  }

  .hero-dashboard {
    transform: none !important;
    padding: 16px;
    border-radius: 16px;
    box-shadow:
      0 12px 30px rgba(0, 0, 0, 0.25),
      0 0 0 1px rgba(245, 158, 11, 0.05);
  }

  .dash-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .dash-title {
    font-size: 0.8rem;
  }

  .dash-kpi-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .dash-kpi {
    padding: 10px 12px;
    border-radius: 10px;
  }

  .dash-kpi-icon {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
    border-radius: 8px;
  }

  .dash-kpi-value {
    font-size: 0.95rem;
  }

  .dash-kpi-label {
    font-size: 0.55rem;
  }

  .dash-kpi-trend {
    font-size: 0.55rem;
    padding: 2px 6px;
  }

  /* Disable KPI hover lift on mobile to prevent jank */
  .dash-kpi:hover {
    transform: none;
    box-shadow: none;
  }

  .dash-filters {
    gap: 4px;
    margin-bottom: 12px;
    flex-wrap: wrap;
  }

  .dash-filter {
    font-size: 0.62rem;
    padding: 5px 10px;
    border-radius: 6px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .dash-charts-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .dash-chart-main {
    height: 140px;
  }

  .dash-chart-box {
    padding: 10px;
    border-radius: 10px;
  }

  .dash-chart-title {
    font-size: 0.62rem;
  }

  .dash-chart-side canvas {
    max-height: 90px;
  }

  .dash-donut-legend {
    gap: 6px;
    margin-top: 6px;
  }

  .dash-donut-legend span {
    font-size: 0.5rem;
  }

  .dash-chart-spark canvas {
    height: 45px !important;
  }

  .dash-spark-value {
    font-size: 0.6rem;
  }

  /* --- Scroll indicator --- */
  .scroll-indicator {
    display: none;
  }

  /* --- Theme toggle --- */
  .theme-toggle {
    bottom: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
  }

  /* --- About --- */
  .about-text p {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .about-stats .stat-card {
    padding: 16px 10px;
    border-radius: 12px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .about-chart-card {
    padding: 14px;
  }

  .about-chart-card canvas {
    max-height: 250px;
  }

  /* --- Glass Card disable heavy hover on touch --- */
  .glass-card {
    padding: 22px 18px;
    border-radius: 14px;
  }

  .glass-card:hover {
    transform: none;
  }

  /* --- Skills --- */
  .skill-card {
    padding: 20px 10px;
    border-radius: 14px;
  }

  .skill-icon-wrap {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  .skill-name {
    font-size: 0.8rem;
  }

  .skill-category {
    font-size: 0.58rem;
  }

  /* --- Projects --- */
  .project-card-inner {
    padding: 22px 18px;
  }

  .project-icon-wrap {
    width: 42px;
    height: 42px;
    font-size: 1rem;
    border-radius: 12px;
    margin-bottom: 16px;
  }

  .project-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .project-tag {
    font-size: 0.62rem;
    padding: 2px 8px;
  }

  .project-desc {
    font-size: 0.85rem;
  }

  /* Show "View on GitHub" as a proper visible button on mobile */
  .project-overlay {
    position: relative !important;
    inset: auto !important;
    opacity: 1 !important;
    background: var(--code-bg) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 12px !important;
    justify-content: center !important;
    margin-top: 20px !important;
    padding: 14px !important;
    width: 100% !important;
  }

  .project-overlay span {
    color: var(--primary-light) !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    transform: none !important;
  }

  /* --- Timeline --- */
  .timeline-wrap {
    padding-left: 36px;
  }

  .timeline-wrap::before {
    left: 12px;
  }

  .timeline-dot {
    left: -30px;
    width: 14px;
    height: 14px;
    top: 8px;
  }

  .timeline-content {
    padding: 22px 18px;
  }

  .timeline-content h3 {
    font-size: 1.05rem;
  }

  .timeline-content h4 {
    font-size: 0.82rem;
    margin-bottom: 10px;
  }

  .timeline-content ul li {
    font-size: 0.85rem;
    padding-left: 16px;
    line-height: 1.6;
  }

  .timeline-date {
    font-size: 0.7rem;
  }

  /* --- Achievements --- */
  .achieve-column h3 {
    font-size: 1.05rem;
    margin-bottom: 14px;
  }

  .achieve-item {
    padding: 12px 14px;
    border-radius: 12px;
    gap: 12px;
  }

  .achieve-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    font-size: 0.9rem;
  }

  .achieve-item h4 {
    font-size: 0.85rem;
  }

  .achieve-item p {
    font-size: 0.72rem;
  }

  /* --- Contact --- */
  .contact-form .form-control {
    font-size: 0.9rem;
    padding: 12px 14px;
    border-radius: 10px;
  }

  .contact-form textarea.form-control {
    min-height: 110px;
  }

  .form-submit {
    padding: 13px 24px;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  .contact-item {
    padding: 14px 14px;
    gap: 12px;
    border-radius: 12px;
  }

  .contact-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 1rem;
    border-radius: 10px;
  }

  .contact-item h4 {
    font-size: 0.82rem;
  }

  .contact-item p {
    font-size: 0.72rem;
  }

  /* --- Footer --- */
  .footer {
    padding: 50px 0 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .footer-decor {
    margin-bottom: 30px;
  }

  .footer-watermark {
    font-size: clamp(4rem, 14vw, 8rem);
  }

  .footer-bottom {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  /* --- Parallax elements — hide on mobile --- */
  .parallax-el {
    display: none;
  }

  .parallax-shape {
    display: none;
  }

  /* --- Reduce reveal distances for mobile --- */
  .reveal {
    transform: translateY(32px);
  }

  .reveal-left {
    transform: translateX(-30px);
  }

  .reveal-right {
    transform: translateX(30px);
  }

  .reveal-scale {
    transform: scale(0.85);
  }
}

/* ============================================
   RESPONSIVE — SMALL MOBILE (≤480px)
   ============================================ */
@media (max-width: 480px) {

  html {
    font-size: 15px;
  }

  .section {
    padding: 48px 0;
  }

  .section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    letter-spacing: -0.5px;
  }

  .section-label {
    font-size: 0.65rem;
    letter-spacing: 2px;
  }

  .section-label::before,
  .section-label::after {
    width: 18px;
  }

  .section-subtitle {
    font-size: 0.82rem;
  }

  /* --- Hero --- */
  .hero-content {
    padding-top: 80px;
  }

  .hero-name {
    font-size: clamp(1.7rem, 9vw, 2.5rem);
    letter-spacing: -0.5px;
  }

  .hero-typewriter {
    font-size: clamp(0.85rem, 4vw, 1.05rem);
  }

  .hero-tagline {
    font-size: 0.68rem;
  }

  .btn-glow {
    padding: 12px 20px;
    font-size: 0.85rem;
    border-radius: 10px;
  }

  /* --- Dashboard further compact --- */
  .hero-dashboard {
    padding: 12px;
    border-radius: 14px;
  }

  .dash-kpi {
    padding: 8px 10px;
    gap: 8px;
  }

  .dash-kpi-icon {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }

  .dash-kpi-value {
    font-size: 0.85rem;
  }

  .dash-chart-main {
    height: 120px;
  }

  .dash-chart-spark canvas {
    height: 38px !important;
  }

  /* --- About --- */
  .about-text p {
    font-size: 0.88rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .about-chart-card canvas {
    max-height: 200px;
  }

  /* --- Skills grid tighten --- */
  .skill-card {
    padding: 16px 8px;
  }

  .skill-icon-wrap {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }

  .skill-name {
    font-size: 0.72rem;
  }

  .skill-category {
    font-size: 0.52rem;
  }

  /* --- Projects --- */
  .project-card-inner {
    padding: 18px 14px;
  }

  .project-icon-wrap {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  .project-card h3 {
    font-size: 0.92rem;
  }

  .project-desc {
    font-size: 0.8rem;
  }

  /* --- Timeline --- */
  .timeline-wrap {
    padding-left: 30px;
  }

  .timeline-wrap::before {
    left: 10px;
  }

  .timeline-dot {
    left: -25px;
    width: 12px;
    height: 12px;
    border-width: 2px;
  }

  .timeline-content {
    padding: 18px 14px;
  }

  .timeline-content h3 {
    font-size: 0.95rem;
  }

  .timeline-content ul li {
    font-size: 0.8rem;
  }

  /* --- Achievements --- */
  .achieve-item {
    padding: 10px 12px;
    gap: 10px;
  }

  .achieve-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 0.82rem;
  }

  .achieve-item h4 {
    font-size: 0.8rem;
  }

  /* --- Contact --- */
  .contact-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 0.9rem;
  }

  .contact-item h4 {
    font-size: 0.78rem;
  }

  /* --- Navbar --- */
  .nav-brand {
    font-size: 1.3rem;
  }

  .navbar-custom {
    padding: 14px 0;
  }

  .navbar-custom.scrolled {
    padding: 8px 0;
  }

  /* --- Theme toggle --- */
  .theme-toggle {
    bottom: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }
}

/* ============================================
   RESPONSIVE — VERY SMALL (≤360px)
   ============================================ */
@media (max-width: 360px) {

  .hero-name {
    font-size: 1.6rem;
  }

  .hero-typewriter {
    font-size: 0.82rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .dash-filters {
    flex-wrap: wrap;
  }

  .dash-filter {
    flex: 1 1 45%;
    font-size: 0.58rem;
    padding: 4px 6px;
  }

  .stat-number {
    font-size: 1.3rem;
  }

  .about-chart-card canvas {
    max-height: 170px;
  }
}

/* ============================================
   LANDSCAPE MOBILE FIX
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
  #hero {
    min-height: auto;
    padding: 60px 0 40px;
  }

  .hero-content {
    padding-top: 60px;
  }

  .scroll-indicator {
    display: none;
  }

  /* Hide dashboard in landscape-mobile to save space */
  .dashboard-perspective {
    display: none;
  }
}

/* ============================================
   PRELOADER
   ============================================ */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.6s 0.8s ease, visibility 0.6s 0.8s;
}

body.loaded #preloader {
  opacity: 0;
  visibility: hidden;
}

.preloader-center {
  text-align: center;
  z-index: 2;
  animation: pulse 2s infinite;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

body.loaded .preloader-center {
  opacity: 0;
  transform: scale(0.8);
}

.preloader-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -1px;
}
.preloader-logo span {
  color: var(--accent);
}

.preloader-text {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 10px;
}

.floating-box {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 15px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0.8;
  z-index: 1;
}

.box-1 {
  width: 140px; height: 100px;
  top: 15%; left: 15%;
  animation: prefloat1 5s infinite alternate ease-in-out;
}
.box-1 .bar-chart {
  display: flex; gap: 4px; align-items: flex-end; height: 60px; margin-top: 10px;
}
.box-1 .bar-chart span {
  flex: 1; background: var(--gradient-primary); border-radius: 2px 2px 0 0;
  animation: pulseBar 2s infinite alternate ease-in-out;
}
.box-1 .bar-chart span:nth-child(1) { height: 40%; animation-delay: 0s; }
.box-1 .bar-chart span:nth-child(2) { height: 70%; animation-delay: 0.2s; }
.box-1 .bar-chart span:nth-child(3) { height: 50%; animation-delay: 0.4s; }
.box-1 .bar-chart span:nth-child(4) { height: 90%; animation-delay: 0.6s; }
@keyframes pulseBar { 0% { opacity: 0.5; } 100% { opacity: 1; } }

.box-2 {
  width: 100px; height: 100px;
  top: 20%; right: 20%;
  animation: prefloat2 4s infinite alternate ease-in-out;
  display: flex; align-items: center; justify-content: center;
}
.donut-spinner {
  width: 60px; height: 60px;
  border: 8px solid rgba(245, 158, 11, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

.box-3 {
  width: 150px;
  bottom: 25%; left: 20%;
  animation: prefloat3 4.5s infinite alternate ease-in-out;
}
.kpi-dummy {
  display: flex; align-items: center; gap: 10px;
}
.kpi-dummy i {
  font-size: 1.5rem; color: var(--primary-light);
}
.kpi-dummy .lines { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.kpi-dummy .l1 { height: 8px; width: 80%; background: var(--text-secondary); border-radius: 4px; }
.kpi-dummy .l2 { height: 6px; width: 40%; background: var(--text-muted); border-radius: 4px; }

.box-4 {
  width: 160px; height: 80px;
  bottom: 15%; right: 25%;
  animation: prefloat4 5.5s infinite alternate ease-in-out;
}
.line-chart-dummy {
  margin-top: 10px; width: 100%; height: 40px;
}

.box-5 {
  width: 140px;
  top: 45%; left: 5%;
  animation: prefloat5 6s infinite alternate ease-in-out;
}

@keyframes prefloat1 { 0% { transform: translate(0, 0) rotate(-5deg); } 100% { transform: translate(40px, 30px) rotate(5deg); } }
@keyframes prefloat2 { 0% { transform: translate(0, 0) rotate(10deg); } 100% { transform: translate(-30px, 50px) rotate(-10deg); } }
@keyframes prefloat3 { 0% { transform: translate(0, 0); } 100% { transform: translate(50px, -40px) rotate(8deg); } }
@keyframes prefloat4 { 0% { transform: translate(0, 0) rotate(-10deg); } 100% { transform: translate(-40px, -20px) rotate(0deg); } }
@keyframes prefloat5 { 0% { transform: translate(0, 0) rotate(5deg); } 100% { transform: translate(30px, -50px) rotate(-5deg); } }

/* Suck into center animation */
body.loaded .floating-box {
  animation: suckIntoCenter 0.8s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards !important;
}
@keyframes suckIntoCenter {
  100% {
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0) rotate(90deg);
    opacity: 0;
  }
}

/* Dashboard Assembly Animation */
body.loaded .hero-dashboard {
  animation: dashEntrance 1.2s 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes dashEntrance {
  0% { transform: rotateX(10deg) rotateY(-10deg) scale3d(0.95, 0.95, 0.95); opacity: 0; }
  100% { transform: rotateX(2deg) rotateY(-4deg) scale3d(1, 1, 1); opacity: 1; }
}

body.loaded .dash-header { animation: flyDown 1s 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
body.loaded #kpi1 { animation: flyRight 0.8s 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
body.loaded #kpi2 { animation: flyUp 0.8s 1.0s cubic-bezier(0.16, 1, 0.3, 1) both; }
body.loaded #kpi3 { animation: flyLeft 0.8s 1.1s cubic-bezier(0.16, 1, 0.3, 1) both; }
body.loaded .dash-filters { animation: flyUp 0.8s 1.2s cubic-bezier(0.16, 1, 0.3, 1) both; }
body.loaded .dash-chart-main { animation: flyRight 0.9s 1.3s cubic-bezier(0.16, 1, 0.3, 1) both; }
body.loaded .dash-chart-side { animation: flyLeft 0.9s 1.4s cubic-bezier(0.16, 1, 0.3, 1) both; }
body.loaded .dash-chart-spark { animation: flyUp 0.9s 1.5s cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes flyDown { 0% { opacity: 0; transform: translateY(-40px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes flyUp { 0% { opacity: 0; transform: translateY(40px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes flyRight { 0% { opacity: 0; transform: translateX(-50px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes flyLeft { 0% { opacity: 0; transform: translateX(50px); } 100% { opacity: 1; transform: translateX(0); } }

/* ============================================
   TEXT REVEAL ANIMATIONS (Awwwards Style)
   ============================================ */
.reveal-text-mask {
  overflow: hidden;
  display: inline-flex;
  vertical-align: bottom;
  padding-bottom: 4px; /* prevent descender clipping */
  margin-bottom: -4px;
}

.reveal-text-inner {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

/* When the parent section-header gets .active from IntersectionObserver */
.reveal.active .reveal-text-inner {
  transform: translateY(0);
  opacity: 1;
}

/* Stagger lines slightly if there are multiple lines */
.reveal.active .reveal-text-inner:nth-child(1) { transition-delay: 0.1s; }
.reveal.active .reveal-text-inner:nth-child(2) { transition-delay: 0.2s; }
.reveal.active .reveal-text-inner:nth-child(3) { transition-delay: 0.3s; }
.reveal.active .reveal-text-inner:nth-child(4) { transition-delay: 0.4s; }

/* Custom trigger for hero elements wrapped in reveal masks */
body.loaded .hero-name .reveal-text-inner,
body.loaded .hero-tagline .reveal-text-inner {
  transform: translateY(0);
  opacity: 1;
}
body.loaded .hero-name .reveal-text-inner { transition-delay: 0.9s; }
body.loaded .hero-tagline .reveal-text-inner { transition-delay: 1.2s; }