/* ==========================================
   DESIGN SYSTEM & VARIABLES
   ========================================== */

:root {
  /* Dark Theme Default — Cosmic Cyber Accent */
  --bg-primary: #070a13;
  --bg-secondary: #0f1524;
  --bg-mesh-1: rgba(168, 85, 247, 0.15); /* Luminous Violet glow */
  --bg-mesh-2: rgba(0, 240, 255, 0.12);   /* Luminous Cyan glow */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --card-bg: rgba(15, 21, 36, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-shadow: rgba(0, 0, 0, 0.5);
  --input-bg: rgba(7, 10, 19, 0.8);
  
  /* Constant Accent Colors */
  --primary: #a855f7;       /* Luminous Violet */
  --primary-rgb: 168, 85, 247;
  --accent: #00f0ff;        /* Neon Cyan */
  --accent-rgb: 0, 240, 255;
  --primary-grad: linear-gradient(135deg, #a855f7 0%, #00f0ff 100%); /* Stunning Violet-Cyan */
  --accent-grad: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);  /* Cobalt-Violet */
  
  /* Utilities */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Poppins', sans-serif;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
  --border-radius-lg: 1.5rem;
  --border-radius-md: 0.8rem;
  --border-radius-sm: 0.5rem;
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-mesh-1: rgba(139, 92, 246, 0.06);
  --bg-mesh-2: rgba(6, 182, 212, 0.06);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --card-bg: rgba(255, 255, 255, 0.75);
  --card-border: rgba(0, 0, 0, 0.08);
  --card-shadow: rgba(148, 163, 184, 0.08);
  --input-bg: rgba(255, 255, 255, 0.9);
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.6rem;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 0.8rem;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Heading Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

/* Gradient text — ONLY on section titles, logo dot, and hero heading spans */
.section-title span,
.home-content h1 span,
.logo span,
.footer-logo h3 span,
.stat-card h3 {
  background: var(--primary-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================
   SAFE DEFAULT: never clip these elements
   ========================================== */
p, a, li, label, h3, h4, h5, h6,
.nav-link, .tab-btn, .filter-btn,
.timeline-date, .timeline-company, .timeline-desc,
.timeline-header h4, .badge-text h4, .badge-text p,
.welcome-badge span,
.project-tech-tags span, .project-category-tag,
.projects-content h4, .projects-content p,
.contact-card .card-details h4, .contact-card .card-details p,
.contact-card .card-details a,
.stat-card p, .footer-links a, .footer-text p,
.about-content .subtitle, .about-description,
.section-subtitle, .skills-category h3,
.service-item h4, .service-item p,
.home-content h2, .home-content p,
.skill-card span {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: currentColor !important;
}

/* ==========================================
   DYNAMIC BACKGROUND ORBS
   ========================================== */

.bg-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(10rem);
  opacity: 0.8;
  mix-blend-mode: screen;
}

[data-theme="light"] .mesh-orb {
  mix-blend-mode: multiply;
  filter: blur(8rem);
  opacity: 0.5;
}

.orb-1 {
  top: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: var(--bg-mesh-1);
  animation: floatOrb1 20s infinite alternate;
}

.orb-2 {
  bottom: -10%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  background: var(--bg-mesh-2);
  animation: floatOrb2 25s infinite alternate;
}

.orb-3 {
  top: 40%;
  left: 50%;
  width: 30vw;
  height: 30vw;
  background: rgba(236, 72, 153, 0.06);
  animation: floatOrb3 15s infinite alternate;
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-8%, 15%) scale(1.1); }
}
@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(12%, -10%) scale(0.9); }
}
@keyframes floatOrb3 {
  0% { transform: translate(-50%, -50%) scale(0.9); }
  100% { transform: translate(-30%, -30%) scale(1.1); }
}

/* ==========================================
   HEADER & GLASS NAVIGATION
   ========================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2.2rem 9%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.header.sticky {
  background-color: rgba(var(--primary-rgb), 0.02);
  backdrop-filter: blur(1.5rem);
  border-bottom: 1px solid var(--card-border);
  padding: 1.5rem 9%;
  box-shadow: 0 1rem 3rem -1.5rem var(--card-shadow);
}

.logo {
  font-size: 2.6rem;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.05rem;
}
.logo span {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

.navbar {
  display: flex;
  gap: 3.5rem;
}

.nav-link {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition-fast);
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-grad);
  border-radius: 2px;
  transition: var(--transition);
}

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

/* Theme Toggle Button */
.theme-btn, .menu-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 1.8rem;
  box-shadow: 0 4px 6px -1px var(--card-shadow);
  transition: var(--transition-fast);
}

.theme-btn:hover, .menu-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 0 1rem rgba(var(--primary-rgb), 0.3);
}

