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

:root {
  /* ── Backgrounds ── */
  --bg: #0B0D17;
  --bg2: #0F1120;
  --bg3: #131527;

  /* ── Cards / Glass ── */
  --card: rgba(255, 255, 255, 0.04);
  --card-b: rgba(255, 255, 255, 0.09);
  --card-hover: rgba(255, 255, 255, 0.07);

  /* ── Accent Palette ── */
  --indigo: #6366F1;
  /* primary */
  --violet: #8B5CF6;
  /* secondary */
  --gold: #F59E0B;
  /* highlight */
  --rose: #F43F5E;
  /* danger / hot */
  --sky: #38BDF8;
  /* info */
  --emerald: #10B981;
  /* success */

  /* ── Gradient helpers ── */
  --grad-main: linear-gradient(135deg, #6366F1, #8B5CF6);
  --grad-gold: linear-gradient(135deg, #F59E0B, #FBBF24);
  --grad-hero: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  --grad-glow: 0 0 40px rgba(99, 102, 241, 0.25);

  /* ── Text ── */
  --txt: #E2E8F0;
  --txt-muted: #94A3B8;
  --txt-dim: #475569;

  /* ── Misc ── */
  --sidebar-w: 280px;
  --r: 16px;
  --rs: 10px;
  --t: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Light theme ── */
[data-theme="light"] {
  --bg: #F1F5F9;
  --bg2: #E2E8F0;
  --bg3: #CBD5E1;

  --card: rgba(255, 255, 255, 0.9);
  --card-b: rgba(0, 0, 0, 0.08);
  --card-hover: rgba(255, 255, 255, 1);

  /* Darker purples for contrast on light backgrounds */
  --indigo: #4338CA;
  --violet: #5B21B6;
  --grad-main: linear-gradient(135deg, #4338CA, #6D28D9);
  --grad-hero: linear-gradient(135deg, #4338CA 0%, #6D28D9 50%, #BE185D 100%);

  --txt: #1E293B;
  --txt-muted: #475569;
  --txt-dim: #64748B;

  --grad-glow: 0 0 40px rgba(67, 56, 202, 0.2);
}

[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
  border-right-color: rgba(99, 102, 241, 0.15);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .sidebar-header,
[data-theme="light"] .sidebar-nav {
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .contact-list li:hover {
  background: rgba(67, 56, 202, 0.06);
}

[data-theme="light"] .code-window {
  background: #1E293B;
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

/* Light theme: readable purple accents (no hardcoded light purples) */
[data-theme="light"] .hero-greeting {
  color: #5B21B6;
}

[data-theme="light"] .hero-bio strong {
  color: #4338CA;
}

[data-theme="light"] .btn-ghost {
  border-color: rgba(67, 56, 202, 0.6);
  color: #4338CA;
}

[data-theme="light"] .btn-ghost:hover {
  background: rgba(67, 56, 202, 0.1);
  border-color: #4338CA;
}

[data-theme="light"] .badge {
  color: #4338CA;
  border-color: rgba(67, 56, 202, 0.5);
  background: rgba(67, 56, 202, 0.12);
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
  color: #4338CA;
}

[data-theme="light"] .nav-link.active .nav-dot {
  background: var(--grad-main);
}

/* Hero typewriter / role text */
[data-theme="light"] .typewriter-wrap {
  color: #5B21B6;
}

[data-theme="light"] .filter-btn:hover {
  color: #4338CA;
}

[data-theme="light"] .port-link {
  background: var(--grad-main);
  border-color: transparent;
  color: #fff;
}

[data-theme="light"] .port-link:hover {
  background: var(--grad-main);
}

[data-theme="light"] .contact-info-card a:hover {
  color: #4338CA;
}

[data-theme="light"] .form-group label {
  color: #4338CA;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--txt);
  overflow-x: hidden;
  line-height: 1.65;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input,
textarea {
  font-family: inherit;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg2);
}

::-webkit-scrollbar-thumb {
  background: var(--indigo);
  border-radius: 3px;
}

/* ══════════════════════════════════════════════
   PARTICLES
══════════════════════════════════════════════ */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Flutter icon (SVG fallback; FA may not include it) ── */
.icon-flutter {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: url("images/flutter-icon.svg") center / contain no-repeat;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

.service-icon .icon-flutter {
  width: 1.75em;
  height: 1.75em;
  vertical-align: middle;
}

.skill-info .icon-flutter {
  width: 1.1em;
  height: 1.1em;
  margin-right: 0.35em;
}

/* ══════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, rgba(15, 17, 32, 0.98) 0%, rgba(11, 13, 23, 0.98) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(99, 102, 241, 0.15);
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--t);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.35rem;
  min-height: 100%;
  gap: 0;
}

/* ── Sidebar header block ── */
.sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-bottom: 1.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Avatar */
.avatar-ring {
  position: relative;
  width: 168px;
  height: 168px;
  margin-bottom: 1.35rem;
  flex-shrink: 0;
  border-radius: 50%;
  padding: 3px;
  background: var(--bg2);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.75);
}

.avatar-glow {
  display: none;
}

.avatar-photo {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
}

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

.avatar-initials {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  font-weight: 800;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: var(--grad-main);
  z-index: 1;
}

.sidebar-name {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
  margin-bottom: 1.15rem;
  letter-spacing: -0.02em;
}

.sidebar-name span {
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.badge {
  display: inline-block;
  padding: 0.28rem 0.85rem;
  border-radius: 99px;
  border: 1px solid rgba(139, 92, 246, 0.5);
  background: rgba(99, 102, 241, 0.1);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #A5B4FC;
  text-transform: uppercase;
}

.badge-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 1rem;
}

.badge-with-icon .icon-flutter {
  width: 1.05em;
  height: 1.05em;
}

/* Theme toggle ── top right of header area */
.sidebar-header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  flex-wrap: wrap;
}

.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--card-b);
  color: var(--txt);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--card-hover);
  border-color: rgba(99, 102, 241, 0.4);
  transform: scale(1.06);
}

.theme-toggle i {
  position: absolute;
  font-size: 1rem;
  transition: opacity var(--t), transform var(--t);
}

.theme-toggle .fa-moon {
  opacity: 1;
}

.theme-toggle .fa-sun {
  opacity: 0;
}

[data-theme="light"] .theme-toggle .fa-moon {
  opacity: 0;
}

[data-theme="light"] .theme-toggle .fa-sun {
  opacity: 1;
}

/* Contact block */
.sidebar-section {
  width: 100%;
  margin-bottom: 1.5rem;
}

.sidebar-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--txt-dim);
  margin-bottom: 0.65rem;
  padding-left: 0.5rem;
}

.contact-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.76rem;
  color: var(--txt-muted);
  padding: 0.5rem 0.65rem;
  border-radius: var(--rs);
  transition: background var(--t), color var(--t);
}

.contact-list li:hover {
  background: var(--card);
  color: var(--txt);
}

.contact-list li i {
  color: var(--indigo);
  font-size: 0.8rem;
  flex-shrink: 0;
  width: 1.1em;
  text-align: center;
}

.contact-list li a:hover {
  color: var(--indigo);
}

.contact-list li span,
.contact-list li a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Resume button */
.btn-resume {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  background: var(--grad-main);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  transition: transform var(--t), box-shadow var(--t);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  width: 100%;
  max-width: 220px;
}

.btn-resume-logo {
  width: 18px;
  height: 18px;
}

.btn-resume:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.45);
}

