@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Nunito:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  outline: none;
  border: none;
  /* Removed global text-transform and transitions for performance */
}

/* Transitions only for interactive elements */
a, button, .btn, .interactive-card, .magnetic, input, textarea, select,
.theme-toggle, .navbar a, .social-icons a, .box:hover {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Apply text-transform only where needed */
.heading, .tag, .btn span, h1, h2, h3, h4, h5, h6 {
  text-transform: capitalize;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
  /* Removed scroll-behavior to prevent conflicts with JS smooth scroll */
  /* scroll-behavior: smooth; */
}
body {
  background-color: var(--theme-bg);
  color: var(--theme-text);
  font-family: "Poppins", sans-serif;
  transition: background-color 0.4s ease, color 0.4s ease;
}

*::selection {
  background: var(--theme-accent-strong);
  color: var(--earth-cream);
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
}
html::-webkit-scrollbar {
  width: 0.8rem;
}
html::-webkit-scrollbar-track {
  background: rgba(236, 221, 205, 0.85);
}
html::-webkit-scrollbar-thumb {
  background: var(--theme-accent-strong);
}
html::-webkit-scrollbar-corner {
  background: rgba(236, 221, 205, 0.85);
}

/* Performance optimizations for smooth scrolling */
.will-change-transform {
  will-change: transform;
}

.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Optimize sections for smooth scrolling */
section {
  contain: layout style paint;
}

/* Optimize animated elements */
.home .image,
.about .image,
.contact .image-box {
  will-change: transform, opacity;
}

/* Optimize scroll-triggered animations */
.animate-on-scroll {
  will-change: transform, opacity;
}

/* Reduce motion for accessibility */
/* Global contrast improvement variables */
:root {
  --earth-ember: #b4632d;
  --earth-ember-strong: #8d4219;
  --earth-ember-soft: #d9a066;
  --earth-ink: #1c120d;
  --earth-clay: #c07c52;
  --earth-sand: #f4ede2;
  --earth-cream: #fff8ee;
  --earth-smoke: rgba(28, 18, 13, 0.12);
  --earth-shadow: rgba(28, 18, 13, 0.22);
  --earth-glow: rgba(180, 99, 45, 0.35);

  --improved-blue: var(--earth-ember);
  --improved-light-blue: var(--earth-ember-soft);
  --improved-purple: #7b3615;
  --improved-light-purple: #d9a066;
  --improved-text-light: #fdf7ef;
  --improved-text-medium: #8a6b52;
  --improved-text-dark: var(--earth-ink);
  --text-shadow-light: 0 1px 2px rgba(28, 18, 13, 0.25);
  --text-shadow-medium: 0 2px 4px rgba(28, 18, 13, 0.35);
  --text-shadow-strong: 0 2px 4px rgba(28, 18, 13, 0.55);
  --theme-bg: var(--earth-sand);
  --theme-surface: rgba(255, 249, 238, 0.94);
  --theme-surface-alt: rgba(241, 225, 204, 0.85);
  --theme-card: rgba(255, 244, 230, 0.9);
  --theme-text: var(--earth-ink);
  --theme-text-muted: #735b46;
  --theme-accent: var(--earth-ember);
  --theme-accent-strong: var(--earth-ember-strong);
  --theme-accent-hover: #6f3210;
  --theme-chip-bg: rgba(217, 160, 102, 0.45);
  --theme-border: rgba(115, 91, 70, 0.35);
  --theme-glow: var(--earth-glow);
  --theme-surface-strong: rgba(44, 26, 16, 0.92);

  --gradient-accent: linear-gradient(
    135deg,
    rgba(180, 99, 45, 0.78),
    rgba(217, 160, 102, 0.72)
  );
  --gradient-mesh: radial-gradient(at 18% 25%, rgba(217, 160, 102, 0.4) 0, transparent 52%),
                   radial-gradient(at 72% 22%, rgba(111, 50, 16, 0.32) 0, transparent 58%),
                   radial-gradient(at 50% 76%, rgba(66, 43, 27, 0.35) 0, transparent 65%);
  --gradient-glow: radial-gradient(circle at center, rgba(255, 240, 220, 0.85) 0, transparent 70%);

  --section-radius: clamp(24px, 5vw, 44px);
  --section-padding-y: clamp(1.8rem, 4vw, 3.6rem);
  --section-padding-x: clamp(1.6rem, 5vw, 4.4rem);
  --section-gap: clamp(1.6rem, 4vw, 3.2rem);
  --section-shadow: 0 24px 60px rgba(28, 18, 13, 0.08);
}

/* Apply improved contrast to existing classes */
.text-blue {
  color: var(--improved-blue) !important;
  text-shadow: var(--text-shadow-light);
}

.text-purple {
  color: var(--improved-purple) !important;
  text-shadow: var(--text-shadow-medium);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .home .image,
  .about .image,
  .contact .image-box {
    will-change: auto;
  }

  /* .home::before removed - no longer has animation */
  .home .hero-ambient__glow,
  .home .hero-ambient__piece {
    animation: none !important;
    transform: none !important;
  }
}

/* pre loader start */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  background: #f3e6d4;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}
.loader-container.fade-out {
  top: -120%;
}
.fixed-size {
  width: 150px; /* Set your desired width */
  height: 150px; /* Set your desired height */
  object-fit: cover; /* Ensures the image covers the area without distortion */
}
/* Add this CSS rule to set a fixed size for the icons in the skills section */
.skills .bar .info img {
  width: 48px; /* Set the desired width */
  height: 48px; /* Set the desired height */
  object-fit: cover; /* Ensure the image fits within the specified dimensions */
}
/* pre loader end */

/* Body scroll lock when mobile nav is open */
body.nav-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* navbar starts */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 2.4rem;
  padding: 1.7rem 10%;
  height: 6.5rem;
  background-color: var(--theme-surface);
  box-shadow: 0 1px 4px var(--earth-smoke);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(115, 91, 70, 0.12);
  transition: background-color 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
header .navbar {
  margin-left: auto;
}
header .header-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

/* Schedule Call CTA */
.schedule-cta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  background: var(--theme-accent);
  color: white;
  border: none;
  border-radius: 2rem;
  font-size: 1.4rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.schedule-cta:hover {
  background: var(--theme-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(180, 99, 45, 0.3);
}

.schedule-cta:focus {
  outline: 2px solid var(--theme-accent);
  outline-offset: 2px;
}

.schedule-cta .cta-text {
  display: inline-block;
}

header .theme-toggle {
  position: relative;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 999px;
  border: 1px solid var(--theme-border);
  background-color: var(--theme-card);
  color: var(--theme-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
header .theme-toggle .icon {
  position: absolute;
  font-size: 1.6rem;
  opacity: 0;
  transform: scale(0.65);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
header .theme-toggle[data-theme-mode="light"] .icon-sun,
header .theme-toggle[data-theme-mode="dark"] .icon-moon {
  opacity: 1;
  transform: scale(1);
}
header .theme-toggle:hover {
  box-shadow: 0 0 0 2px var(--theme-glow), 0 12px 22px rgba(15, 23, 42, 0.15);
  transform: translateY(-1px);
}
header .theme-toggle:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 2px;
}
section {
  min-height: auto;
  padding: var(--section-padding-y) var(--section-padding-x);
  max-width: 1180px;
  margin: var(--section-gap) auto;
  border-radius: var(--section-radius);
  position: relative;
  box-shadow: var(--section-shadow);
  background-clip: padding-box;
}

@media (max-width: 480px) {
  section {
    padding: clamp(1.6rem, 8vw, 2.4rem) 1.8rem;
  }
}

/* Hero section keeps full height */
.home {
  min-height: 100vh;
  max-width: 100%;
  padding: clamp(3.2rem, 7vw, 6.2rem) 5%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
.heading {
  font-size: 3.2rem;
  color: var(--earth-cream);
  font-weight: 800;
  text-align: center;
  text-shadow: 0 1px 2px rgba(28, 18, 13, 0.55);
  margin-bottom: 1.6rem;
  letter-spacing: 0.02em;
}
.heading span {
  color: var(--theme-accent);
  text-shadow: 0 1px 2px rgba(28, 18, 13, 0.4);
}

.glitch-text {
  position: relative;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.18em;
  overflow: visible;
}
.glitch-text::before,
.glitch-text::after {
  content: none;
}

/* Light section headings - high contrast */
.about .heading,
.education .heading,
.experience .heading,
.contact .heading {
  color: var(--theme-text);
  text-shadow: none;
}

.about .heading span,
.education .heading span,
.experience .heading span,
.contact .heading span {
  color: var(--theme-accent);
  text-shadow: none;
}

/* Dark section headings - enhanced contrast */
.skills .heading,
.work .heading {
  color: var(--earth-cream);
  text-shadow: 0 2px 4px rgba(28, 18, 13, 0.6);
}

.skills .heading span,
.work .heading span {
  color: var(--theme-accent);
  text-shadow: 0 2px 4px rgba(28, 18, 13, 0.6);
}
header .logo {
  font-size: 1.9rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--theme-text);
  transition: color 0.3s ease;
}
header .logo i {
  font-size: 2.2rem;
}
header .logo:hover {
  color: var(--theme-accent);
}
header .navbar ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
}
header .navbar li {
  margin-left: 2.5rem;
}
header .navbar ul li a {
  font-size: 1.57rem;
  color: var(--theme-text-muted);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.04rem;
  transition: 0.2s;
}
header .navbar ul li a.active,
header .navbar ul li a:hover {
  color: var(--theme-accent);
  border-bottom: 0.2rem solid var(--theme-accent);
  padding: 0.5rem 0;
}
/* navbar ends */

/* hamburger icon starts*/
#menu {
  font-size: 3rem;
  cursor: pointer;
  color: var(--theme-text);
  display: none;
  background: transparent;
  border: none;
  line-height: 1;
  padding: 0.4rem;
  border-radius: 0.8rem;
  transition: color 0.3s ease, transform 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
}
#menu:hover {
  color: var(--theme-accent);
  transform: translateY(-1px);
}
#menu:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 2px;
}
@media (max-width: 768px) {
  #menu {
    display: block;
  }
  header .header-actions {
    margin-left: auto;
  }
  /* Hide text on mobile, show only icon */
  .schedule-cta .cta-text {
    display: none;
  }
  .schedule-cta {
    padding: 0.9rem;
    width: 3.8rem;
    height: 3.8rem;
    justify-content: center;
  }
  header .navbar {
    position: fixed;
    top: 6.5rem;
    right: -120%;
    width: 75%;
    height: 100%;
    text-align: left;
    align-items: flex-start;
    background-color: var(--theme-surface-strong);
    border-left: none;
  }
  header .navbar ul {
    flex-flow: column;
    padding: 1rem;
  }
  header .navbar ul li {
    text-align: center;
    width: 100%;
    margin: 1rem 0;
    border-radius: 0.5rem;
    width: 26rem;
  }
  header .navbar ul li a {
    display: block;
    padding: 1rem;
    text-align: left;
    color: #fff;
    font-size: 2rem;
  }
  header .navbar ul li a.active,
  header .navbar ul li a:hover {
    padding: 1rem;
    color: #fff;
    border-radius: 0.5rem;
    border-bottom: 0.5rem solid var(--theme-accent-strong);
  }
  .fa-times {
    transform: rotate(180deg);
  }
  header .navbar.nav-toggle {
    right: 0;
  }
  :root[data-theme="dark"] header .navbar {
    background-color: rgba(27, 16, 10, 0.97);
    border-left: 1px solid var(--theme-border);
  }
  :root[data-theme="dark"] header .navbar ul li a {
    color: var(--theme-text);
  }
  :root[data-theme="dark"] header .navbar ul li a.active,
  :root[data-theme="dark"] header .navbar ul li a:hover {
    border-bottom-color: var(--theme-accent);
  }
}
/* hamburger icon ends */