.menu-btn {
  display: none;
}

/* ==========================================
   BUTTONS STYLING
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 3rem;
  border-radius: 10rem;
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: var(--transition);
}

.btn span {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: inherit;
  color: inherit;
}

.btn-primary {
  background: var(--primary-grad);
  color: #fff;
  box-shadow: 0 8px 24px -6px rgba(var(--primary-rgb), 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -4px rgba(var(--primary-rgb), 0.6);
}

.btn-primary i {
  font-size: 1.8rem;
  transition: transform 0.3s ease;
}

.btn-primary:hover i {
  transform: translateX(4px);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 12px var(--card-shadow);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 8px 20px -6px rgba(var(--primary-rgb), 0.3);
}

/* ==========================================
   HERO / HOME SECTION
   ========================================== */

.home {
  position: relative;
  min-height: 100vh;
  padding: 15rem 9% 6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 6rem;
  width: 100%;
}

.home-content {
  max-width: 70rem;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.6rem;
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  border-radius: 10rem;
  margin-bottom: 2.5rem;
}
.welcome-badge i {
  color: var(--primary);
  font-size: 1.6rem;
}
.welcome-badge span {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.05rem;
  background: var(--primary-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-content h1 {
  font-size: 6.2rem;
  letter-spacing: -0.15rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.home-content h2 {
  font-size: 3.2rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.home-content p {
  font-size: 1.7rem;
  color: var(--text-secondary);
  margin-bottom: 4rem;
  max-width: 55rem;
}

.social-media {
  display: flex;
  gap: 1.8rem;
  margin-bottom: 4rem;
}

.social-media a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 4.5rem;
  height: 4.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  font-size: 2rem;
  color: var(--text-secondary);
  box-shadow: 0 4px 10px var(--card-shadow);
  position: relative;
  z-index: 1;
}

.social-media a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--brand-color, var(--primary));
  opacity: 0;
  z-index: -1;
  transform: scale(0.8);
  transition: var(--transition);
}

.social-media a:hover {
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px -4px var(--brand-color, var(--primary));
}

.social-media a:hover::before {
  opacity: 1;
  transform: scale(1.05);
}

.home-buttons {
  display: flex;
  gap: 2rem;
}

/* Hero Avatar Column */
.home-img-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-img-glow {
  position: absolute;
  width: 36rem;
  height: 36rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.35) 0%, rgba(0, 240, 255, 0.2) 60%, transparent 80%);
  filter: blur(4rem);
  z-index: 0;
  animation: auraPulse 4s ease-in-out infinite alternate;
}

@keyframes auraPulse {
  0% { transform: scale(0.95); opacity: 0.25; }
  100% { transform: scale(1.1); opacity: 0.45; }
}

/* Animated Cyber Orbit Rings */
.cyber-orbit-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.ring-outer {
  width: 40rem;
  height: 40rem;
  border: 1.5px dashed rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
  animation: spinClockwise 25s linear infinite;
}

.ring-inner {
  width: 36rem;
  height: 36rem;
  border: 1.5px solid transparent;
  border-top: 2px solid var(--primary);
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
  animation: spinCounterClockwise 18s linear infinite;
}

@keyframes spinClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spinCounterClockwise {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.home-img {
  position: relative;
  z-index: 2;
  width: 33rem;
  height: 33rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid transparent;
  background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box, var(--primary-grad) border-box;
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.35), 0 0 70px rgba(0, 240, 255, 0.2);
}

.home-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  animation: floatImage 6s ease-in-out infinite;
}

@keyframes floatImage {
  0%, 100% { transform: translateY(0) scale(1.02); }
  50% { transform: translateY(-1.2rem) scale(1.05); }
}

/* Floating Badges Styling & Placement */
.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: rgba(15, 21, 36, 0.85);
  backdrop-filter: blur(1.5rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.2rem 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  z-index: 3;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-badge:hover {
  transform: scale(1.06) translateY(-6px) !important;
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 240, 255, 0.3);
}