/* Nav */
.sidebar-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--txt-muted);
  transition: all var(--t);
}

.nav-link:hover {
  color: #C4B5FD;
  background: rgba(99, 102, 241, 0.08);
}

.nav-link.active {
  color: #C4B5FD;
  background: rgba(99, 102, 241, 0.14);
  border-left: 3px solid var(--indigo);
  padding-left: calc(1rem - 3px);
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 2px solid var(--txt-dim);
  transition: all var(--t);
  flex-shrink: 0;
}

.nav-link.active .nav-dot {
  background: var(--violet);
  border-color: var(--violet);
  box-shadow: 0 0 6px var(--violet);
}

/* ══════════════════════════════════════════════
   HAMBURGER / OVERLAY
══════════════════════════════════════════════ */
.hamburger {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 200;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(15, 17, 32, 0.92);
  backdrop-filter: blur(10px);
  border-radius: var(--rs);
  border: 1px solid var(--card-b);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--txt);
  border-radius: 2px;
  transition: all var(--t);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

[data-theme="light"] .hamburger {
  background: rgba(248, 250, 252, 0.96);
  border-color: rgba(148, 163, 184, 0.6);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
}

[data-theme="light"] .hamburger span {
  background: #0f172a;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 99;
}

.sidebar-overlay.visible {
  display: block;
}