/* hero section starts*/
.home {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  min-height: 100vh;
  align-items: center;
  background:
    radial-gradient(120% 140% at 12% 15%, rgba(255, 238, 214, 0.82), transparent 60%),
    radial-gradient(95% 140% at 85% 0%, rgba(180, 99, 45, 0.3), transparent 72%),
    linear-gradient(140deg, #2a1a13 0%, #1c120d 36%, #3b2417 100%);
  background-attachment: fixed;
  overflow: hidden;
}
.home #particles-js {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}
.home::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(
      45deg,
      rgba(255, 244, 230, 0.12) 25%,
      transparent 25%,
      transparent 50%,
      rgba(255, 244, 230, 0.12) 50%,
      rgba(255, 244, 230, 0.12) 75%,
      transparent 75%,
      transparent
    );
  background-size: 140px 140px;
  /* mix-blend-mode: soft-light; -- Removed to neutralize pattern */
  opacity: 0; /* Changed from 0.2 to 0 to hide the pattern completely */
  /* animation: checkeredParallax 22s linear infinite; -- Removed animation */
}
.home .content {
  flex: 1 1 40rem;
  padding-top: 1rem;
  z-index: 1;
}
.home .hero-subtitle {
  margin-top: 1.6rem;
  font-size: 1.6rem;
  line-height: 1.6;
  color: rgba(255, 235, 214, 0.88);
  max-width: 44rem;
}
.home .hero-chess-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.8rem 0 0;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  background: rgba(28, 18, 13, 0.65);
  color: var(--earth-cream);
  border: 1px solid rgba(255, 232, 209, 0.22);
  box-shadow: 0 14px 28px rgba(12, 7, 4, 0.45);
  font-size: 1.3rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}