.badge-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--primary-grad);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 2rem;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.badge-icon-purple {
  background: linear-gradient(135deg, #00f0ff 0%, #a855f7 100%);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.badge-text h4 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.badge-text p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-1 {
  top: 8%;
  left: -8%;
  animation: floatingBadge1 5s ease-in-out infinite alternate;
}

.badge-2 {
  bottom: 8%;
  right: -8%;
  animation: floatingBadge2 6s ease-in-out 1s infinite alternate;
}

.badge-3 {
  top: 48%;
  right: -12%;
  animation: floatingBadge1 5.5s ease-in-out 0.5s infinite alternate;
}

@keyframes floatingBadge1 {
  0% { transform: translateY(0); }
  100% { transform: translateY(-1.2rem); }
}

@keyframes floatingBadge2 {
  0% { transform: translateY(0); }
  100% { transform: translateY(1.2rem); }
}

/* Scroll down mouse indicator */
.scroll-down {
  position: absolute;
  bottom: 4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.scroll-down a {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-secondary);
  font-size: 1.2rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.scroll-down a:hover {
  color: var(--primary);
}

.scroll-down .mouse {
  width: 2.2rem;
  height: 3.8rem;
  border: 2px solid var(--text-secondary);
  border-radius: 10rem;
  position: relative;
  transition: var(--transition-fast);
}

.scroll-down a:hover .mouse {
  border-color: var(--primary);
}

.scroll-down .wheel {
  width: 4px;
  height: 8px;
  background: var(--text-secondary);
  border-radius: 50%;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: mouseWheel 1.5s infinite;
}

.scroll-down a:hover .wheel {
  background: var(--primary);
}

@keyframes mouseWheel {
  0% { opacity: 1; top: 6px; }
  100% { opacity: 0; top: 18px; }
}

/* ==========================================
   STATS SECTION
   ========================================== */

.stats {
  padding: 4rem 9%;
  background: var(--bg-secondary);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  text-align: center;
}

.stat-card {
  padding: 2.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 16px var(--card-shadow);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--primary-rgb), 0.2);
  box-shadow: 0 12px 24px var(--card-shadow);
}

