@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@300;400;600;800;900&display=swap');

:root {
  --bg-main: #050505;
  --bg-secondary: #0a0a0a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.08);

  --text-main: #ffffff;
  --text-muted: #a1a1aa;

  --primary: #8b5cf6;
  --primary-glow: rgba(139, 92, 246, 0.6);
  --secondary: #06b6d4;
  --secondary-glow: rgba(6, 182, 212, 0.6);

  --border-color: rgba(255, 255, 255, 0.08);
  --glass-border: 1px solid var(--border-color);

  --font-sans: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;

  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* Light Theme Variables */
@media (prefers-color-scheme: light) {
  :root {
    --bg-main: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-card: rgba(0, 0, 0, 0.05);
    --bg-card-hover: rgba(0, 0, 0, 0.08);

    --text-main: #1a1a1a;
    --text-muted: #333333;

    --border-color: rgba(0, 0, 0, 0.08);
    --glass-border: 1px solid var(--border-color);
  }

  /* Light mode scrollbar */
  ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
  }

  ::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
  }

  /* Light mode navbar */
  .navbar.scrolled {
    background: rgba(255, 255, 255, 0.7);
  }

  /* Light mode form inputs */
  .form-group input,
  .form-group textarea {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
  }

  .form-group input::placeholder,
  .form-group textarea::placeholder {
    color: #555555;
  }

  /* Light mode filter buttons */
  .filter-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #333333;
  }

  .filter-btn:hover,
  .filter-btn.active {
    background: rgba(139, 92, 246, 0.2);
    color: #1a1a1a;
  }

  /* Light mode project tags */
  .project-tags span {
    background: rgba(139, 92, 246, 0.1);
    color: #5c2aa6;
    border-color: rgba(139, 92, 246, 0.3);
  }

  /* Light mode hero text */
  @media (prefers-color-scheme: light) {
    .hero h1 {
      color: #000000;
    }
  }

  .hero p {
    color: #333333;
  }

  /* Light mode section headers */
  .section-header h2 {
    color: #1a1a1a;
  }

  .page-header h1 {
    color: #1a1a1a;
  }

  .page-header p {
    color: #333333;
  }

  /* Light mode about section */
  .about-text p {
    color: #333333;
  }

  .detail-item p {
    color: #1a1a1a;
  }

  /* Light mode skill category */
  .skill-category h3 {
    background: linear-gradient(135deg, #1a1a1a, #333333);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .skill-item h4 {
    color: #1a1a1a;
  }

  /* Light mode project cards */
  .project-content h3,
  .project-info h3 {
    color: #1a1a1a;
  }

  .project-content p,
  .project-info p {
    color: #333333;
  }

  .project-link {
    color: #1a1a1a;
    background: rgba(0, 0, 0, 0.05);
  }

  .project-link:hover {
    color: #ffffff;
  }

  /* Light mode footer */
  .footer-logo h3,
  .footer-links h3,
  .footer-contact h3 {
    color: #1a1a1a;
  }

  .footer-content p,
  .footer-content a {
    color: #333333;
  }

  /* Light mode preloader */
  .preloader-title {
    color: #1a1a1a;
  }

  .preloader-bar-wrapper {
    background: rgba(0, 0, 0, 0.1);
  }

  /* Light mode 3D background animations */
  .background-animation {
    opacity: 0.15;
  }
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--bg-main);
  overflow-x: hidden;
}

body {
  background-color: var(--bg-main);
  background-image: radial-gradient(circle at top right, rgba(139, 92, 246, 0.15), transparent 40%), radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.1), transparent 40%);
  min-height: 100vh;
  overflow-x: hidden;
  isolation: isolate;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Cursor & Preloader */
.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--secondary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 0 15px var(--secondary-glow);
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transition: width 0.2s, height 0.2s, border-color 0.2s;
}

@media (prefers-color-scheme: light) {
  .cursor-outline {
    border-color: rgba(0, 0, 0, 0.3);
  }
}

.preloader {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modern Preloader Styles - Enhanced */
.preloader-content {
  text-align: center;
  position: relative;
  z-index: 10;
}

.preloader-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(20px);
  letter-spacing: -0.02em;
}