/* ══════════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.section {
  display: none;
  padding: 3rem;
  min-height: 100vh;
  animation: fadeIn 0.5s ease;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══════════════════════════════════════════════
   SHARED UTILITIES
══════════════════════════════════════════════ */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  margin-bottom: 1.5rem;
  padding: 0.85rem 3rem 0.35rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.94));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0;
  display: flex;
  justify-content: flex-end;
}

.top-nav-inner {
  display: inline-flex;
  gap: 1.5rem;
  align-items: center;
}

.top-nav-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--txt-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding-bottom: 0.15rem;
  border-bottom: 2px solid transparent;
  transition: color var(--t), border-color var(--t);
}

.top-nav-link:hover {
  color: #E5E7EB;
}

.top-nav-link.active {
  color: #E5E7EB;
  border-color: var(--indigo);
}

[data-theme="light"] .top-nav {
  background: rgba(248, 250, 252, 0.94);
  border-bottom-color: rgba(148, 163, 184, 0.35);
}

[data-theme="light"] .top-nav-link {
  color: var(--txt-dim);
}

[data-theme="light"] .top-nav-link:hover {
  color: var(--indigo);
}

[data-theme="light"] .top-nav-link.active {
  color: var(--indigo);
  border-color: var(--indigo);
}

@media (max-width: 768px) {
  .top-nav {
    padding: 0.6rem 1.25rem 0.3rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .top-nav-inner {
    justify-content: space-between;
    width: 100%;
  }

  .top-nav-link {
    font-size: 0.78rem;
  }
}

.gradient-text {
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

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

.title-line {
  width: 48px;
  height: 3px;
  background: var(--grad-main);
  border-radius: 3px;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 99px;
  background: var(--grad-main);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--t);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

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

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 99px;
  border: 1px solid rgba(99, 102, 241, 0.5);
  color: #A5B4FC;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--t);
}

.btn-ghost:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--indigo);
}

/* ══════════════════════════════════════════════
   ABOUT / HERO
══════════════════════════════════════════════ */
.hero-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 4rem;
  padding: 2.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.07) 0%, rgba(139, 92, 246, 0.04) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* Profile image in hero — visible only when sidebar/code window hidden (tablet & mobile) */
.hero-profile-img-wrap {
  display: none;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.hero-profile-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.15);
}

.hero-greeting {
  color: #A5B4FC;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-name {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.8rem;
}

.typewriter-wrap {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem;
  color: #C4B5FD;
  margin-bottom: 1.1rem;
  min-height: 1.7em;
}

.cursor {
  animation: blink 1s step-end infinite;
  color: var(--gold);
}

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

.hero-bio {
  color: var(--txt-muted);
  font-size: 0.93rem;
  margin-bottom: 1.75rem;
  max-width: 460px;
}

.hero-bio strong {
  color: #C4B5FD;
  font-weight: 700;
}

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

.stat-row {
  display: flex;
  gap: 1rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.8rem 1.1rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--rs);
  min-width: 82px;
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 0.68rem;
  color: var(--txt-muted);
  text-align: center;
  margin-top: 2px;
}

/* Hero platforms (Android & iOS) */
.platform-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--card);
  border: 1px solid var(--card-b);
  color: var(--txt-muted);
  transition: background var(--t), border-color var(--t), color var(--t);
}

.platform-pill i {
  font-size: 1rem;
}

.platform-pill:first-child i {
  color: #3DDC84;
}

.platform-pill:last-child i {
  color: var(--txt);
}

.platform-pill:hover {
  background: var(--card-hover);
  border-color: rgba(99, 102, 241, 0.25);
  color: var(--txt);
}