.home .hero-chess-badge i {
  color: var(--theme-accent);
  font-size: 1.8rem;
}
.home .hero-chess-badge span {
  font-family: var(--font-heading, "Poppins", sans-serif);
}
.home .hero-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.home .hero-ambient__glow {
  position: absolute;
  inset: 10% 18% auto;
  height: 60%;
  background: var(--gradient-accent);
  filter: blur(140px);
  opacity: 0.65;
  animation: emberPulse 16s ease-in-out infinite;
}
.home .hero-ambient__pieces {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.home .hero-ambient__piece {
  position: absolute;
  font-size: clamp(3.2rem, 4vw, 4.8rem);
  color: rgba(255, 235, 214, 0.85);
  text-shadow: 0 14px 26px rgba(17, 10, 6, 0.55);
  animation: chessFloat 14s ease-in-out infinite;
}
.home .hero-ambient__piece i {
  color: inherit;
  opacity: 0.85;
}
.home .hero-ambient__piece--knight {
  top: 14%;
  left: 6%;
  animation-duration: 18s;
}
.home .hero-ambient__piece--queen {
  bottom: 10%;
  right: 8%;
  animation-duration: 20s;
  animation-delay: -3s;
}
.home .hero-ambient__piece--rook {
  top: 32%;
  right: 22%;
  animation-duration: 16s;
  animation-delay: -6s;
}
.home .hero-ambient__piece--chip {
  top: 8%;
  right: 40%;
  font-size: clamp(2.8rem, 3.4vw, 4.2rem);
  animation: cyberDrift 22s ease-in-out infinite;
  opacity: 0.75;
}
.home .hero-ambient__piece--code {
  bottom: 28%;
  left: 18%;
  font-size: clamp(2.6rem, 3vw, 3.6rem);
  animation: neonOrbit 18s ease-in-out infinite;
  opacity: 0.7;
}
.home .hero-ambient__piece--terminal {
  top: 64%;
  left: 4%;
  font-size: clamp(3rem, 3.6vw, 4.6rem);
  animation: neonOrbit 24s ease-in-out infinite reverse;
  opacity: 0.68;
}
.home .image {
  flex: 1 1 40rem;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.home .image img {
  display: block;
  width: 70%;
  max-width: 350px;
  height: auto;
  margin-left: 6rem;
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  border: 4px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease;
  position: relative;
  z-index: 10;
  opacity: 1;
  visibility: visible;
}
.home .image img:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  transform: scale(1.05);
}
.home .content h1,
.home .content h2 {
  font-size: 5rem;
  font-weight: 800;
  color: rgba(255, 235, 214, 0.96);
  text-shadow: 0 2px 4px rgba(17, 10, 6, 0.65);
}
.home .content h1 span,
.home .content h2 span {
  font-size: 5rem;
  font-weight: 800;
  color: var(--theme-accent);
  text-shadow: 0 2px 4px rgba(17, 10, 6, 0.6);
}
.home .content p {
  font-size: 2.5rem;
  color: rgba(255, 235, 214, 0.92);
  font-weight: 600;
  padding: 1rem 0;
  text-shadow: 0 2px 4px rgba(17, 10, 6, 0.55);
}
.home .content p span {
  font-size: 2.5rem;
  color: var(--theme-accent);
  font-weight: 600;
  padding: 1rem 0;
  text-shadow: 0 2px 4px rgba(17, 10, 6, 0.55);
}

/* Enhanced contrast for hero section text */
.home .content .subtitle-blue {
  color: var(--theme-accent) !important;
  text-shadow: 0 2px 4px rgba(17, 10, 6, 0.45);
}

.home .content .subtitle-light {
  color: rgba(255, 235, 214, 0.88) !important;
  text-shadow: 0 1px 3px rgba(17, 10, 6, 0.45);
}
.home .btn {
  margin-top: 1rem;
  position: absolute;
  line-height: 0;
  padding: 1.6rem 3rem;
  border-radius: 4em;
  transition: 0.5s;
  color: var(--earth-cream);
  background: linear-gradient(135deg, rgba(180, 99, 45, 0.92), rgba(217, 160, 102, 0.88));
  border: 1px solid rgba(217, 160, 102, 0.65);
  box-shadow: 0px 12px 28px rgba(12, 7, 4, 0.45);
  font-family: "Nunito", sans-serif;
}
.home .btn span {
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: 0.1rem;
}
.home .btn i {
  margin-left: 0.3rem;
  font-size: 1.5rem;
  transition: 0.3s;
}
.home .btn:hover {
  background: linear-gradient(135deg, rgba(217, 160, 102, 0.95), rgba(180, 99, 45, 0.95));
  transform: translateY(-3px);
  box-shadow: 0px 16px 32px rgba(12, 7, 4, 0.6);
}
.home .btn:hover i {
  transform: translateX(5px);
}
/* social icons start */
.socials {
  position: relative;
  margin-top: 9rem;
}
.socials .social-icons {
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}
.socials .social-icons li {
  display: inline-block;
  margin-bottom: 14px;
}
.social-icons a {
  font-size: 2rem;
  display: inline-block;
  line-height: 44px;
  color: rgba(255, 235, 214, 0.9);
  background-color: rgba(28, 18, 13, 0.55);
  width: 44px;
  height: 44px;
  text-align: center;
  margin-right: 8px;
  border-radius: 100%;
  border: 1px solid rgba(217, 160, 102, 0.4);
  -webkit-transition: all 0.2s linear;
  -o-transition: all 0.2s linear;
  transition: all 0.2s linear;
}
.social-icons a:active,
.social-icons a:focus,
.social-icons a:hover {
  color: #111;
  background-color: rgba(255, 235, 214, 0.88);
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(12, 7, 4, 0.45);
}
.social-icons a.github:hover,
.social-icons a.twitter:hover,
.social-icons a.linkedin:hover {
  background-color: rgba(217, 160, 102, 0.85);
  color: #111;
}
.social-icons a.linkedin:hover,
.social-icons a.dev:hover,
.social-icons a.instagram:hover {
  background-color: rgba(217, 160, 102, 0.85);
  color: #111;
}
/* social icons end */

/* hero media queries starts*/
@media (max-width: 768px) {
  .home {
    flex-direction: column;
    padding-top: 8rem;
    text-align: center;
  }
  .home .content {
    order: 2;
  }
  .home .image {
    order: 1;
    margin-bottom: 2rem;
  }
  .home .image img {
    width: 50%;
    max-width: 250px;
    margin-left: 0;
  }
}

@media (max-width: 450px) {
  .home .btn {
    margin: 4rem 0;
  }
  .socials {
    margin-top: 12rem;
  }
  .home .image {
    display: flex;
    justify-content: center;
  }
  .home .image img {
    margin-top: 0;
    width: 60%;
    max-width: 200px;
    margin-left: 0;
  }
  .home .content h1,
  .home .content h2 {
    font-size: 3.5rem;
  }
  .home .content h1 span,
  .home .content h2 span {
    font-size: 3.5rem;
  }
  .home .content p {
    font-size: 2.2rem;
  }
  .home .content p span {
    font-size: 2.2rem;
  }
}
/* hero media queries ends*/
/* hero section end */

/* about section starts */
.about {
  background: var(--theme-surface);
}
.about .row {
  display: flex;
  flex-direction: row;
  gap: clamp(1.2rem, 3vw, 1.8rem);
  flex-wrap: wrap;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  max-width: min(1100px, 94vw);
  margin: 0 auto;
}
.about .row .image {
  text-align: center;
  flex: 0 1 clamp(24rem, 32vw, 28rem);
  position: relative;
}
.about .row .image img {
  margin: clamp(0.8rem, 2.5vw, 1.6rem) auto;
  width: clamp(18rem, 26vw, 22rem);
  height: auto;
  border-radius: 2.4rem;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.6);
  mix-blend-mode: luminosity;
  transition: 0.3s;
  cursor: pointer;
}
.about .row .image::after {
  content: "";
  position: absolute;
  inset: clamp(1rem, 3vw, 1.8rem);
  border-radius: 2.4rem;
  background: linear-gradient(180deg, rgba(217, 160, 102, 0) 0%, rgba(217, 160, 102, 0.2) 45%, rgba(17, 10, 6, 0) 100%);
  mix-blend-mode: screen;
  opacity: 0.0;
  animation: scanSweep 8s linear infinite;
  pointer-events: none;
}
.about .row .image img:hover {
  mix-blend-mode: normal;
}
.about .row .content {
  flex: 1 1 clamp(32rem, 46vw, 48rem);
  padding: clamp(1.2rem, 3vw, 2rem);
}
.about .row .content h3 {
  color: var(--theme-text);
  font-size: 2.5rem;
}