.preloader-bar-wrapper {
  width: 300px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto 2.5rem;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

.preloader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 10px;
  box-shadow: 0 0 20px var(--primary-glow), inset 0 1px 3px rgba(255, 255, 255, 0.3);
  animation: barShimmer 1.5s infinite;
}

@keyframes barShimmer {

  0%,
  100% {
    box-shadow: 0 0 20px var(--primary-glow), inset 0 1px 3px rgba(255, 255, 255, 0.3);
  }

  50% {
    box-shadow: 0 0 30px var(--secondary-glow), inset 0 1px 3px rgba(255, 255, 255, 0.5);
  }
}

.preloader-percentage {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  letter-spacing: -0.02em;
}

/* Preloader floating particles background */
.preloader::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><defs><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter></defs><rect width="100%" height="100%" filter="url(%23noiseFilter)"/></svg>');
  opacity: 0.05;
  z-index: 0;
  pointer-events: none;
}

@keyframes loaderGlow {
  0% {
    text-shadow: 0 0 10px var(--primary-glow);
    color: var(--primary);
    transform: translateY(0);
  }

  100% {
    text-shadow: 0 0 20px var(--secondary-glow);
    color: var(--secondary);
    transform: translateY(-10px);
  }
}

.loader .letter {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: var(--text-main);
  display: inline-block;
  animation: loaderGlow 1.5s infinite alternate;
}

/* Scroll Progress */
.scroll-progress-container {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  height: 300px;
  width: 4px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 100;
  border-radius: 4px;
  overflow: hidden;
  display: none;
}

@media (min-width: 1024px) {
  .scroll-progress-container {
    display: block;
  }
}

.scroll-progress-fill {
  width: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  padding: 1rem 0;
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: var(--glass-border);
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-size: 1.75rem;
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--text-main);
  position: relative;
}

.logo span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition);
}

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

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

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  box-shadow: 0 0 10px var(--primary-glow);
}

.menu-toggle {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-main);
  margin: 5px 0;
  transition: var(--transition);
}

@media (max-width: 900px) {
  .menu-toggle {
    display: block;
    z-index: 1001;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(30px);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    transition: var(--transition);
    display: flex !important;
    margin: 0;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-link {
    font-size: 1.5rem;
  }

  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Typography Highlights */
.highlight {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-weight: 600;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  position: relative;
  z-index: 1;
  border: none;
  font-size: 0.9rem;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  color: #fff;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.primary-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  opacity: 0;
  transition: opacity 0.4s;
  z-index: -1;
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.6);
}

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

.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 5%;
  position: relative;
  padding-top: 80px;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/200.svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)"/></svg>');
  opacity: 0.03;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  flex: 1;
  max-width: 700px;
  z-index: 10;
  padding-top: 2rem;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  margin-bottom: 1.5rem;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.8;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.social-icons {
  display: flex;
  gap: 1.5rem;
}

.social-icons a {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.03);
  border: var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--text-muted);
  backdrop-filter: blur(10px);
}

.social-icons a:hover {
  color: #fff;
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2);
}

.hero-3d {
  flex: 1;
  position: absolute;
  right: 0;
  top: 0;
  width: 50%;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  opacity: 0.8;
}

@media (max-width: 900px) {
  .hero-3d {
    opacity: 0.3;
    width: 100%;
  }

  .hero-content {
    margin-top: 10vh;
  }
}

#spline-container {
  width: 100%;
  height: 100%;
}

/* 3D Background Animations */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.1;
}

.background-animation canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Floating 3D shapes */
.floating-3d-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.shape-3d {
  position: absolute;
  border-radius: 10%;
  opacity: 0.08;
}

.shape-3d.sphere {
  background: radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.3), transparent);
  filter: blur(1px);
}