.stat-card h3 {
  font-size: 4rem;
  background: var(--primary-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.stat-card p {
  font-size: 1.4rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==========================================
   SECTION COMMON STYLES
   ========================================== */

section:not(.home):not(.stats) {
  padding: 10rem 9% 8rem;
}

.section-title {
  font-size: 4rem;
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: -0.1rem;
}

.section-subtitle {
  font-size: 1.6rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 60rem;
  margin: 0 auto 5rem;
}

/* ==========================================
   ABOUT SECTION (TABS)
   ========================================== */

.about {
  background: var(--bg-primary);
}

.about-container {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 8rem;
  align-items: center;
}

.about-img-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-shape {
  position: absolute;
  top: 5%;
  left: 5%;
  width: 90%;
  height: 90%;
  border: 4px solid var(--primary);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: morphShape 8s linear infinite;
  z-index: 0;
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.4), inset 0 0 25px rgba(168, 85, 247, 0.4);
}

@keyframes morphShape {
  0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
}

.about-avatar-frame {
  position: relative;
  z-index: 1;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid transparent;
  background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box, var(--primary-grad) border-box;
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.35), 0 0 70px rgba(0, 240, 255, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-avatar {
  width: 115%;
  height: 115%;
  object-fit: cover;
  animation: floatImage 7s ease-in-out infinite;
}

.about-content .subtitle {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.about-description {
  color: var(--text-secondary);
  font-size: 1.6rem;
  margin-bottom: 3.5rem;
}

/* About Section Tabs */
.about-tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 1.5rem;
  margin-bottom: 3rem;
}

.tab-btn {
  padding: 0.8rem 2.2rem;
  border-radius: var(--border-radius-md);
  font-size: 1.5rem;
  font-weight: 600;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  border-color: rgba(var(--primary-rgb), 0.15);
}

/* Timeline Components */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.5s ease forwards;
}

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

.timeline {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  border-left: 2px solid var(--card-border);
  padding-left: 2.5rem;
  margin-left: 1rem;
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -3.2rem;
  top: 0.6rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  transition: var(--transition-fast);
}

.timeline-item:hover .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

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

.timeline-header h4 {
  font-size: 1.8rem;
  color: var(--text-primary);
}

.timeline-date {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
  padding: 0.4rem 1.2rem;
  border-radius: 10rem;
  display: inline-block;
  background-clip: unset;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: var(--primary);
}

.timeline-company {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: var(--text-secondary);
}

.timeline-desc {
  font-size: 1.45rem;
  color: var(--text-secondary);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: var(--text-secondary);
}

/* Services Pane in About */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.service-item {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  transition: var(--transition);
}

.service-item:hover {
  transform: translateX(5px);
  border-color: rgba(var(--primary-rgb), 0.2);
}

.service-item i {
  font-size: 3rem;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  padding: 1.2rem;
  border-radius: var(--border-radius-md);
}

.service-item h4 {
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.service-item p {
  font-size: 1.4rem;
  color: var(--text-secondary);
}

/* ==========================================
   SKILLS SECTION (GLOW ON HOVER)
   ========================================== */

.skills {
  background: var(--bg-secondary);
}

.skills-container {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.skills-category h3 {
  font-size: 2.2rem;
  color: var(--text-primary);
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}

.skills-category h3::after {
  content: '';
  position: absolute;
  bottom: -0.6rem;
  left: 0;
  width: 4rem;
  height: 3px;
  background: var(--primary-grad);
  border-radius: 10px;
}

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

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 8px var(--card-shadow);
  cursor: default;
  transition: var(--transition);
}

.skill-card i {
  font-size: 4.8rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  transition: transform 0.4s ease, color 0.4s ease;
}

.skill-card span {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  /* Reset background clip for span within skill-card to allow normal colors */
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: var(--text-secondary);
}

/* Smart Glow Hover Mechanism */
.skill-card:hover {
  transform: translateY(-6px);
  border-color: var(--skill-color);
  box-shadow: 0 10px 25px -8px var(--skill-color);
}

.skill-card:hover i {
  transform: scale(1.15);
  color: var(--skill-color);
}

.skill-card:hover span {
  color: var(--text-primary);
}

/* ==========================================
   PROJECTS SECTION (FILTERABLE GRID)
   ========================================== */

.projects {
  background: var(--bg-primary);
}

.project-filters {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 1rem 2.4rem;
  border-radius: 10rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  cursor: pointer;
  box-shadow: 0 4px 10px var(--card-shadow);
  transition: var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--primary-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 15px -4px rgba(var(--primary-rgb), 0.4);
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.projects-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 20px var(--card-shadow);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.projects-box.hide {
  display: none;
}

.projects-box.show {
  animation: scaleUp 0.4s ease forwards;
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.projects-box:hover {
  transform: translateY(-8px);
  border-color: rgba(var(--primary-rgb), 0.2);
  box-shadow: 0 15px 30px -5px var(--card-shadow);
}

.project-img-container {
  position: relative;
  overflow: hidden;
  height: 20rem;
  background: #111;
}

.project-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.projects-box:hover .project-img-container img {
  transform: scale(1.08);
}

.project-category-tag {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: rgba(var(--primary-rgb), 0.85);
  backdrop-filter: blur(5px);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 0.4rem 1.2rem;
  border-radius: 10rem;
  letter-spacing: 0.05rem;
}

.projects-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.projects-content h4 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
}

.projects-content p {
  font-size: 1.4rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2.2rem;
}

.project-tech-tags span {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  padding: 0.3rem 1rem;
  border-radius: var(--border-radius-sm);
  background-clip: unset;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: var(--text-secondary);
}

[data-theme="light"] .project-tech-tags span {
  background: rgba(0, 0, 0, 0.02);
}

.project-links {
  display: flex;
  gap: 1.2rem;
  border-top: 1px solid var(--card-border);
  padding-top: 1.8rem;
}

.proj-link-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  font-size: 1.8rem;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.proj-link-icon:hover {
  background: var(--primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.4);
  transform: translateY(-2px);
}

/* ==========================================
   PROJECT PREVIEW BUTTON (on hover)
   ========================================== */

.project-img-container {
  cursor: pointer;
}

.project-preview-btn {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: 10rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(0.8rem);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 3;
}

.project-img-container:hover .project-preview-btn {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   LIGHTBOX / PROJECT IMAGE PREVIEW MODAL
   ========================================== */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(0.8rem);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-inner {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-overlay.active .lightbox-inner {
  transform: scale(1);
}

.lightbox-img-wrap {
  border-radius: 1.2rem;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#lightbox-img {
  max-width: 90vw;
  max-height: 75vh;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -5rem;
  right: -1rem;
  width: 4.4rem;
  height: 4.4rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(139, 92, 246, 0.5);
  transform: rotate(90deg);
}

.lightbox-caption {
  font-size: 1.5rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  max-width: 70rem;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.75);
}


/* ==========================================
   CONTACT SECTION
   ========================================== */

.contact {
  background: var(--bg-secondary);
  border-top: 1px solid var(--card-border);
}

.contact-container {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 8rem;
}

.contact-info .section-title {
  text-align: left;
  margin-bottom: 2rem;
}

.contact-desc {
  font-size: 1.6rem;
  color: var(--text-secondary);
  margin-bottom: 4rem;
}

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

.contact-card {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2.2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 16px var(--card-shadow);
  transition: var(--transition);
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--primary-rgb), 0.2);
}

.card-icon {
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 50%;
  background: var(--primary-grad);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 2.2rem;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

.card-details h4 {
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.card-details p, .card-details a {
  font-size: 1.45rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.card-details a:hover {
  color: var(--primary);
}

/* Contact Form Details */
.contact-form-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 4rem;
  box-shadow: 0 10px 30px var(--card-shadow);
}

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

.form-group {
  position: relative;
  margin-bottom: 3rem;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 1.5rem 1.8rem;
  font-size: 1.5rem;
  color: var(--text-primary);
  background: var(--input-bg);
  border: 1.5px solid var(--card-border);
  border-radius: var(--border-radius-md);
  transition: var(--transition-fast);
}

.form-group textarea {
  resize: none;
}

/* Floating Label Magic */
.form-group label {
  position: absolute;
  top: 1.6rem;
  left: 1.8rem;
  color: var(--text-secondary);
  font-size: 1.5rem;
  font-weight: 500;
  pointer-events: none;
  transition: var(--transition-fast);
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
  top: -1rem;
  left: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--bg-secondary);
  padding: 0 0.8rem;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.15);
}

/* Form Errors */
.form-group.invalid input,
.form-group.invalid textarea {
  border-color: #ef4444;
}

.form-group.invalid label {
  color: #ef4444;
}

.error-msg {
  position: absolute;
  bottom: -1.8rem;
  left: 0.5rem;
  font-size: 1.15rem;
  font-weight: 500;
  color: #ef4444;
  opacity: 0;
  transform: translateY(-5px);
  transition: var(--transition-fast);
}

.form-group.invalid .error-msg {
  opacity: 1;
  transform: translateY(0);
}

/* Submit state and spinner */
.form-submit {
  width: 100%;
  justify-content: center;
  padding: 1.5rem;
  font-size: 1.6rem;
}

.form-submit.loading span,
.form-submit.loading i {
  visibility: hidden;
  opacity: 0;
}

.form-submit.loading .spinner {
  display: block;
}

.spinner {
  display: none;
  width: 2.2rem;
  height: 2.2rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  position: absolute;
  animation: spin 1s ease-in-out infinite;
}

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

/* ==========================================
   FOOTER SECTION
   ========================================== */

.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--card-border);
  padding: 6rem 9% 4rem;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4rem;
}

.footer-logo h3 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.footer-logo p {
  color: var(--text-secondary);
  font-size: 1.45rem;
  max-width: 40rem;
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-links a {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copyright {
  border-top: 1px solid var(--card-border);
  width: 100%;
  padding-top: 3rem;
}

.footer-copyright p {
  font-size: 1.35rem;
  color: var(--text-secondary);
}

/* Scroll To Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 4rem;
  right: 4rem;
  width: 4.8rem;
  height: 4.8rem;
  background: var(--primary-grad);
  color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.4rem;
  cursor: pointer;
  z-index: 99;
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(1.5rem);
  transition: var(--transition);
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(var(--primary-rgb), 0.5);
}

/* ==========================================
   TOAST NOTIFICATION STYLING
   ========================================== */

.toast-container {
  position: fixed;
  bottom: 3rem;
  left: 3rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--card-bg);
  backdrop-filter: blur(1.5rem);
  border: 1px solid var(--card-border);
  padding: 1.5rem 2.2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 12px 30px var(--card-shadow);
  color: var(--text-primary);
  font-size: 1.45rem;
  font-weight: 500;
  min-width: 30rem;
  max-width: 40rem;
  transform: translateY(2rem);
  opacity: 0;
  animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.toast.removing {
  animation: slideOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideOut {
  to { transform: translateX(-100%); opacity: 0; }
}

.toast-success i {
  color: #10b981;
  font-size: 2.2rem;
}
.toast-success {
  border-left: 4px solid #10b981;
}

.toast-error i {
  color: #ef4444;
  font-size: 2.2rem;
}
.toast-error {
  border-left: 4px solid #ef4444;
}

/* ==========================================
   BREAKPOINTS (RESPONSIVE STYLES)
   ========================================== */

@media (max-width: 1200px) {
  html { font-size: 55%; }
  .home-container { gap: 4rem; }
  .home-content h1 { font-size: 5.4rem; }
}

@media (max-width: 991px) {
  .header { padding: 2rem 5%; }
  .header.sticky { padding: 1.5rem 5%; }
  section:not(.home):not(.stats) { padding: 8rem 5% 6rem; }
  .home { padding: 12rem 5% 5rem; }
  .home-container { grid-template-columns: 1fr; text-align: center; gap: 5rem; }
  .home-content { max-width: 100%; display: flex; flex-direction: column; align-items: center; }
  .home-content p { max-width: 60rem; }
  .home-buttons { justify-content: center; }
  .floating-badge { display: none; } /* Hide floating badges on tablet screen width for space */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .about-container { grid-template-columns: 1fr; gap: 5rem; text-align: center; justify-items: center; }
  .about-tabs { justify-content: center; }
  .timeline { text-align: left; }
  .services-list { text-align: left; }
  .projects-container { grid-template-columns: repeat(2, 1fr); }
  .contact-container { grid-template-columns: 1fr; gap: 5rem; }
  .contact-info .section-title { text-align: center; }
  .contact-desc { text-align: center; max-width: 60rem; margin-inline: auto; }
}

@media (max-width: 768px) {
  .menu-btn { display: flex; }
  
  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 2rem 5%;
    background: var(--card-bg);
    backdrop-filter: blur(2rem);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    flex-direction: column;
    gap: 2.2rem;
    box-shadow: 0 10px 25px -10px var(--card-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-1.5rem);
    transition: var(--transition);
  }
  
  .navbar.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .nav-link { font-size: 1.8rem; width: fit-content; }
  
  .home-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 32rem;
    margin: 0 auto;
    gap: 1.5rem;
  }
  .home-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .about-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    width: 100%;
    scrollbar-width: none;
  }
  .about-tabs::-webkit-scrollbar {
    display: none;
  }
  .about-tabs .tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .projects-container { grid-template-columns: 1fr; max-width: 45rem; margin: 0 auto; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .scroll-to-top { bottom: 2rem; right: 2rem; }
}

@media (max-width: 480px) {
  html { font-size: 50%; }
  .home-content h1 { font-size: 4.2rem; }
  .home-content h2 { font-size: 2.6rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .contact-form-wrapper { padding: 2.5rem 2rem; }
  .footer-links { flex-direction: column; gap: 1.5rem; }
}

/* ==========================================
   DEVELOPER TERMINAL TRIGGER & MODAL STYLES
   ========================================== */
.telemetry-btn-terminal {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.4rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 0.6rem;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.3);
}

.telemetry-btn-terminal:hover {
  background: #9333ea;
  transform: translateY(-1px);
}

.terminal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(0.8rem);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.terminal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.terminal-window {
  width: 100%;
  max-width: 72rem;
  background: #0f1424;
  border: 1px solid var(--card-border);
  border-radius: 1.2rem;
  overflow: hidden;
  box-shadow: 0 3rem 6rem rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.terminal-overlay.active .terminal-window {
  transform: scale(1);
}

.terminal-header {
  background: rgba(7, 10, 19, 0.9);
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--card-border);
  position: relative;
}

.terminal-dots {
  display: flex;
  gap: 0.8rem;
}

.terminal-dots .dot {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  display: inline-block;
}

.terminal-dots .dot.close { background: #ef4444; }
.terminal-dots .dot.minimize { background: #eab308; }
.terminal-dots .dot.maximize { background: #22c55e; }

.terminal-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.25rem;
  font-family: var(--font-heading);
  color: var(--text-secondary);
}

.terminal-window-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 2rem;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.terminal-window-close:hover {
  color: #ef4444;
}

.terminal-body {
  padding: 2rem;
  height: 40rem;
  overflow-y: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.35rem;
  color: #a7f3d0; /* Soft neon green tint */
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  scroll-behavior: smooth;
}

.terminal-line {
  line-height: 1.4;
  word-break: break-all;
  white-space: pre-wrap;
}

.terminal-line .highlight {
  color: var(--accent);
  font-weight: bold;
}

.terminal-line .cmd-title {
  color: #f472b6;
  font-weight: bold;
}

.terminal-line .cmd-text {
  color: #f8fafc;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.terminal-prompt {
  color: #38bdf8; /* sky blue prompt */
  font-weight: bold;
  flex-shrink: 0;
}

#terminal-input {
  background: none !important;
  border: none !important;
  outline: none !important;
  color: #f8fafc !important;
  font-family: inherit !important;
  font-size: inherit !important;
  flex-grow: 1;
  caret-color: var(--accent);
}

/* Custom Scrollbar for Terminal */
.terminal-body::-webkit-scrollbar {
  width: 0.6rem;
}
.terminal-body::-webkit-scrollbar-track {
  background: #0f1424;
}
.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
}

/* ==========================================
   TOAST NOTIFICATION SYSTEM
   ========================================== */
.toast-container {
  position: fixed;
  bottom: 3rem;
  right: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 10000;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 32rem;
  max-width: 45rem;
  background: rgba(15, 21, 36, 0.85);
  backdrop-filter: blur(1.2rem);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.2rem;
  padding: 1.6rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  box-shadow: 0 1.5rem 3.5rem rgba(0, 0, 0, 0.4);
  transform: translateX(120%);
  animation: slideInToast 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.removing {
  transform: translateX(120%);
  opacity: 0;
}

@keyframes slideInToast {
  to {
    transform: translateX(0);
  }
}

.toast i {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.toast-success {
  border-left: 4px solid var(--accent);
}
.toast-success i {
  color: var(--accent);
}

.toast-error {
  border-left: 4px solid #ef4444;
}
.toast-error i {
  color: #ef4444;
}

.toast span {
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
}

/* ==========================================
   REAL-TIME ENGAGEMENT / LIVE TELEMETRY BAR
   ========================================== */
.live-telemetry-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(7, 10, 19, 0.85);
  backdrop-filter: blur(1.2rem);
  border-top: 1px solid var(--card-border);
  z-index: 998;
  padding: 0.8rem 2rem;
  box-shadow: 0 -1rem 3rem rgba(0, 0, 0, 0.4);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.live-telemetry-bar.hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.telemetry-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  position: relative;
  flex-wrap: wrap;
}

.telemetry-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.telemetry-item span,
.telemetry-item strong {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: currentColor !important;
}

.telemetry-item i {
  font-size: 1.6rem;
  color: var(--accent);
}

.telemetry-divider {
  width: 1px;
  height: 1.5rem;
  background: var(--card-border);
}

/* Pulsing Status Dot */
.pulse-dot {
  width: 0.8rem;
  height: 0.8rem;
  background-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.7);
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 0.8rem rgba(0, 240, 255, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 240, 255, 0);
  }
}

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

#git-origin {
  color: var(--primary) !important;
}