/* Earthy contrast variant for About section */
.about-dark-section {
  background: linear-gradient(135deg, #2b1a13 0%, #1c120d 100%) !important;
}

.about-purple-heading {
  color: var(--theme-accent) !important;
  text-shadow: 0 2px 4px rgba(17, 10, 6, 0.5);
  font-weight: 700;
}

.about-blue-subtitle {
  color: rgba(255, 235, 214, 0.9) !important;
  text-shadow: 0 1px 3px rgba(17, 10, 6, 0.45);
  font-weight: 500;
}
.about .row .content .tag {
  font-size: 1.4rem;
  color: var(--theme-accent);
  font-weight: 600;
  margin-top: 1rem;
}
.about .row .content p {
  font-size: clamp(1.35rem, 1.9vw, 1.5rem);
  margin-top: 1.2rem;
  font-family: "Nunito";
  font-weight: 600;
  text-transform: none;
  color: var(--theme-text-muted);
  line-height: 1.6;
}
.about .row .content .box-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: "Nunito";
  font-weight: 600;
}
.about .row .content .box-container .box p {
  text-transform: none;
}
.about .row .content .box-container .box p span {
  color: var(--theme-accent);
}
.resumebtn {
  margin-top: 3.5rem;
}
.resumebtn .btn {
  padding: 1.7rem 3rem;
  border-radius: 0.5em;
  transition: 0.3s;
  color: #fff;
  background: var(--theme-accent-strong);
  box-shadow: 0px 5px 18px var(--theme-glow);
  font-family: "Nunito", sans-serif;
}
.resumebtn .btn span {
  font-weight: 600;
  font-size: 1.8rem;
  letter-spacing: 0.1rem;
}
.resumebtn .btn i {
  margin-left: 0.3rem;
  font-size: 1.2rem;
  transition: 0.3s;
}
.resumebtn .btn:hover {
  background: var(--theme-accent-hover);
}
.resumebtn .btn:hover i {
  transform: translateX(5px);
}
/* about media queries starts*/
@media screen and (max-width: 600px) {
  .about .row .image {
    margin-top: 2rem;
  }
  .about .row .image img {
    margin: 0 auto;
    width: 80%;
    mix-blend-mode: normal;
  }
  .about .row {
    padding: 0.5rem;
    margin-bottom: 7rem;
  }
  .about .row .content {
    padding: 1rem;
  }
  .about .row .content .box-container {
    gap: 0;
  }
}
/* about media queries ends*/
/* about section ends */

/* skills section starts */
.skills {
  min-height: auto;
  background: linear-gradient(160deg, #2b1912 0%, #120a06 100%);
  padding-bottom: 2.4rem;
  position: relative;
  overflow: hidden;
}

/* Enhanced text contrast for dark sections */
.enhanced-contrast-text {
  color: rgba(255, 235, 214, 0.9) !important;
  text-shadow: 0 2px 4px rgba(12, 7, 4, 0.45);
}

.enhanced-contrast-blue {
  color: var(--theme-accent) !important;
  text-shadow: 0 1px 3px rgba(12, 7, 4, 0.45);
}

.enhanced-contrast-purple {
  color: rgba(255, 235, 214, 0.85) !important;
  text-shadow: 0 2px 4px rgba(12, 7, 4, 0.55);
}
/* Skills heading handled by .heading styles */
.skills .container {
  background: rgba(28, 18, 13, 0.55);
  color: var(--earth-cream);
  border-radius: 1.6rem;
  padding: clamp(1.2rem, 2.6vw, 2.2rem);
  width: min(92%, 980px);
  margin: clamp(0.8rem, 2.4vw, 1.2rem) auto 0;
  position: relative;
  z-index: 1;
}
.skills::before,
.skills::after {
  content: "";
  position: absolute;
  inset: -15% -30%;
  pointer-events: none;
  opacity: 0.25;
  filter: blur(0.2px);
}
.skills::before {
  background-image:
    linear-gradient(120deg, rgba(255, 235, 214, 0.08) 0%, rgba(26, 16, 10, 0) 65%),
    repeating-linear-gradient(90deg, rgba(255, 235, 214, 0.06) 0 2px, transparent 2px 36px);
  animation: codeDrift 26s linear infinite;
}
.skills::after {
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(90, 241, 255, 0.05) 0 15px,
    transparent 15px 30px
  );
  mix-blend-mode: screen;
  animation: codeFall 18s linear infinite;
}
.skills .container .row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  flex-wrap: wrap;
  gap: 1.4rem;
}
.skills .container .bar {
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(12, 7, 4, 0.35);
  background: rgba(28, 18, 13, 0.8);
  transition: 0.2s;
}
.skills .container .bar:hover {
  box-shadow: 0 8px 10px rgba(0, 2, 68, 0.8) !important;
  background-color: rgba(0, 0, 0, 0.9) !important;
}
.skills .container .bar .info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
.skills .container .bar .info i {
  font-size: 4rem;
}
.skills .container .bar .info span {
  font-size: 2rem;
  font-weight: 500;
  font-family: "Poppins";
  margin-left: 0.5rem;
}
/* skills media queries starts*/
@media screen and (max-width: 600px) {
  .skills .container {
    padding: 0;
    margin: 0;
  }
  .skills .container .row {
    grid-template-columns: repeat(2, 1fr);
    margin: 1rem;
    padding: 2rem 0.2rem 2rem 0.2rem;
    gap: 1rem;
  }
  .skills .container {
    margin-top: 5px;
    width: 100%;
  }
}
/* skills media queries ends*/
/* skills section ends */

/* education section starts */
.education {
  background: var(--theme-surface-alt);
  min-height: auto;
}
.education .qoute {
  font-size: 1.5rem;
  text-align: center;
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  margin-top: 0.5rem;
}
.education .box-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1.2rem, 3vw, 2rem);
  max-width: min(1100px, 95vw);
  margin: clamp(1.2rem, 3vw, 2.4rem) auto;
}
.education .box-container .box {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 1.6rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: 0.3s;
  background: rgb(252, 252, 252);
  min-height: clamp(20rem, 28vw, 24rem);
}
.education .box-container .box:hover {
  transform: scale(1.02);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}
.education .box-container .box .image {
  flex: 0 0 auto;
  width: 100%;
  display: grid;
  place-items: center;
  padding: clamp(1.2rem, 3vw, 1.8rem) clamp(1.4rem, 3vw, 2rem) 0;
}
.education .box-container .box img {
  object-fit: contain;
  width: clamp(7.5rem, 12vw, 9.5rem);
  height: clamp(7.5rem, 12vw, 9.5rem);
}
.education .box-container .box .content {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1rem, 3vw, 1.6rem) clamp(1.2rem, 3vw, 2rem) clamp(1.4rem, 3vw, 2.2rem);
  gap: 0.6rem;
  align-items: flex-start;
}
.education .box-container .box .content h3 {
  font-size: clamp(1.8rem, 2.4vw, 2.1rem);
  color: var(--theme-accent);
  font-weight: 600;
  text-align: left;
}
.education .box-container .box .content p {
  font-size: clamp(1.3rem, 1.8vw, 1.5rem);
  text-align: left;
  color: var(--theme-text-muted);
}
.education h4 {
  font-size: clamp(1.4rem, 1.9vw, 1.6rem);
  color: var(--theme-text);
  text-align: left;
  margin: 0;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
}
.education .box-container .box .content h4 {
  margin-top: auto;
  padding-top: 0.4rem;
}