.shape-3d.cube {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.shape-3d.pyramid {
  background: linear-gradient(to bottom, rgba(139, 92, 246, 0.15), transparent);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

/* Sections Common */
.section-padding {
  padding: 8rem 5%;
  position: relative;
}

.page-header {
  padding: 12rem 5% 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.2rem;
  color: var(--text-muted);
}

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

.section-header h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  display: inline-block;
  position: relative;
}

.section-line {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  margin: 1.5rem auto 0;
  border-radius: 4px;
  box-shadow: 0 0 15px var(--primary-glow);
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .about-content {
    grid-template-columns: 1fr;
  }
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.about-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.detail-item:hover {
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.detail-item i {
  font-size: 1.5rem;
  color: var(--secondary);
  margin-top: 0.2rem;
}

.detail-item h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.detail-item p {
  font-size: 1.05rem;
  color: var(--text-main);
  font-weight: 500;
  font-family: var(--font-display);
  margin: 0;
}

.about-image {
  position: relative;
}

.image-container {
  position: relative;
  z-index: 2;
  padding: 1rem;
}

.image-shape {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.image-shape::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  pointer-events: none;
}

.image-shape img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.7s;
}

.about-image:hover .image-shape img {
  transform: scale(1.05);
}

/* Skills Section */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.skill-category {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.skill-category:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.skill-category h3 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
  background: linear-gradient(135deg, #fff, var(--text-muted));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-item {
  position: relative;
}

.skill-item h4 {
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 500;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.skill-icon {
  font-size: 1.2rem;
  color: var(--primary);
  width: 30px;
}

.skill-progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Projects Grid / Featured Projects */
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  max-width: 1300px;
  margin: 0 auto;
}

.project-item {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.1);
}

.project-image {
  height: 240px;
  overflow: hidden;
  position: relative;
}

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

.project-card:hover .project-image img {
  transform: scale(1.08);
  filter: brightness(1);
}

.project-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-main) 0%, transparent 100%);
  pointer-events: none;
}

.project-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  z-index: 2;
  margin-top: 0;
}

.project-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  z-index: 2;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tags span {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.8rem;
  background: rgba(139, 92, 246, 0.15);
  color: #d8b4fe;
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  word-break: break-word;
}

.project-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.project-content p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
  flex-grow: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.project-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.project-info p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
  flex-grow: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  transition: var(--transition);
}

.project-link:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
}

.project-item {
  display: block;
  height: 100%;
}

.projects-button {
  text-align: center;
  margin-top: 4rem;
}

/* Filter Buttons (Projects Page) */
.projects-filter {
  margin-bottom: 4rem;
  text-align: center;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: var(--glass-border);
  color: var(--text-muted);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-weight: 500;
  transition: var(--transition);
  font-family: var(--font-sans);
}

.filter-btn:hover,
.filter-btn.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

/* Certificates */
.certificates-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.certificate-link {
  display: block;
}

.certificate-card {
  background: var(--bg-card);
  border: var(--glass-border);
  padding: 2rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition);
  height: 100%;
  backdrop-filter: blur(10px);
}

.certificate-card:hover {
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.certificate-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--secondary);
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.certificate-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.certificate-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Contact Forms */
.contact-section {
  padding-bottom: 6rem;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

@media (max-width: 900px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
}

.contact-info,
.contact-form-container {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  backdrop-filter: blur(10px);
}

.contact-info h2,
.contact-form-container h2 {
  font-size: 2.2rem;
  margin-bottom: 2rem;
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 3rem;
  line-height: 1.8;
}

.info-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}

.info-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.info-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.info-content p,
.info-content a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 3rem;
}

.social-link {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border: var(--glass-border);
}

.social-link:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 0 15px var(--primary-glow);
  border-color: var(--primary);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  color: #fff;
  font-family: var(--font-sans);
  transition: var(--transition);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
  outline: none;
}

@media (prefers-color-scheme: light) {

  .form-group input,
  .form-group textarea {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
  }

  .form-group input::placeholder,
  .form-group textarea::placeholder {
    color: #888888;
  }
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
  background: rgba(0, 0, 0, 0.5);
}

.submit-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  width: 100%;
  padding: 1.2rem;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
}