/* Code Window */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.code-window {
  background: #090B17;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 20px;
  overflow: hidden;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.1), 0 0 60px rgba(99, 102, 241, 0.08);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red {
  background: #FF5F57;
}

.dot.yellow {
  background: #FFBD2E;
}

.dot.green {
  background: #28C840;
}

.code-title {
  font-size: 0.73rem;
  color: var(--txt-dim);
  margin-left: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
}

.code-body {
  padding: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.9;
  overflow-x: auto;
  color: #8892A4;
}

.kw {
  color: #C792EA;
}

.cls {
  color: #82AAFF;
}

.fn {
  color: #82AAFF;
}

.str {
  color: #C3E88D;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--card-b);
  border-radius: var(--r);
  padding: 1.75rem;
  transition: all var(--t);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-main);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.35);
  background: var(--card-hover);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(99, 102, 241, 0.12);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--rs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.port-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.android-color {
  background: rgba(61, 220, 132, 0.15);
  color: #3DDC84;
}

.ios-color {
  background: rgba(160, 160, 160, 0.2);
  color: #A0A0A0;
}

.flutter-color {
  background: rgba(83, 181, 255, 0.12);
  color: #54C5F8;
}

.django-color {
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
}

.firebase-color {
  background: rgba(245, 158, 11, 0.12);
  color: #F59E0B;
}

.aws-color {
  background: rgba(255, 153, 0, 0.12);
  color: #FF9900;
}

.maps-color {
  background: rgba(99, 102, 241, 0.15);
  color: #818CF8;
}

.service-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.service-platforms {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  background: var(--card);
  border: 1px solid var(--card-b);
  color: var(--txt-muted);
}

.platform-badge:first-child i {
  color: #3DDC84;
}

.platform-badge:last-child i {
  color: var(--txt);
}

.service-card p {
  font-size: 0.84rem;
  color: var(--txt-muted);
  line-height: 1.65;
}

/* ══════════════════════════════════════════════
   RESUME
══════════════════════════════════════════════ */
.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.timeline-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.timeline-heading i {
  color: var(--indigo);
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.tl-dot {
  position: absolute;
  left: -1.68rem;
  top: 0.45rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--indigo);
  box-shadow: 0 0 10px var(--indigo);
}

.tl-date {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 99px;
  font-size: 0.72rem;
  color: #A5B4FC;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 0.5rem;
}

.tl-body h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.tl-sub {
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.tl-body>p {
  font-size: 0.82rem;
  color: var(--txt-muted);
}

.tl-list {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tl-list li {
  font-size: 0.82rem;
  color: var(--txt-muted);
  padding-left: 1rem;
  position: relative;
}

.tl-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--indigo);
}

/* Skills */
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.skill-info i {
  color: var(--indigo);
  margin-right: 0.4rem;
}

.skill-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: var(--grad-main);
  border-radius: 99px;
  transition: width 1.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.skill-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: var(--violet);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--violet);
}

/* Certificates */
.cert-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--card-b);
  border-radius: var(--rs);
  transition: all var(--t);
}

.cert-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateX(4px);
  background: var(--card-hover);
}

.cert-icon {
  width: 44px;
  height: 44px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold);
  border-radius: var(--rs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.cert-body {
  flex: 1;
}

.cert-body h5 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.cert-date {
  font-size: 0.74rem;
  color: var(--txt-muted);
  font-family: 'JetBrains Mono', monospace;
}

.cert-link {
  color: var(--gold);
  font-size: 0.9rem;
  transition: transform var(--t);
  flex-shrink: 0;
}

.cert-link:hover {
  transform: scale(1.25);
}

/* ══════════════════════════════════════════════
   PORTFOLIO
══════════════════════════════════════════════ */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 99px;
  border: 1px solid var(--card-b);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--txt-muted);
  transition: all var(--t);
  background: var(--card);
}

.filter-btn:hover {
  border-color: var(--indigo);
  color: #A5B4FC;
  background: rgba(99, 102, 241, 0.08);
}