/* education media queries starts*/
@media screen and (max-width: 600px) {
  .education .box-container {
    grid-template-columns: 1fr;
  }
  .education .box-container .box {
    min-height: unset;
  }
  .education .box-container .box .image {
    padding-bottom: 0;
  }
  .education .box-container .box img {
    width: clamp(6.5rem, 24vw, 8.5rem);
    height: clamp(6.5rem, 24vw, 8.5rem);
  }
}
/* education media queries ends*/
/* education section ends */

/* work section starts */
.work {
  /* background: #010124; */
  background: linear-gradient(180deg, #22140c 0%, #0f0804 100%);
  position: relative;
  overflow: hidden;
}

/* High contrast mode for portfolio sections */
.high-contrast-card {
  background: rgba(28, 18, 13, 0.9) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(217, 160, 102, 0.25);
}

.high-contrast-text {
  color: rgba(255, 235, 214, 0.9) !important;
  text-shadow: 0 2px 4px rgba(12, 7, 4, 0.55);
  font-weight: 500;
}

.high-contrast-accent {
  color: var(--theme-accent) !important;
  text-shadow: 0 2px 4px rgba(12, 7, 4, 0.45);
}
/* Work heading handled by .heading styles */
.work .box-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1rem, 2.4vw, 1.6rem);
  margin: clamp(0.8rem, 2.4vw, 1.4rem) auto;
  max-width: min(1200px, 94vw);
}
@media screen and (min-width: 1200px) {
  .work .box-container {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.work .box-container .box {
  border-radius: 1.6rem;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
  position: relative;
  overflow: hidden;
  min-height: clamp(18rem, 24vw, 24rem);
  display: flex;
  flex-direction: column;
}
@supports (aspect-ratio: 4 / 3) {
  .work .box-container .box {
    aspect-ratio: 4 / 3;
    min-height: auto;
  }
}
.work::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 235, 214, 0.12), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(90, 241, 255, 0.08), transparent 60%),
    repeating-linear-gradient(135deg, rgba(217, 160, 102, 0.05) 0 8px, transparent 8px 16px);
  opacity: 0.5;
  animation: circuitDrift 32s linear infinite;
  pointer-events: none;
}
.work .box-container .box img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.work .box-container .box .content {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 78%;
  left: 0;
  background: var(--theme-card);
  border: 1px solid var(--theme-border);
  display: flex;
  flex-direction: column;
  transition: top 0.3s ease;
}
.work .box-container .box .content .tag {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
  width: 100%;
  padding-left: 1rem;
  background: var(--theme-chip-bg);
  cursor: pointer;
}
.work .box-container .box .content .tag h3 {
  font-size: 2rem;
  color: var(--theme-text);
}
/* Desktop: hover to reveal */
@media (hover: hover) and (pointer: fine) {
  .work .box-container .box:hover .content {
    top: 32%;
  }
}
/* Touch devices and mobile: show content or use click */
@media (hover: none) or (pointer: coarse) {
  .work .box-container .box .content {
    top: 68%;
  }
  .work .box-container .box.expanded .content {
    top: 32%;
  }
}
/* Mobile screens: always show content */
@media (max-width: 768px) {
  .work .box-container .box .content {
    position: relative;
    top: 0;
  }
}
.work .desc {
  margin: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.work .desc p {
  font-size: 1.5rem;
  color: rgba(255, 235, 214, 0.85);
}
.work .desc .btns {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 2rem;
}
.work .desc .btns .btn {
  line-height: 0;
  display: inline;
  padding: 1.5rem 2.5rem;
  border-radius: 0.5rem;
  font-size: 1.5rem;
  color: var(--earth-cream);
  background: linear-gradient(135deg, rgba(180, 99, 45, 0.9), rgba(217, 160, 102, 0.85));
  margin-right: 2rem;
}
.work .desc .btns .btn:hover {
  background: linear-gradient(135deg, rgba(217, 160, 102, 0.95), rgba(180, 99, 45, 0.95));
}
.work .viewall {
  display: flex;
  justify-content: center;
}
.work .viewall .btn {
  position: relative;
  line-height: 0;
  padding: 1.6rem 3rem;
  border-radius: 0.5em;
  transition: 0.5s;
  color: var(--earth-cream);
  font-weight: 700;
  border: 1px solid rgba(217, 160, 102, 0.6);
  box-shadow: 0px 8px 20px rgba(12, 7, 4, 0.45);
  text-align: center;
  background: linear-gradient(135deg, rgba(28, 18, 13, 0.85), rgba(45, 27, 18, 0.85));
}
.work .viewall .btn span {
  font-weight: 600;
  font-size: 1.7rem;
  font-family: "Nunito", sans-serif;
}
.work .viewall .btn i {
  margin-left: 0.3rem;
  font-size: 1.5rem;
  transition: 0.3s;
}
.work .viewall .btn:hover {
  background: linear-gradient(135deg, rgba(217, 160, 102, 0.92), rgba(180, 99, 45, 0.92));
  color: #111;
}
.work .viewall .btn:hover i {
  transform: translateX(5px);
}
/* work section ends */

/* experience section starts */

.experience {
  max-width: 100%;
  margin: clamp(2.4rem, 6vw, 6.4rem) 0;
  border-radius: 0;
  box-shadow: none;
  padding: clamp(1.8rem, 4.6vw, 4rem) clamp(1.4rem, 5vw, 4.8rem);
  overflow: visible;
  contain: none;
}

/* Improved contrast for experience cards */
.experience-card-blue-text {
  color: var(--theme-accent) !important;
  text-shadow: 0 1px 2px rgba(12, 7, 4, 0.35);
}

.experience-card-date {
  color: rgba(255, 235, 214, 0.75) !important;
  font-weight: 500;
}

.experience-card-title {
  color: rgba(255, 235, 214, 0.9) !important;
  text-shadow: 0 1px 3px rgba(12, 7, 4, 0.45);
}

.experience-card-dark {
  background: rgba(28, 18, 13, 0.85) !important;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(217, 160, 102, 0.25);
}

.experience .timeline {
  --timeline-node-size: 18px;
  --timeline-card-gap: clamp(1rem, 4vw, 4rem);
  --timeline-track-width: 100%;
  --timeline-track-start: 0px;
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr);
  gap: clamp(3rem, 6vw, 6.4rem);
  width: 100%;
  margin: clamp(0.8rem, 3vw, 1.6rem) 0;
  padding: clamp(0.6rem, 2vw, 1.8rem) clamp(1.4rem, 4.6vw, 3.2rem) clamp(2.2rem, 5vw, 3.8rem);
  min-height: clamp(620px, 78vh, 860px);
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x proximity;
}
.experience .timeline::-webkit-scrollbar {
  height: 8px;
}
.experience .timeline::-webkit-scrollbar-thumb {
  background: var(--theme-accent);
  border-radius: 999px;
}
.experience .timeline::-webkit-scrollbar-track {
  background: rgba(217, 160, 102, 0.15);
}
.experience .timeline::-webkit-scrollbar-corner {
  background: rgba(217, 160, 102, 0.15);
}
.experience .timeline::before {
  content: "";
  position: absolute;
  left: var(--timeline-track-start, 0px);
  top: 50%;
  width: var(--timeline-track-width, 100%);
  height: 4px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(217, 160, 102, 0.1), var(--theme-accent), rgba(217, 160, 102, 0.1));
  border-radius: 999px;
  z-index: -1;
  pointer-events: none;
}
.experience .timeline .timeline-item {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(var(--timeline-card-gap) * 2 + 230px);
  scroll-snap-align: center;
}
.experience .timeline .timeline-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--timeline-node-size);
  height: var(--timeline-node-size);
  transform: translate(-50%, -50%);
  background: var(--theme-surface, rgba(28, 18, 13, 0.92));
  border: 4px solid var(--theme-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(28, 18, 13, 0.6);
  z-index: 2;
}
.experience .timeline .timeline-item::after {
  content: "";
  position: absolute;
  width: 2px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(217, 160, 102, 0), var(--theme-accent));
  z-index: 1;
}
.experience .timeline .timeline-item--top::after {
  bottom: calc(50% + var(--timeline-node-size) / 2);
  height: calc(var(--timeline-card-gap) + var(--timeline-node-size) / 2 + 18px);
  background: linear-gradient(0deg, var(--theme-accent), rgba(217, 160, 102, 0));
}
.experience .timeline .timeline-item--bottom::after {
  top: calc(50% + var(--timeline-node-size) / 2);
  height: calc(var(--timeline-card-gap) + var(--timeline-node-size) / 2 + 18px);
  background: linear-gradient(180deg, var(--theme-accent), rgba(217, 160, 102, 0));
}
.experience .timeline .timeline-card {
  position: relative;
  width: min(320px, 92%);
  padding: clamp(1.6rem, 2.8vw, 2.4rem);
  border-radius: 1.6rem;
  border: 1px solid rgba(217, 160, 102, 0.18);
  background: rgba(28, 18, 13, 0.9);
  box-shadow: 0 18px 34px rgba(12, 7, 4, 0.25);
  backdrop-filter: blur(6px);
  transition: transform 0.4s ease;
}
.experience .timeline .timeline-card::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
}
.experience .timeline .timeline-item--top .timeline-card {
  transform: translateY(calc(-100% - (var(--timeline-card-gap) * 0.5)));
}
.experience .timeline .timeline-item--top .timeline-card::after {
  bottom: calc(-10px + (var(--timeline-card-gap) * 0.5));
  border-top: 10px solid rgba(28, 18, 13, 0.9);
}
.experience .timeline .timeline-item--bottom .timeline-card {
  transform: translateY(calc(100% + (var(--timeline-card-gap) * 0.5)));
}
.experience .timeline .timeline-item--bottom .timeline-card::after {
  top: calc(-10px + (var(--timeline-card-gap) * 0.5));
  border-bottom: 10px solid rgba(28, 18, 13, 0.9);
}
.experience .timeline .timeline-card .tag {
  font-size: 1.4rem;
  padding-bottom: 1.2rem;
  color: rgba(255, 235, 214, 0.85);
}
.experience .timeline .timeline-card .desc h3 {
  font-size: 1.6rem;
  font-weight: 600;
  color: rgba(255, 235, 214, 0.92);
}
.experience .timeline .timeline-card .desc p {
  font-size: 1.35rem;
  color: rgba(255, 235, 214, 0.78);
  margin-top: 0.6rem;
}
/* view all button */
.morebtn {
  display: flex;
  justify-content: center;
}
.morebtn .btn {
  position: relative;
  line-height: 0;
  padding: 1.6rem 3rem;
  border-radius: 0.5em;
  transition: 0.5s;
  color: #fff;
  background: var(--theme-accent-strong);
  box-shadow: 0px 5px 18px var(--theme-glow);
  text-align: center;
}
.morebtn .btn span {
  font-weight: 600;
  font-size: 1.7rem;
  font-family: "Nunito", sans-serif;
}
.morebtn .btn i {
  margin-left: 0.3rem;
  font-size: 1.5rem;
  transition: 0.3s;
}
.morebtn .btn:hover {
  background: var(--theme-accent-hover);
}
.morebtn .btn:hover i {
  transform: translateX(5px);
}