.submit-btn:hover {
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Map Section */
.map-section {
  padding: 4rem 5%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.map-section h2 {
  margin-bottom: 2rem;
  font-size: 2.5rem;
}

.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: var(--glass-border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.pulse-marker {
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(139, 92, 246, 0.4);
  animation: mapPulse 2s infinite;
}

@keyframes mapPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7);
  }

  70% {
    box-shadow: 0 0 0 20px rgba(139, 92, 246, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
  }
}

/* Footer */
.footer {
  background: #030303;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 5rem 5% 2rem;
  position: relative;
  z-index: 10;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  max-width: 1300px;
  margin: 0 auto;
  margin-bottom: 4rem;
}

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

.footer-logo span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-logo p {
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links h3,
.footer-contact h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: #fff;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links a {
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.footer-contact p {
  color: var(--text-muted);
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.footer-contact i {
  color: var(--secondary);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border: var(--glass-border);
}

.footer-social a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Back To Top */
.back-to-top {
  visibility: hidden;
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(10px);
  border: var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  z-index: 99;
  opacity: 0;
  pointer-events: auto;
  transition: transform 0.4s, background 0.4s;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top:hover {
  background: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px var(--primary-glow);
}

/* Flash Messages */
.flash-message {
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
  margin: 1rem auto;
  background: rgba(255, 255, 255, 0.05);
  border: var(--glass-border);
  backdrop-filter: blur(10px);
}

.flash-message.success {
  border-left: 4px solid #10b981;
}

.flash-message.error {
  border-left: 4px solid #ef4444;
}

.close-flash {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  bottom: 90px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  font-size: 1.2rem;
  z-index: 100;
  cursor: pointer;
  transition: transform 0.4s, background 0.4s;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.theme-toggle:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-5px);
  box-shadow: 0 10px 25px var(--primary-glow);
}

/* Modal styling overrides to match dark theme */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--bg-main);
  margin: 10% auto;
  padding: 30px;
  border: var(--glass-border);
  width: 80%;
  max-width: 800px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
  color: var(--text-main);
}

.close-modal {
  color: var(--text-muted);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.close-modal:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.project-details-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.project-details-btn:hover {
  background: var(--secondary);
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
  backdrop-filter: blur(3px);
  text-align: center;
  padding: 20px;
}

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

.project-overlay h3 {
  color: #fff;
  margin-bottom: 15px;
  font-size: 1.4rem;
  transform: translateY(20px);
  transition: transform 0.4s;
}

.project-card:hover .project-overlay h3 {
  transform: translateY(0);
}

.project-overlay .project-links {
  transform: translateY(20px);
  transition: transform 0.4s 0.1s;
}

.project-card:hover .project-overlay .project-links {
  transform: translateY(0);
}

.project-overlay .project-links a {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: var(--glass-border);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 1.2rem;
  transition: var(--transition);
}

.project-overlay .project-links a:hover {
  background: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
  transform: scale(1.1);
}

/* Modal Inner Aesthetics */
.modal-project {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .modal-project {
    grid-template-columns: 1fr;
  }
}

.modal-project-image img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  object-fit: cover;
}

.modal-project-details h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-project-description {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 1.05rem;
  margin-bottom: 2rem;
  font-weight: 300;
}

.modal-project-tech h3,
.modal-project-features h3 {
  font-size: 1.1rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}

.modal-project-tech ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
}

.modal-project-tech li {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #d8b4fe;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.modal-project-features ul {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  list-style: none;
  padding: 0;
}

.modal-project-features li {
  display: flex;
  align-items: flex-start;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.modal-project-features li::before {
  content: '\f058';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  color: var(--secondary);
  margin-right: 0.8rem;
  margin-top: 0.1rem;
}

/* --------- LIGHT MODE OVERRIDES --------- */
body.light-mode {
  --bg-main: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --text-main: #0f172a;
  --text-muted: #475569;
  --primary: #6d28d9;
  --secondary: #0ea5e9;
  --border-color: rgba(0, 0, 0, 0.08);
  --glass-border: 1px solid var(--border-color);
}

body.light-mode .hero::after {
  filter: invert(1);
  opacity: 0.1;
}

body.light-mode .project-overlay {
  background: rgba(255, 255, 255, 0.9);
}

body.light-mode .project-overlay h3 {
  color: var(--text-main);
}

body.light-mode .project-overlay .project-links a {
  color: var(--text-main);
  border-color: rgba(0, 0, 0, 0.2);
}

body.light-mode .project-overlay .project-links a:hover {
  color: #fff;
  border-color: transparent;
}

body.light-mode .footer {
  background: #f1f5f9;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-mode .footer-links h3,
body.light-mode .footer-contact h3,
body.light-mode .footer-logo h3 {
  color: var(--text-main);
}

body.light-mode .modal-content {
  background-color: var(--bg-main);
  color: var(--text-main);
}

body.light-mode .contact-info h2,
body.light-mode .contact-form-container h2 {
  color: var(--text-main);
}

body.light-mode .form-group label {
  color: var(--text-main);
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text-main);
}

body.light-mode .form-group input:focus,
body.light-mode .form-group textarea:focus {
  background: white;
  border-color: var(--primary);
}

body.light-mode .page-header h1,
body.light-mode .section-header h2 {
  color: var(--text-main);
}

body.light-mode .project-card h3 {
  color: var(--text-main);
}

body.light-mode .close-modal {
  color: var(--text-main);
}

/* Certificate View Button */
.cert-view-btn {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(139, 92, 246, 0.1);
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  transition: var(--transition);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.certificate-card:hover .cert-view-btn {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 5px 15px var(--primary-glow);
  border-color: transparent;
}

/* Enhanced Preloader */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-main);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.5s ease;
}