.telemetry-close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
}

.telemetry-close:hover {
  color: #ef4444;
  transform: translateY(-50%) rotate(90deg);
}

/* Push footer up slightly to prevent overlap */
body {
  padding-bottom: 4rem;
}

@media (max-width: 768px) {
  .telemetry-divider {
    display: none;
  }
  .telemetry-container {
    gap: 1rem 1.5rem;
    padding-right: 4.5rem;
  }
  .hidden-mobile {
    display: none;
  }
  body {
    padding-bottom: 6rem;
  }
}

/* ==========================================
   PORTFOLIO CMS / EDIT MODE STYLES
   ========================================== */

/* Telemetry Admin Button */
.telemetry-btn-admin {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.4rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 0.6rem;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s ease;
}

.telemetry-btn-admin:hover,
.telemetry-btn-admin.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

/* CMS Items Wrappers */
.cms-item {
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

/* Edit Control Pins Overlay */
.cms-item-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.8rem;
  z-index: 10;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.cms-edit-active .cms-item:hover .cms-item-actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Force action buttons visible always on mobile/touch screens for accessibility */
@media (max-width: 768px) {
  .cms-edit-active .cms-item-actions {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

.cms-item-actions button {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(15, 21, 36, 0.9);
  backdrop-filter: blur(5px);
  color: var(--text-secondary);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cms-item-actions button.cms-edit-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
  transform: scale(1.1);
}

.cms-item-actions button.cms-delete-btn:hover {
  background: #ef4444;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  transform: scale(1.1);
}

/* Dashed Add Buttons */
.cms-add-new-container {
  margin-top: 2rem;
  width: 100%;
}

.cms-add-new-skill-card {
  width: 100%;
  height: 100%;
  min-height: 12rem;
  display: flex;
}

.cms-dashed-btn {
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  border: 1.5px dashed var(--card-border) !important;
  border-radius: var(--border-radius-lg);
  background: rgba(255, 255, 255, 0.02) !important;
  color: var(--text-secondary);
  font-size: 1.4rem;
  font-weight: 600;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cms-dashed-btn:hover {
  border-color: var(--primary) !important;
  background: rgba(168, 85, 247, 0.05) !important;
  color: var(--primary);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
}

.cms-add-new-skill-card .cms-dashed-btn {
  flex-direction: column;
  padding: 2.5rem;
  border-radius: var(--border-radius-lg);
}

/* Skill edit controls inside headers */
.cms-category-title-container:hover .category-header-actions button {
  color: var(--text-primary);
}

.cms-cat-edit-btn:hover {
  color: var(--primary) !important;
}

.cms-cat-delete-btn:hover {
  color: #ef4444 !important;
}

/* Adjust timeline layout for CMS items spacing */
.cms-edit-active .timeline-item {
  padding-bottom: 2rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  margin-bottom: 2rem;
}

.cms-edit-active .timeline-item:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

/* ==========================================
   INTERACTIVE SYSTEM ARCHITECTURE DIAGRAMS
   ========================================== */
.lightbox-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 1rem;
}

.lightbox-tab {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 0.8rem 1.8rem;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: var(--transition-fast);
}

.lightbox-tab.active, .lightbox-tab:hover {
  background: var(--primary-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.lightbox-tab-content {
  display: none;
}

.lightbox-tab-content.active {
  display: block;
}

.arch-diagram-wrapper {
  padding: 2rem;
  background: rgba(7, 10, 19, 0.9);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  color: var(--text-primary);
}

.arch-flow-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.arch-flow-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.arch-nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  position: relative;
}

.arch-node-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 1.8rem;
  position: relative;
  transition: var(--transition);
}

.arch-node-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(168, 85, 247, 0.2);
}

.arch-node-step {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.arch-node-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.arch-node-desc {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.arch-node-tech {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.3rem 0.8rem;
  background: rgba(168, 85, 247, 0.15);
  border-radius: 0.4rem;
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 600;
}

/* ==========================================
   "ASK DILUSHAN AI" CHATBOT WIDGET STYLES
   ========================================== */
#ai-chat-widget {
  position: fixed;
  bottom: 8.5rem;
  right: 2.5rem;
  z-index: 998;
}

#ai-chat-launcher {
  background: var(--primary-grad);
  border: none;
  border-radius: 3rem;
  padding: 1.2rem 2.2rem;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.4);
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  transition: var(--transition);
}

#ai-chat-launcher:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 35px rgba(0, 240, 255, 0.5);
}