/* Media queries - Responsive timeline on screens less than 600px wide */
@media screen and (max-width: 900px) {
  .experience .timeline {
    --timeline-card-gap: clamp(0.8rem, 4.8vw, 3rem);
    grid-auto-columns: minmax(240px, 80vw);
    gap: clamp(1.8rem, 4vw, 3rem);
    padding: clamp(1.6rem, 4.4vw, 3rem) clamp(1rem, 4vw, 2rem) clamp(2.4rem, 4.8vw, 3.8rem);
    min-height: clamp(560px, 82vh, 860px);
  }
}

@media screen and (max-width: 600px) {
  .experience .timeline {
    --timeline-card-gap: 0;
    grid-auto-columns: minmax(220px, 88vw);
    scroll-snap-type: x mandatory;
    padding: clamp(2.4rem, 6vw, 4rem) clamp(0.8rem, 4vw, 1.6rem) clamp(4.4rem, 7vw, 5.2rem);
    min-height: clamp(360px, 68vh, 520px);
  }
  .experience .timeline::before {
    width: 100%;
  }
  .experience .timeline .timeline-item {
    min-height: 260px;
  }
  .experience .timeline .timeline-card {
    width: min(320px, 100%);
  }
  .experience .timeline .timeline-item::after {
    display: none;
  }
  .experience .timeline .timeline-item::before {
    display: none;
  }
  .experience .timeline .timeline-item--top .timeline-card,
  .experience .timeline .timeline-item--bottom .timeline-card {
    transform: none;
  }
  .morebtn {
    margin-top: 3rem;
  }
}
/* experience media queries ends */
/* experience section ends */