.preloader-content {
  text-align: center;
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preloader-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.preloader-title .highlight {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.preloader-bar-wrapper {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
  position: relative;
}

body.light-mode .preloader-bar-wrapper {
  background: rgba(0, 0, 0, 0.1);
}

.preloader-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  box-shadow: 0 0 10px var(--primary-glow);
  transition: width 0.1s linear;
}

.preloader-percentage {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Hero heading color in light mode */
body.light-mode .hero h1 {
  color: #000000;
}

/* Certificate titles black in light mode */
body.light-mode .certificate-content h3 {
  color: #000000;
}

/* Download CV button fix for light mode */
body.light-mode .cv-btn {
  border: 1px solid #000000 !important;
  color: #000000;
}

/* Contact info titles (Email, Phone, etc.) */
body.light-mode .info-content h3 {
  color: #000000;
}

/* Contact social icons */
body.light-mode .social-link {
  color: #000000;
  border-color: rgba(0, 0, 0, 0.2);
}

body.light-mode .social-link i {
  color: #000000;
}

/* Map section heading in light mode */
body.light-mode .map-section h2 {
  color: #000000;
}


/* Constellation background */
#constellation-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -10;
  pointer-events: none;
}

#constellation-bg canvas {
  display: block;
}

#constellation-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  pointer-events: none;
}


/* PRELOADER CONTAINER */

.preloader{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100vh;
    background:#050505;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-direction:column;
    z-index:9999;
    overflow:hidden;
}

/* glowing background */