.filter-btn.active {
  background: var(--grad-main);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.portfolio-card {
  background: var(--card);
  border: 1px solid var(--card-b);
  border-radius: var(--r);
  overflow: hidden;
  transition: all var(--t);
  position: relative;
}

.portfolio-card:hover {
  transform: translateY(-7px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(99, 102, 241, 0.12);
}

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

.port-thumb {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  position: relative;
  overflow: hidden;
}

.port-thumb img.port-thumb-img {
  position: absolute;
  inset: 0;
}

.port-thumb-screenshot {
  height: auto;
  padding: 14px 18px 8px;
  align-items: center;
  background: transparent;
}

.port-thumb-screenshot img.port-thumb-img {
  position: static;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.55);
}

.port-thumb-screenshot::after {
  display: none;
}

.port-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(11, 13, 23, 0.6) 100%);
}

.port-body {
  padding: 1.1rem 1.15rem;
}

.port-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #A5B4FC;
  font-family: 'JetBrains Mono', monospace;
  display: block;
  margin-bottom: 0.4rem;
}

[data-theme="light"] .port-tag {
  color: #4338CA;
}

.port-tag-platforms {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.port-tag-platforms i:first-child {
  color: #3DDC84;
}

.port-tag-platforms i:last-of-type {
  color: var(--txt);
}

.port-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.port-body p {
  font-size: 0.8rem;
  color: var(--txt-muted);
  line-height: 1.55;
}

.port-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 13, 23, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--t);
  backdrop-filter: blur(6px);
}

.portfolio-card:hover .port-overlay {
  opacity: 1;
}

.port-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  background: var(--grad-main);
  border: 1px solid transparent;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform var(--t), box-shadow var(--t), background var(--t);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.5), 0 10px 25px rgba(15, 23, 42, 0.65);
}

.port-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.8);
}

.port-link i {
  font-size: 1rem;
}

/* Image gallery slider modal */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 13, 23, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity var(--t);
}

.gallery-modal-inner {
  position: relative;
  max-width: 900px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity var(--t), transform var(--t);
}

.gallery-modal.open {
  pointer-events: auto;
}

.gallery-modal.open .gallery-modal-backdrop {
  opacity: 1;
}

.gallery-modal.open .gallery-modal-inner {
  opacity: 1;
  transform: scale(1);
}

.gallery-slide-container {
  position: relative;
  width: 100%;
}

.gallery-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(30, 41, 59, 0.9);
  color: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background var(--t), transform var(--t);
}

.gallery-modal-close:hover {
  background: rgba(99, 102, 241, 0.8);
  transform: scale(1.05);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(30, 41, 59, 0.85);
  color: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background var(--t), transform var(--t);
}

.gallery-nav:hover {
  background: rgba(99, 102, 241, 0.7);
  transform: translateY(-50%) scale(1.08);
}

.gallery-prev {
  left: -1.5rem;
}

.gallery-next {
  right: -1.5rem;
}

.gallery-slide-wrap {
  background: #0f172a;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  width: 100%;
  min-height: 320px;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slide-img {
  width: 100%;
  height: 100%;
  max-height: 70vh;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  flex-shrink: 0;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(148, 163, 184, 0.4);
  cursor: pointer;
  transition: background var(--t), transform var(--t);
}

.gallery-dot:hover {
  background: rgba(148, 163, 184, 0.7);
}

.gallery-dot.active {
  background: var(--indigo);
  transform: scale(1.2);
}

.gallery-counter {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--txt-muted);
  flex-shrink: 0;
}

[data-theme="light"] .gallery-slide-wrap {
  background: #1e293b;
}

[data-theme="light"] .gallery-modal-close,
[data-theme="light"] .gallery-nav {
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
}

[data-theme="light"] .gallery-modal-close:hover,
[data-theme="light"] .gallery-nav:hover {
  background: rgba(67, 56, 202, 0.9);
  color: #fff;
}

@media (max-width: 768px) {
  .gallery-modal-inner {
    padding: 0 2.5rem;
  }

  .gallery-nav {
    width: 40px;
    height: 40px;
  }

  .gallery-prev {
    left: 0.25rem;
  }

  .gallery-next {
    right: 0.25rem;
  }

  .gallery-slide-wrap {
    min-height: 260px;
  }
}