/* contact section starts */
.contact {
  background: var(--theme-surface-alt);
  min-height: 60vh;
  position: relative;
  overflow: hidden;
}
.contact .container {
  max-width: 1050px;
  width: 100%;
  background: var(--theme-surface);
  border-radius: 2.2rem;
  margin: clamp(1rem, 3.2vw, 2rem) auto;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.18);
  position: relative;
  z-index: 1;
}
.contact::before,
.contact::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.contact::before {
  background: linear-gradient(180deg, rgba(255, 201, 134, 0) 0%, rgba(255, 201, 134, 0.18) 45%, rgba(255, 201, 134, 0) 90%);
  mix-blend-mode: screen;
  transform: translateY(-100%);
  animation: scanSweep 10s linear infinite;
}
.contact::after {
  background: repeating-linear-gradient(
      90deg,
      rgba(217, 160, 102, 0.05) 0 1px,
      transparent 1px 32px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(217, 160, 102, 0.04) 0 1px,
      transparent 1px 24px
    );
  opacity: 0.18;
  animation: gridPulse 16s ease-in-out infinite;
}
.contact .container .content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 4vw, 2.6rem);
  padding: clamp(2rem, 4vw, 2.8rem) clamp(1.6rem, 4vw, 2.4rem);
}
.contact .content .image-box {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.contact .content .image-box img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  position: relative;
}
.contact .content form {
  width: 100%;
  max-width: 500px;
  justify-self: center;
}
form .form-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.form-group .field {
  height: 50px;
  display: flex;
  position: relative;
  margin: 1rem;
  width: 100%;
}
form i {
  position: absolute;
  top: 50%;
  left: 18px;
  color: rgb(51, 51, 51);
  font-size: 17px;
  pointer-events: none;
  transform: translateY(-50%);
}
form .field input,
form .message textarea {
  width: 100%;
  height: 100%;
  outline: none;
  padding: 0 16px 0 48px;
  font-size: 16px;
  font-family: "Poppins", sans-serif;
  border-radius: 5px;
  border: 1px solid rgba(115, 91, 70, 0.4);
  background: rgba(255, 248, 238, 0.92);
}
.field input::placeholder,
.message textarea::placeholder {
  color: rgb(51, 51, 51);
}
.field input:focus,
.message textarea:focus {
  padding-left: 47px;
  border: 2px solid var(--theme-accent);
}
.field input:focus ~ i,
.message textarea:focus ~ i {
  color: var(--theme-accent);
}
form .message {
  position: relative;
  margin: 1rem;
  width: 100%;
}
form .message i {
  top: 25px;
  font-size: 20px;
  left: 15px;
}
form .message textarea {
  min-height: 130px;
  max-height: 230px;
  max-width: 100%;
  min-width: 100%;
  padding: 12px 20px 0 48px;
}
form .message textarea::-webkit-scrollbar {
  width: 0px;
}
form .button-area {
  display: flex;
  float: right;
  flex-direction: row-reverse;
}
.button-area button {
  color: #fff;
  border: none;
  outline: none;
  font-size: 1.8rem;
  cursor: pointer;
  border-radius: 5px;
  padding: 13px 25px;
  background: linear-gradient(135deg, rgba(180, 99, 45, 0.95), rgba(217, 160, 102, 0.9));
  box-shadow: 0px 8px 18px rgba(12, 7, 4, 0.45);
  transition: 0.3s ease;
  font-family: "Nunito", sans-serif;
}
.button-area button:hover {
  background: linear-gradient(135deg, rgba(217, 160, 102, 0.95), rgba(180, 99, 45, 0.95));
}
.button-area span {
  font-size: 17px;
  padding: 1rem;
  display: none;
}
.button-area button i {
  position: relative;
  top: 6px;
  left: 2px;
  font-size: 1.5rem;
  transition: 0.3s;
  color: #fff;
}
.button-area button:hover i {
  left: 8px;
}
/* contact section media queries starts */
@media (max-width: 900px) {
  .contact {
    min-height: 70vh;
  }
  .contact .container {
    margin: 3rem 1rem 2rem 1rem;
  }
  .contact .container .content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.5rem;
  }
  .contact .content .image-box {
    display: block;
    max-width: 400px;
    margin: 0 auto;
  }
  .contact .content .image-box img {
    max-height: 300px;
  }
  .contact .content form {
    width: 100%;
    max-width: none;
    margin: 0;
  }
}

@media (max-width: 640px) {
  .contact .container {
    margin: 2rem 0.5rem;
  }
  .contact .container .content {
    padding: 1.5rem 1rem;
  }
  .contact .content .image-box {
    display: none;
  }
  .contact .content form {
    width: 100%;
  }
}
/* contact section media queries ends */
/* contact section ends */

/* footer section starts */
.footer {
  min-height: auto;
  padding-top: 0;
  background: linear-gradient(180deg, #1c120d 0%, #120a06 100%);
}
.footer .box-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.footer .box-container .box {
  flex: 1 1 25rem;
  margin: 2.5rem;
}
.footer .box-container .box h3 {
  font-size: 2.5rem;
  color: var(--earth-cream);
  padding-bottom: 1rem;
  font-weight: normal;
}
.footer .box-container .box p {
  font-size: 1.5rem;
  color: rgba(255, 235, 214, 0.78);
  padding: 0.7rem 0;
  text-transform: none;
}
.footer .box-container .box p i {
  padding-right: 1rem;
  color: var(--theme-accent);
}
.footer .box-container .box a {
  font-size: 1.5rem;
  color: rgba(255, 235, 214, 0.82);
  padding: 0.3rem 0;
  display: block;
  transition: color 0.3s ease;
}
.footer .box-container .box a:hover {
  color: var(--theme-accent);
}
.footer .box-container .box .share {
  display: flex;
  flex-wrap: wrap;
  padding: 1rem 0;
}
.footer .box-container .box .share a {
  height: 4rem;
  width: 4rem;
  padding: 1rem;
  text-align: center;
  border-radius: 5rem;
  font-size: 1.7rem;
  margin-right: 1rem;
  transition: 0.2s;
  background: rgba(255, 248, 238, 0.1);
  color: var(--earth-cream);
  border: 1px solid rgba(240, 179, 108, 0.25);
}
.footer .box-container .box .share a:hover {
  background: rgba(240, 179, 108, 0.2);
  transform: scale(0.98);
  border: 1px solid rgba(240, 179, 108, 0.4);
  color: var(--theme-accent-strong);
}
.footer .box-container .box .sponsor-cta {
  margin-top: 1.6rem;
}
.footer .box-container .box .sponsor-cta iframe {
  display: block;
  max-width: 100%;
}
.footer .credit {
  padding: 1rem 0 0 0;
  text-align: center;
  font-size: 1.5rem;
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  color: rgba(255, 235, 214, 0.85);
  border-top: 0.1rem solid rgba(255, 235, 214, 0.15);
}
.footer .credit a {
  color: var(--theme-accent);
}
.footer .fa {
  color: var(--theme-accent);
  margin: 0 0.3rem;
  font-size: 1.5rem;
  animation: pound 0.35s infinite alternate;
}
@-webkit-keyframes pound {
  to {
    transform: scale(1.1);
  }
}
@keyframes pound {
  to {
    transform: scale(1.1);
  }
}
@media (max-width: 450px) {
  .footer .box-container .box {
    margin: 1.5rem;
  }
  .footer .box-container .box p {
    padding: 0.7rem;
  }
  .footer .box-container .box .share a {
    padding: 1.2rem;
  }
}
/* footer section ends */

/* dark theme overrides */
:root[data-theme="dark"] {
  color-scheme: dark;
  --theme-bg: #140c08;
  --theme-surface: rgba(25, 15, 10, 0.94);
  --theme-surface-alt: rgba(33, 20, 13, 0.88);
  --theme-card: rgba(30, 18, 12, 0.9);
  --theme-text: #f8eadb;
  --theme-text-muted: #d0b79f;
  --theme-accent: #f0b36c;
  --theme-accent-strong: #d28a3c;
  --theme-accent-hover: #ba6d1f;
  --theme-chip-bg: rgba(240, 179, 108, 0.2);
  --theme-border: rgba(240, 179, 108, 0.32);
  --theme-glow: rgba(240, 179, 108, 0.28);
}

:root[data-theme="dark"] body {
  background-color: var(--theme-bg);
  color: var(--theme-text);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(210, 134, 70, 0.12), transparent 55%),
    radial-gradient(circle at 82% 12%, rgba(186, 109, 31, 0.12), transparent 60%),
    radial-gradient(circle at 55% 78%, rgba(84, 46, 24, 0.2), transparent 65%),
    repeating-linear-gradient(0deg, rgba(28, 16, 10, 0.65) 0, rgba(28, 16, 10, 0.65) 1px, transparent 1px, transparent 70px),
    repeating-linear-gradient(90deg, rgba(28, 16, 10, 0.65) 0, rgba(28, 16, 10, 0.65) 1px, transparent 1px, transparent 70px);
  background-attachment: fixed;
  background-size: cover;
}

:root[data-theme="dark"] header {
  background-color: rgba(22, 13, 8, 0.9);
  border-bottom: 1px solid var(--theme-border);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
}