.preloader::before{
    content:"";
    position:absolute;
    width:600px;
    height:600px;
    background:radial-gradient(circle,#6366f1,transparent 70%);
    filter:blur(140px);
    opacity:0.3;
    animation:pulseGlow 6s infinite alternate;
}

/* TITLE */

.preloader-title{
    font-size:42px;              /* smaller than before */
    font-weight:700;
    letter-spacing:4px;
    margin-bottom:35px;

    display:flex;                /* keeps letters in straight line */
    justify-content:center;
    align-items:center;
    gap:4px;                     /* spacing between letters */
}

/* letters */
.preloader-title span{
    display:inline-block;
    line-height:1;               /* keeps them aligned */
    background:linear-gradient(90deg,#6366f1,#8b5cf6,#a855f7);
    -webkit-background-clip:text;
    color:transparent;

    animation:letterBounce 1.4s infinite ease-in-out;
}

/* stagger animation */

.preloader-title span:nth-child(1){animation-delay:0s}
.preloader-title span:nth-child(2){animation-delay:0.1s}
.preloader-title span:nth-child(3){animation-delay:0.2s}
.preloader-title span:nth-child(4){animation-delay:0.3s}
.preloader-title span:nth-child(5){animation-delay:0.4s}
.preloader-title span:nth-child(6){animation-delay:0.5s}

/* bounce animation */

@keyframes letterBounce{
    0%,100%{
        transform:translateY(0) scale(1);
    }
    50%{
        transform:translateY(-20px) scale(1.1);
    }
}

/* progress bar wrapper */

.preloader-bar-wrapper{
    width:260px;
    height:6px;
    background:#1e1e1e;
    border-radius:10px;
    overflow:hidden;
}

/* progress bar */

.preloader-bar{
    height:100%;
    width:0%;
    background:linear-gradient(90deg,#6366f1,#8b5cf6);
    border-radius:10px;
    transition:width 0.2s ease;
}

/* percentage */

.preloader-percentage{
    margin-top:20px;
    font-size:18px;
    color:#aaa;
}

/* glow animation */

@keyframes pulseGlow{
    from{
        transform:scale(1);
        opacity:0.2;
    }
    to{
        transform:scale(1.4);
        opacity:0.4;
    }
}

/* fade out */

.preloader.hide{
    opacity:0;
    visibility:hidden;
    transition:opacity 0.6s ease;
}


/* ── Outer wrapper ── */
.cert-slider-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* ── Fade-edge mask on both sides ── */
.cert-slider-viewport {
    overflow: hidden;
    width: 100%;
    padding: 28px 0;
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
    cursor: default;
}

/* ── Scrolling track — NO CSS transition, JS drives it via rAF ── */
.certificates-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    /* Negative gap = overlap effect */
    gap: 0px !important;
    width: max-content;
    will-change: transform;
    align-items: stretch;
    padding: 8px 0;
}

/* ── Each certificate card link ── */
.certificate-link {
    flex: 0 0 255px;
    width: 255px;
    text-decoration: none;
    display: block;
    position: relative;
    /* Overlap: each card slides under the next */
    margin-right: -32px;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                z-index   0s,
                box-shadow 0.35s ease;
    z-index: 1;
    border-radius: 18px;
}

/* Hover — lift card above its neighbours */
.cert-slider-viewport:hover .certificate-link:hover {
    transform: translateY(-14px) scale(1.06);
    z-index: 50 !important;
    margin-right: 8px; /* push neighbours slightly apart */
}

/* ── DARK MODE card ── */
.certificate-card {
    height: 100%;
    min-height: 210px;
    background: linear-gradient(145deg, #1c1c3a 0%, #16213e 55%, #0f3460 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 26px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    /* Stacked-card shadow: right+bottom create depth */
    box-shadow:
        4px 6px 18px rgba(0, 0, 0, 0.55),
        0  2px  6px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.35s ease, background 0.3s;
}

/* Top accent stripe */
.certificate-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #7b5cf5 50%, transparent 100%);
    opacity: 0.85;
    border-radius: 18px 18px 0 0;
}

/* Subtle inner gloss */
.certificate-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 100%);
    border-radius: 18px 18px 0 0;
    pointer-events: none;
}