/* Video modal */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity var(--t);
}

.video-modal-inner {
  position: relative;
  max-width: 960px;
  margin: 4rem auto;
  padding: 0;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity var(--t), transform var(--t);
}

.video-modal-body {
  background: #020617;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8);
}

.video-player {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
}

.video-modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.95);
  color: #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
}

.video-modal-close:hover {
  background: rgba(30, 64, 175, 0.95);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.9);
  transform: translateY(-1px);
}

.video-modal.open {
  pointer-events: auto;
}

.video-modal.open .video-modal-backdrop {
  opacity: 1;
}

.video-modal.open .video-modal-inner {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 900px) {
  .video-modal-inner {
    margin: 3rem 1rem;
  }
}

/* ─── Thumb Gradients (all harmonised) ─── */
.flutter-grad {
  background: linear-gradient(135deg, #1a1f4a 0%, #0d1130 100%);
  color: #818CF8;
}

.django-grad {
  background: linear-gradient(135deg, #12263a 0%, #080f20 100%);
  color: #38BDF8;
}

.maps-grad {
  background: linear-gradient(135deg, #1e1348 0%, #10092c 100%);
  color: #A78BFA;
}

.teal-grad {
  background: linear-gradient(135deg, #0d2538 0%, #061420 100%);
  color: #67E8F9;
}

.purple-grad {
  background: linear-gradient(135deg, #261040 0%, #160826 100%);
  color: #C084FC;
}

.orange-grad {
  background: linear-gradient(135deg, #28124a 0%, #160830 100%);
  color: #F472B6;
}

.cyan-grad {
  background: linear-gradient(135deg, #0e2245 0%, #080f28 100%);
  color: #60A5FA;
}

.pink-grad {
  background: linear-gradient(135deg, #301050 0%, #1c0830 100%);
  color: #E879F9;
}

.green-grad {
  background: linear-gradient(135deg, #0f1e48 0%, #08102a 100%);
  color: #818CF8;
}

.indigo-grad {
  background: linear-gradient(135deg, #1c1550 0%, #0e0c32 100%);
  color: #A5B4FC;
}

.yellow-grad {
  background: linear-gradient(135deg, #22123a 0%, #120920 100%);
  color: #C084FC;
}

.red-grad {
  background: linear-gradient(135deg, #261040 0%, #140825 100%);
  color: #F9A8D4;
}

.fire-grad {
  background: linear-gradient(135deg, #1f1248 0%, #100a2c 100%);
  color: #A78BFA;
}

.blue-grad {
  background: linear-gradient(135deg, #101a48 0%, #080e28 100%);
  color: #7DD3FC;
}

/* ══════════════════════════════════════════════
   CONTACT
══════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
}

.contact-intro {
  color: var(--txt-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact-info-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.15rem;
  background: var(--card);
  border: 1px solid var(--card-b);
  border-radius: var(--rs);
  transition: all var(--t);
}

.contact-info-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateX(5px);
  background: var(--card-hover);
}

.ci-icon {
  width: 42px;
  height: 42px;
  background: rgba(99, 102, 241, 0.12);
  color: #818CF8;
  border-radius: var(--rs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.ci-label {
  font-size: 0.7rem;
  color: var(--txt-dim);
  margin-bottom: 0.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-info-card a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--txt);
}

.contact-info-card a:hover {
  color: #A5B4FC;
}

/* Form */
.contact-form {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--r);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.08), 0 20px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

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

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #A5B4FC;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--rs);
  padding: 0.75rem 1rem;
  color: var(--txt);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

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

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.form-success {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--rs);
  color: #34D399;
  font-size: 0.85rem;
  font-weight: 600;
}

.form-success.show {
  display: flex;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .hero-banner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }

  .hero-profile-img-wrap {
    display: flex;
  }

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

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

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 260px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .hamburger {
    display: flex;
  }

  .main-content {
    margin-left: 0;
  }

  .section {
    padding: 4.5rem 1.25rem 2rem;
  }

  .hero-name {
    font-size: 1.9rem;
  }

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

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

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

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

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

  .stat-row {
    flex-wrap: wrap;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}