:root[data-theme="dark"] header .theme-toggle {
  background-color: rgba(27, 16, 10, 0.95);
  border-color: var(--theme-border);
  color: var(--theme-accent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] header .theme-toggle:hover {
  box-shadow: 0 0 0 2px rgba(240, 179, 108, 0.28), 0 16px 30px rgba(0, 0, 0, 0.55);
}

:root[data-theme="dark"] header .logo {
  color: var(--theme-text);
}

:root[data-theme="dark"] header .logo i {
  color: var(--theme-accent);
}

:root[data-theme="dark"] header .navbar ul li a {
  color: var(--theme-text-muted);
}

:root[data-theme="dark"] header .navbar ul li a.active,
:root[data-theme="dark"] header .navbar ul li a:hover {
  text-shadow: 0 0 12px rgba(240, 179, 108, 0.45);
}

:root[data-theme="dark"] #menu {
  color: var(--theme-text);
}

:root[data-theme="dark"] .heading {
  color: var(--theme-text);
  text-shadow: 0 0 24px rgba(240, 179, 108, 0.2);
}

:root[data-theme="dark"] .heading span {
  color: var(--theme-accent);
  text-shadow: 0 0 18px rgba(240, 179, 108, 0.35);
}

:root[data-theme="dark"] .home {
  background:
    radial-gradient(circle at 15% 20%, rgba(240, 179, 108, 0.18), transparent 55%),
    radial-gradient(circle at 85% 15%, rgba(186, 109, 31, 0.18), transparent 55%),
    linear-gradient(135deg, #22140c 0%, #110905 100%);
}

:root[data-theme="dark"] .home::before {
  background: linear-gradient(135deg, rgba(240, 179, 108, 0.12), rgba(140, 78, 34, 0.12));
}

:root[data-theme="dark"] .home .btn {
  background: rgba(240, 179, 108, 0.12);
  border: 1px solid var(--theme-border);
  color: var(--theme-accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

:root[data-theme="dark"] .home .btn:hover {
  background: rgba(240, 179, 108, 0.22);
}

:root[data-theme="dark"] .home .content h1,
:root[data-theme="dark"] .home .content h2,
:root[data-theme="dark"] .home .content p {
  color: var(--theme-text);
  text-shadow: 0 0 20px rgba(240, 179, 108, 0.18);
}

:root[data-theme="dark"] .home .content h1 span,
:root[data-theme="dark"] .home .content h2 span,
:root[data-theme="dark"] .home .content p span {
  color: var(--theme-accent);
  text-shadow: 0 0 24px rgba(240, 179, 108, 0.4);
}

:root[data-theme="dark"] .social-icons a {
  background-color: rgba(24, 14, 9, 0.85);
  border: 1px solid var(--theme-border);
  color: var(--theme-accent);
}

:root[data-theme="dark"] .social-icons a:hover {
  background-color: rgba(240, 179, 108, 0.2);
  color: var(--theme-accent);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.55);
}

:root[data-theme="dark"] .about {
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(3, 17, 32, 0.6);
}

:root[data-theme="dark"] .about .row .image img {
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(51, 255, 153, 0.25);
}

:root[data-theme="dark"] .skills {
  background: linear-gradient(160deg, rgba(2, 20, 34, 0.95), rgba(1, 8, 16, 0.95));
}

:root[data-theme="dark"] .skills .container {
  background: rgba(4, 18, 32, 0.75);
  border: 1px solid var(--theme-border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

:root[data-theme="dark"] .skills .container .bar {
  background: rgba(28, 18, 13, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

:root[data-theme="dark"] .skills .container .bar:hover {
  background-color: rgba(40, 24, 16, 0.95) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.55) !important;
}

:root[data-theme="dark"] .education .box-container .box {
  background: rgba(27, 16, 10, 0.9);
  color: var(--theme-text);
  border: 1px solid var(--theme-border);
  box-shadow: 0 15px 38px rgba(0, 0, 0, 0.45);
}

:root[data-theme="dark"] .work {
  background: linear-gradient(160deg, #20110b 0%, #0b0503 100%);
}

:root[data-theme="dark"] .work .box-container .box {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
}

:root[data-theme="dark"] .work .box-container .box .content {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

:root[data-theme="dark"] .work .desc p {
  color: var(--theme-text-muted);
}

:root[data-theme="dark"] .work .desc .btns .btn {
  background: var(--theme-accent-strong);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.55);
}

:root[data-theme="dark"] .work .desc .btns .btn:hover {
  background: var(--theme-accent-hover);
}

:root[data-theme="dark"] .work .viewall .btn {
  border: 2px solid var(--theme-accent);
  color: var(--theme-accent);
  background: rgba(24, 14, 9, 0.85);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
}

:root[data-theme="dark"] .work .viewall .btn:hover {
  background: var(--theme-accent);
  color: #03120f;
}

:root[data-theme="dark"] .experience .timeline .timeline-card {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

:root[data-theme="dark"] .experience .timeline .timeline-card .desc p {
  color: var(--theme-text-muted);
}

:root[data-theme="dark"] .morebtn .btn {
  color: #03120f;
  background: var(--theme-accent-strong);
}

:root[data-theme="dark"] .morebtn .btn:hover {
  background: var(--theme-accent-hover);
}

:root[data-theme="dark"] .contact .container {
  border: 1px solid var(--theme-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

:root[data-theme="dark"] .contact .button-area button {
  background: var(--theme-accent-strong);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
}

:root[data-theme="dark"] .contact .button-area button:hover {
  background: var(--theme-accent-hover);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.6);
}

:root[data-theme="dark"] .footer {
  background: radial-gradient(circle at 20% 20%, rgba(240, 179, 108, 0.1), transparent 60%),
    radial-gradient(circle at 80% 0%, rgba(140, 78, 34, 0.12), transparent 65%),
    #0d0603;
  border-top: 1px solid var(--theme-border);
}

:root[data-theme="dark"] .footer .box-container .box p i,
:root[data-theme="dark"] .footer .box-container .box a:hover,
:root[data-theme="dark"] .footer .credit a {
  color: var(--theme-accent);
}

:root[data-theme="dark"] .footer .box-container .box .share a {
  background: rgba(24, 14, 9, 0.9);
  color: var(--theme-accent);
  border: 1px solid var(--theme-border);
}

:root[data-theme="dark"] .footer .box-container .box .share a:hover {
  background: rgba(240, 179, 108, 0.18);
  border-color: var(--theme-border);
  color: var(--theme-accent);
}

/* common media queries starts*/
@media (max-width: 450px) {
  html {
    font-size: 55%;
  }
  body {
    padding-right: 0;
  }
  section {
    padding: 1.2rem;
    margin: 1.2rem auto;
  }
}
/* common media queries ends*/

/* scroll top starts */
#scroll-top {
  position: fixed;
  top: -140%;
  right: 2rem;
  padding: 1rem 1.5rem;
  font-size: 2rem;
  background: var(--theme-accent-strong);
  color: #1c120d;
  border-radius: 50%;
  transition: 1s linear;
  z-index: 1000;
}
#scroll-top.active {
  top: calc(100% - 12rem);
}
/* scroll top ends */

.company-icon {
  width: 75px;  /* Adjust size as needed */
  height: 75px;
  object-fit: contain;  /* Maintains aspect ratio */
  vertical-align: middle;
  margin-right: 10px;
  border-radius: 50%;  /* Optional: makes icons circular */
}

/* Optional: Add hover effect */
.company-icon:hover {
  transform: scale(1.2);
  transition: transform 0.3s ease;
}
/* scroll top ends */

/* Contact image display fix */
.contact .image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
}

.contact .image-box {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact .content .image-box img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}