.ai-launcher-inner {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #fff;
}

.ai-bot-icon {
  font-size: 2.2rem;
}

.ai-launcher-badge {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}

.ai-online-dot {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
}

.pulse-dot-green {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  margin-right: 4px;
  box-shadow: 0 0 6px #22c55e;
  animation: pulseGreenDot 2s ease-in-out infinite;
}

@keyframes pulseGreenDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #22c55e; }
  50% { opacity: 0.4; box-shadow: 0 0 12px #22c55e; }
}

.ai-chat-window {
  display: none;
  position: absolute;
  bottom: 6rem;
  right: 0;
  width: 36rem;
  max-width: 90vw;
  height: 48rem;
  max-height: 75vh;
  background: rgba(15, 21, 36, 0.95);
  backdrop-filter: blur(1.5rem);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.7);
  flex-direction: column;
  overflow: hidden;
  animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ai-chat-window.active {
  display: flex;
}

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

.ai-chat-header {
  padding: 1.6rem 2rem;
  background: rgba(7, 10, 19, 0.8);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-chat-title-wrap {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.ai-chat-avatar {
  width: 3.8rem;
  height: 3.8rem;
  border-radius: 50%;
  background: var(--primary-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
}

.ai-chat-name {
  font-size: 1.4rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ai-badge-pill {
  font-size: 1rem;
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 0.4rem;
}

.ai-chat-status {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

.ai-chat-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2.2rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.ai-chat-close-btn:hover {
  color: var(--text-primary);
}

.ai-chat-body {
  flex: 1;
  padding: 1.8rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ai-chat-msg {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 85%;
}

.ai-chat-msg.user {
  align-self: flex-end;
}

.ai-chat-msg.bot {
  align-self: flex-start;
}

.ai-msg-bubble {
  padding: 1.2rem 1.6rem;
  border-radius: 1.4rem;
  font-size: 1.3rem;
  line-height: 1.5;
}

.ai-chat-msg.user .ai-msg-bubble {
  background: var(--primary-grad);
  color: #fff;
  border-bottom-right-radius: 0.2rem;
}

.ai-chat-msg.bot .ai-msg-bubble {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  border-bottom-left-radius: 0.2rem;
}

.ai-prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.ai-chip {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--text-primary);
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  font-size: 1.15rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.ai-chip:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.ai-chat-input-bar {
  padding: 1.2rem 1.6rem;
  background: rgba(7, 10, 19, 0.9);
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 1rem;
}

#ai-chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.3rem;
  font-family: var(--font-body);
}

#ai-chat-send {
  background: var(--primary-grad);
  border: none;
  color: #fff;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: var(--transition-fast);
}

#ai-chat-send:hover {
  transform: scale(1.08);
}

/* ==========================================
   INTERACTIVE CYBER CANVAS BACKGROUND (#2)
   ========================================== */
#cyber-bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* ==========================================
   BRAND-COLOR NEON GLOW ON SKILL CARDS (#3)
   ========================================== */
.skill-card {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.skill-card:hover {
  border-color: var(--skill-color, var(--primary)) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--skill-color, var(--primary)) !important;
  transform: translateY(-5px) scale(1.03) !important;
}

.skill-card:hover i {
  color: var(--skill-color, var(--primary)) !important;
  transform: scale(1.15) rotate(4deg);
}

/* ==========================================
   ROTATING GRADIENT BORDER SHEEN ON PROJECTS (#4)
   ========================================== */
.projects-box {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.projects-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0 300deg, var(--primary) 330deg, var(--accent) 360deg);
  animation: borderRotate 6s linear infinite;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.projects-box:hover::before {
  opacity: 0.7;
}

.projects-box::after {
  content: '';
  position: absolute;
  inset: 1.5px;
  background: var(--card-bg);
  border-radius: calc(var(--border-radius-lg) - 1px);
  z-index: 0;
  pointer-events: none;
}

.projects-box > * {
  position: relative;
  z-index: 1;
}

@keyframes borderRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