.certificate-link:hover .certificate-card {
    box-shadow:
        8px 20px 48px rgba(0, 0, 0, 0.7),
        0   4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

/* ── LIGHT MODE card ── */
body.light-mode .certificate-card,
[data-theme="light"] .certificate-card,
.light-theme .certificate-card {
    background: linear-gradient(145deg, #ffffff 0%, #f0f4ff 55%, #e8eeff 100%);
    border: 1px solid rgba(100, 100, 200, 0.15);
    box-shadow:
        4px 6px 18px rgba(100, 100, 200, 0.18),
        0  2px  6px rgba(100, 100, 200, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.light-mode .certificate-card::before,
[data-theme="light"] .certificate-card::before,
.light-theme .certificate-card::before {
    background: linear-gradient(90deg, transparent 0%, #7b5cf5 50%, transparent 100%);
}

body.light-mode .certificate-card::after,
[data-theme="light"] .certificate-card::after,
.light-theme .certificate-card::after {
    background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, transparent 100%);
}

body.light-mode .certificate-link:hover .certificate-card,
[data-theme="light"] .certificate-link:hover .certificate-card,
.light-theme .certificate-link:hover .certificate-card {
    box-shadow:
        8px 20px 48px rgba(100, 100, 200, 0.28),
        0   4px 12px rgba(100, 100, 200, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* Light mode text colours */
body.light-mode .certificate-card h3,
[data-theme="light"] .certificate-card h3,
.light-theme .certificate-card h3 {
    color: #1a1a3e;
}

body.light-mode .certificate-card p,
[data-theme="light"] .certificate-card p,
.light-theme .certificate-card p {
    color: #444466;
}

body.light-mode .certificate-card h4,
[data-theme="light"] .certificate-card h4,
.light-theme .certificate-card h4 {
    color: #666688 !important;
}

body.light-mode .certificate-icon,
[data-theme="light"] .certificate-icon,
.light-theme .certificate-icon {
    color: #7b5cf5;
    background: rgba(123, 92, 245, 0.10);
    border-radius: 50%;
    padding: 6px;
}

body.light-mode .cert-view-btn,
[data-theme="light"] .cert-view-btn,
.light-theme .cert-view-btn {
    color: #7b5cf5;
    border-color: rgba(123, 92, 245, 0.35);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .certificate-link {
        flex: 0 0 210px;
        width: 210px;
        margin-right: -22px;
    }
}

@media (max-width: 480px) {
    .certificate-link {
        flex: 0 0 180px;
        width: 180px;
        margin-right: -18px;
    }
    .certificate-card {
        padding: 20px 14px 16px;
        min-height: 180px;
    }
}


/* ── Tighter overlap update — replace the existing margin-right values ── */

.certificate-link {
    flex: 0 0 255px;
    width: 255px;
    margin-right: -85px;  /* decrease it more like -120 to overlap more */
}

.cert-slider-viewport:hover .certificate-link:hover {
    transform: translateY(-14px) scale(1.06);
    z-index: 50 !important;
    margin-right: -32px;  /* pulls apart slightly on hover only */
}

@media (max-width: 768px) {
    .certificate-link {
        flex: 0 0 210px;
        width: 210px;
        margin-right: -55px;
    }
}

@media (max-width: 480px) {
    .certificate-link {
        flex: 0 0 180px;
        width: 180px;
        margin-right: -44px;
    }
}



/* =============================================
   ADD-ON CSS — Certificates & Experiences
   Paste this at the END of your style.css
   ============================================= */

/* --- Subsection container --- */
.cert-subsection {
    margin-bottom: 60px;
}

/* --- Subsection header (title + decorative line) --- */
.cert-subsection-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 36px;
}

.cert-subsection-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-color, #e0e0e0);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cert-subsection-header h3 i {
    color: var(--primary-color, #6c63ff);
    font-size: 1.2rem;
}

.cert-subsection-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(
        to right,
        var(--primary-color, #6c63ff),
        transparent
    );
    border-radius: 2px;
}

/* --- Job Experiences: normal card grid (no slider) --- */
.job-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    justify-content: center;
}

.job-cards-container .certificate-link {
    flex: 1 1 280px;
    max-width: 340px;
    text-decoration: none;
}

/* Give job cards a subtle left accent border to distinguish them */
.certificate-card.job-card {
    border-left: 3px solid var(--primary-color, #6c63ff);
}

/* Responsive: stack on small screens */
@media (max-width: 768px) {
    .job-cards-container {
        flex-direction: column;
        align-items: center;
    }

    .job-cards-container .certificate-link {
        max-width: 100%;
        width: 100%;
    }

    .cert-subsection-header h3 {
        font-size: 1.15rem;
    }
}

body.light-mode .cert-subsection-header h3 {
    color: #000000 !important;
}




















/* ================================================================
   SKILLS SECTION — ADD-ON CSS
   Paste this at the END of your style.css
   ================================================================ */

/* ── Section wrapper ── */
#skills {
    position: relative;
    overflow: hidden;
}

/* ── Ambient floating orbs (3D depth feel) ── */
.skills-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: skills-orb-drift 12s ease-in-out infinite alternate;
}
.skills-orb--1 {
    width: 420px; height: 420px;
    top: -100px; left: -120px;
    background: radial-gradient(circle, rgba(139,92,246,0.18) 0%, transparent 70%);
    animation-duration: 14s;
}
.skills-orb--2 {
    width: 360px; height: 360px;
    bottom: -80px; right: -80px;
    background: radial-gradient(circle, rgba(6,182,212,0.14) 0%, transparent 70%);
    animation-duration: 10s;
    animation-delay: -5s;
}
@keyframes skills-orb-drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(40px, 30px) scale(1.08); }
}

/* ── Tab navigation ── */
.skills-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 44px;
    position: relative;
    z-index: 2;
}

.skills-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}
.skills-tab i {
    font-size: 0.82rem;
    transition: transform 0.3s ease;
}
.skills-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: -1;
}
.skills-tab:hover {
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}
.skills-tab:hover::before,
.skills-tab.active::before { opacity: 1; }
.skills-tab.active {
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 28px rgba(139,92,246,0.4);
}
.skills-tab.active i { transform: scale(1.2); }

/* ── Panel container ── */
.skills-panels {
    position: relative;
    z-index: 2;
    min-height: 280px;
}

.skills-panel {
    display: none;
    animation: panel-appear 0.45s cubic-bezier(0.16,1,0.3,1) both;
}
.skills-panel.active { display: block; }

@keyframes panel-appear {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ── Sub-label inside tools panel ── */
.skills-panel-label {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.skills-panel-label i { font-size: 0.82rem; color: var(--secondary); }

/* ── Skills grid ── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
}
.skills-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

/* ── Individual skill card (3D tilt + neon glow) ── */
.skill-hex-card {
    position: relative;
    border-radius: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: default;
    transition: transform 0.35s cubic-bezier(0.16,1,0.3,1),
                box-shadow 0.35s ease,
                border-color 0.3s ease;
    animation: card-float-in 0.55s cubic-bezier(0.16,1,0.3,1) both;
    animation-delay: var(--delay, 0s);
    transform-style: preserve-3d;
    will-change: transform;
}
@keyframes card-float-in {
    from { opacity: 0; transform: translateY(30px) scale(0.92); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.skill-hex-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: rgba(139,92,246,0.5);
    box-shadow:
        0 16px 40px rgba(0,0,0,0.4),
        0 0 0 1px rgba(139,92,246,0.3),
        inset 0 1px 0 rgba(255,255,255,0.06);
}
.skill-hex-card:hover .shc-glow { opacity: 1; }
.skill-hex-card:hover .shc-icon i { transform: scale(1.2) rotateY(20deg); color: var(--primary); }
.skill-hex-card:hover .shc-fill { box-shadow: 0 0 8px var(--primary); }

/* Inner content */
.shc-inner {
    padding: 22px 18px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

/* Icon */
.shc-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: rgba(139,92,246,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(139,92,246,0.2);
    transition: background 0.3s ease;
}
.shc-icon i {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: transform 0.4s ease, color 0.3s ease;
}
.skill-hex-card:hover .shc-icon {
    background: rgba(139,92,246,0.18);
}

/* Name */
.shc-name {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    letter-spacing: 0.02em;
}

/* Progress bar */
.shc-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 99px;
    overflow: hidden;
}
.shc-fill {
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 1.1s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease;
}
/* Animate fill-in when panel becomes active */
.skills-panel.active .shc-fill {
    width: var(--w, 0%);
    transition-delay: var(--delay, 0s);
}

/* ── Card glow layer ── */
.shc-glow {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: radial-gradient(circle at 50% 0%, rgba(139,92,246,0.15), transparent 65%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* Cards with no bar (tools) — reduce padding bottom */
.skills-grid--compact .shc-inner { padding-bottom: 20px; }

/* ── Ambient floating tag labels ── */
.skills-float-tags {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.sft {
    position: absolute;
    left: var(--x);
    top: var(--y);
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(139,92,246,0.18);
    white-space: nowrap;
    animation: sft-float var(--dur, 8s) ease-in-out var(--delay, 0s) infinite alternate;
    user-select: none;
}
@keyframes sft-float {
    0%   { transform: translateY(0px) rotate(-2deg); opacity: 0.6; }
    50%  { opacity: 1; }
    100% { transform: translateY(-22px) rotate(2deg); opacity: 0.4; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    }
    .skills-grid--compact {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
@media (max-width: 600px) {
    .skills-tabs { gap: 8px; }
    .skills-tab  { padding: 8px 16px; font-size: 0.78rem; }
    .skills-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .skills-grid--compact { grid-template-columns: repeat(2, 1fr); }
    .shc-inner { padding: 18px 14px 14px; }
    .shc-icon  { width: 44px; height: 44px; }
    .shc-icon i { font-size: 1.25rem; }
}