:root {
  --bg-black: #000000;
  --bg-white: #ffffff;
  --text-white: #ffffff;
  --text-black: #000000;
  --accent: #fff;
}
/* Global */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  background: var(--bg-white);
  color: var(--text-black);
  scroll-behavior: smooth;
}
.reduced-motion * {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}
.bg-black {
  background: var(--bg-black) !important;
}
.bg-white {
  background: var(--bg-white) !important;
}

.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hero {
  min-height: 100vh;
  padding-top: 90px;
  position: relative;
  background: radial-gradient(
      ellipse at 20% 10%,
      rgba(255, 255, 255, 0.03),
      transparent 20%
    ),
    radial-gradient(
      ellipse at 80% 90%,
      rgba(255, 255, 255, 0.02),
      transparent 25%
    ),
    linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.95) 100%);
}
.hero-avatar {
  display: inline-block;
  border-radius: 50%;

  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  transform-origin: center center;
  transition: transform 300ms cubic-bezier(0.2, 0.9, 0.3, 1),
    box-shadow 280ms ease;
  will-change: transform;
}
.hero-avatar:hover {
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .hero-avatar,
  .hero-avatar:hover {
    transition: none !important;
    transform: none !important;
    will-change: auto !important;
  }
}
.hero .tagline {
  max-width: 720px;
  margin: 0 auto;
}
.accent {
  color: var(--text-white);
}

/* hero accent underline animation */
.hero-title {
  position: relative;
}
.hero-title:after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -10px;
  width: 0;
  height: 4px;
  background: #f8f6f6;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.hero-title.revealed:after {
  width: 120px;
}

.cursor {
  display: inline-block;
  margin-left: 6px;
  opacity: 0.95;
  animation: blink 1s steps(2, end) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

.section {
  padding: 90px 0;
}
.section .section-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

/* Contact illustration layout */
.contact-row {
  gap: 2rem;
}
.contact-info {
  padding-right: 2rem;
}
.contact-illustration-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* push illustration to the right */
  padding-right: 6rem; /* keep comfortable empty space on the right */
}
.contact-illustration {
  width: 100%;
  max-width: 920px; /* wide aspect friendly */
  height: auto;

  filter: none;
}

/* Keep right side open on larger screens: center illustration slightly left inside column */
@media (min-width: 992px) {
  .contact-illustration {
    max-width: 820px;
    transform: none;
  }
}

@media (max-width: 767px) {
  .contact-illustration {
    max-width: 100%;
    transform: none;
    margin-top: 1.5rem;
  }
  .contact-info {
    padding-right: 0;
  }
}

.current-card {
  max-width: 520px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.skill-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
.skill-card h5 {
  margin-bottom: 6px;
}

/* Reveal stagger helpers */
.reveal {
  will-change: opacity, transform;
}

.skills-grid .skill-card:hover {
  transform: translateY(-8px) scale(1.02);
}

/* project card tilt */
.project-card {
  transform-style: preserve-3d;
}
.project-card .card-body,
.project-card .card-footer {
  transform: translateZ(20px);
}

/* button micro-animations */
.btn-outline-light {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn-outline-light:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
}

/* subtle footer link glow on hover */
.site-footer a:hover {
  text-decoration: none;
  filter: brightness(1.05);
}

.project-card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}

.card-img-top {
  height: 160px;
  object-fit: cover;
}

.tech {
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.7);
}

/* Floating animation for cards */
.floaty {
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Back to top */
#backTop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text-black);
  color: var(--text-white);
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 60;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Skills grid (static icons) */
.skills-grid .skill-card {
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0);
  transition: transform 0.35s ease;
}
.skill-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.skill-card strong {
  margin-top: 6px;
}
@media (max-width: 576px) {
  .skill-img {
    width: 54px;
    height: 54px;
  }
}

/* skills subtle reveal pop */
.skills-grid .skill-card {
  transition: transform 0.36s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.36s;
}
.skills-grid .skill-card.revealed {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0);
}

/* About / Professional polishing */
.about-card,
.pro-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(8px);
}
.about-card h2,
.pro-card h3 {
  letter-spacing: -0.02em;
}
.about-list li {
  margin-bottom: 6px;
}
.focus-list .focus-item .progress {
  background: rgba(255, 255, 255, 0.03);
}
.pro-card .progress-bar {
  box-shadow: none;
}
@media (min-width: 992px) {
  .mongo {
    width: 40px;
    height: 40px;
  }
  .about-card,
  .pro-card {
    padding: 48px;
  }
}

/* Font Awesome skill icons animation */
.skill-icon {
  color: #000; /* black on white card */
  transition: transform 0.35s ease, filter 0.35s ease;
  display: inline-block;
}

@keyframes skill-bob {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes skill-pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  60% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

/* Apply a gentle bobbing animation after reveal */
.skills-grid .skill-card.revealed .skill-icon {
  animation: skill-pop 420ms cubic-bezier(0.2, 0.9, 0.3, 1) both,
    skill-bob 5.6s ease-in-out 0.6s infinite;
}

/* Hover emphasis */
.skills-grid .skill-card:hover .skill-icon {
  transform: translateY(-6px) scale(1.08) rotate(-6deg);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.12));
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .skills-grid .skill-card.revealed .skill-icon,
  .skills-grid .skill-card:hover .skill-icon {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    filter: none !important;
  }
}

/* 3D Orbit skills visuals */
.skills-3d {
  background: linear-gradient(180deg, #050506 0%, #0c0c0d 100%);
}
.orbit-wrapper {
  position: relative;
  padding: 36px 0 12px;
}
.orbit-scene {
  /* Fill available width so orbit centers on the viewport rather than a narrow container */
  width: 100%;
  max-width: none;
  margin: 0;
  height: 380px;
  perspective: 1200px;
  position: relative;
}
.orbit-scene {
  /* center its child orbit using flexbox so the orbit stays visually centered
     regardless of internal absolute positioning or size changes */
  display: flex;
  align-items: center;
  justify-content: center;
}
.orbit {
  /* Fill the available scene width so the computed center aligns with the
     visual center of the scene. JS positions children relative to this box. */
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: none;
}

@keyframes orbit-rotate {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(360deg);
  }
}

.skills-3d .skill {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: center center;
  will-change: transform, filter;
}
.skills-3d .skill-inner {
  transform-style: preserve-3d;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #fff;
  /* show icons without a card background */
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transform-origin: center;
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.28s,
    filter 0.28s;
  min-width: 180px;
  min-height: 180px;
  justify-content: center;
}
.skills-3d .skill .skill-label {
  font-size: 1rem;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}
.skills-3d .skill-inner i {
  color: #7fffd4;
  /* make icons larger and more prominent */
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 10px 26px rgba(0, 255, 200, 0.06));
}

/* gentle floating animation for icons and labels */
@keyframes floaty {
  0% {
    transform: translateY(0) translateX(0);
  }
  25% {
    transform: translateY(-8px) translateX(-3px);
  }
  50% {
    transform: translateY(0) translateX(0);
  }
  75% {
    transform: translateY(6px) translateX(3px);
  }
  100% {
    transform: translateY(0) translateX(0);
  }
}

/* spin animation removed - icons are steady */

/* Apply floating to the inner children so JS can still set transform on .skill-inner */
.skills-3d .skill-inner > .skill-label {
  animation-name: floaty;
  animation-duration: 4.6s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-delay: var(--float-delay, 0ms);
  will-change: transform;
}

/* icons: float + spin around their center */
.skills-3d .skill-inner > i {
  animation-name: floaty, spin;
  animation-duration: 4.6s, 6s;
  animation-iteration-count: infinite, infinite;
  animation-timing-function: ease-in-out, linear;
  animation-delay: var(--float-delay, 0ms), 0ms;
  will-change: transform;
  transform-origin: 50% 50%;
}

@media (prefers-reduced-motion: reduce) {
  .skills-3d .skill-inner > .skill-label,
  .skills-3d .skill-inner > i {
    animation: none !important;
  }
}

/* Slightly reduce sizes on small screens to prevent overlap */
@media (max-width: 640px) {
  .skills-3d .skill-inner {
    min-width: 120px;
    min-height: 120px;
    padding: 10px 12px;
  }
  .mongo {
    width: 30px;
    height: 30px;
  }
  .skills-3d .skill-inner i {
    font-size: 36px;
  }
}

/* Per-skill brand colors */
.skills-3d .skill[data-skill="HTML"] .skill-inner i {
  color: #e34f26;
  filter: drop-shadow(0 10px 28px rgba(227, 79, 38, 0.09));
}
.skills-3d .skill[data-skill="CSS"] .skill-inner i {
  color: #1572b6;
  filter: drop-shadow(0 10px 28px rgba(21, 114, 182, 0.08));
}
.skills-3d .skill[data-skill="JavaScript"] .skill-inner i {
  color: #f7df1e;
  filter: drop-shadow(0 10px 28px rgba(247, 223, 30, 0.09));
}
.skills-3d .skill[data-skill="React"] .skill-inner i {
  color: #61dafb;
  filter: drop-shadow(0 10px 28px rgba(97, 218, 251, 0.08));
}
.skills-3d .skill[data-skill="Node.js"] .skill-inner i {
  color: #3c873a;
  filter: drop-shadow(0 10px 28px rgba(60, 135, 58, 0.08));
}
.skills-3d .skill[data-skill="MongoDB"] .skill-inner i {
  color: #47a248;
  filter: drop-shadow(0 10px 28px rgba(71, 162, 72, 0.08));
}
.skills-3d .skill[data-skill="SQL"] .skill-inner i {
  color: #003b57;
  filter: drop-shadow(0 10px 28px rgba(0, 59, 87, 0.08));
}
.skills-3d .skill[data-skill="Bootstrap"] .skill-inner i {
  color: #7952b3;
  filter: drop-shadow(0 10px 28px rgba(121, 82, 179, 0.08));
}
.skills-3d .skill[data-skill="Git"] .skill-inner i {
  color: #f05032;
  filter: drop-shadow(0 10px 28px rgba(240, 80, 50, 0.08));
}
.skills-3d .skill[data-skill="GitHub"] .skill-inner i {
  color: #ffffff;
  filter: drop-shadow(0 10px 28px rgba(255, 255, 255, 0.06));
}

/* Ensure orbit and nodes allow visible transforms (no clipping) */
.orbit {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
  /* JS-driven rotation (disable CSS rotate animation) */
  animation: none !important;
}
/* Prevent flipped/backface issues so labels/icons remain readable */
.skills-3d .skill,
.skills-3d .skill-inner {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* hover / active */
.skills-3d .skill:hover .skill-inner,
.skills-3d .skill.active .skill-inner {
  transform: translateZ(32px) scale(1.08);
  box-shadow: 0 30px 80px rgba(0, 255, 220, 0.06),
    0 8px 36px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.12);
  filter: saturate(1.08) drop-shadow(0 14px 40px rgba(0, 200, 180, 0.08));
}

.skills-3d .skill-inner {
  pointer-events: auto;
}

/* pause on hover of the whole scene */
.skills-3d:hover .orbit {
  animation-play-state: paused;
}

/* neon streak background */
.orbit-scene:before {
  content: "";
  position: absolute;
  left: -10%;
  top: 6%;
  width: 120%;
  height: 120%;
  background: radial-gradient(
      ellipse at 20% 10%,
      rgba(0, 255, 200, 0.04),
      transparent 12%
    ),
    radial-gradient(
      ellipse at 80% 90%,
      rgba(0, 160, 255, 0.03),
      transparent 18%
    );
  pointer-events: none;
}

/* make the scene feel deeper with a subtle vignette */
.orbit-scene:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  box-shadow: inset 0 80px 160px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .orbit {
    animation: none !important;
  }
}

/* project overlay */
.project-card {
  position: relative;
  overflow: hidden;
}
.project-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.9));
  transform: translateY(100%);
  transition: transform 0.36s ease;
}
.project-card:hover .project-overlay {
  transform: translateY(0);
}
.project-overlay .overlay-content {
  backdrop-filter: blur(2px);
}
.tech-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tech-tag {
  background: #fff;
  color: #000;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
}

/* tools grid */
.tools-grid .tool-card {
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
  transition: transform 0.28s ease;
}
.tools-grid .tool-card:hover {
  transform: translateY(-8px);
}
.tools-grid .tool-card h6 {
  margin-top: 8px;
  margin-bottom: 6px;
}

/* Tools & Deployment enhancements */
.tools-panel .deployment-steps {
  padding-left: 1.05rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}
.deploy-step {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.deploy-badges .badge {
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 600;
}
.tool-ic {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* ensure FontAwesome icons inside tool-cards are sized and centered */
.tool-card .tool-ic {
  font-size: 26px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto 8px;
  color: #111;
}

@media (max-width: 991px) {
  .tools-panel {
    margin-bottom: 12px;
  }
}

/* AI Tools grid */
.ai-grid .ai-card {
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  cursor: default;
}
.ai-grid .ai-card:focus,
.ai-grid .ai-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 60px rgba(2, 6, 23, 0.12);
}
.ai-card .ai-icon {
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.01));
}

/* reveal + subtle pop animation with stagger using --i */
.ai-card.reveal {
  opacity: 0;
  transform: translateY(12px) scale(0.995);
  animation: ai-reveal 420ms cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
  animation-delay: calc(var(--i, 1) * 80ms);
}

@keyframes ai-reveal {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.995);
  }
  60% {
    opacity: 1;
    transform: translateY(-6px) scale(1.02);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* small pulsing micro-animation for icons */
@keyframes ai-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}
.ai-card .ai-icon i {
  animation: ai-pulse 3.8s ease-in-out 1s infinite;
}

@media (max-width: 575px) {
  .ai-card .ai-icon {
    width: 48px;
    height: 48px;
  }
}

/* subtle hover floating for project cards and current card */
.project-card,
.current-card {
  transition: transform 0.45s cubic-bezier(0.22, 0.9, 0.39, 1);
}
.project-card:hover,
.current-card:hover {
  transform: translateY(-10px) scale(1.01);
}

/* header link styles */
.navbar .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
}
.navbar .nav-link:hover {
  color: var(--text-white) !important;
}

/* light theme sections to ensure pure black/white palette */
.bg-white,
.site-footer {
  background: var(--bg-white);
  color: var(--text-black);
}
.bg-black {
  color: var(--text-white);
}

/* Responsive tweaks */
@media (max-width: 767px) {
  .hero .hero-title {
    font-size: 1.6rem;
  }
  .card-img-top {
    height: 140px;
  }
}

/* subtle animated gradient underline for headings */
.section-title {
  position: relative;
  padding-bottom: 0.75rem;
}
.section-title:after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #fff 0%, #000 100%);
}

/* small accessibility focus outlines */
a:focus,
button:focus {
  outline: 3px solid rgba(255, 255, 255, 0.08);
  outline-offset: 3px;
}

/* Prevent unexpected horizontal overflow and ensure full-width layout */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* remove default body margin which can create tiny scroll gaps */
body {
  margin: 0;
}

/* Footer redesign */
.footer-dark {
  background: #020202;
  color: #e9eef5;
  position: relative;
  overflow: hidden;
}
.footer-dark .container {
  z-index: 2;
  position: relative;
}
.footer-bg-hero {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  font-size: 8vw;
  color: rgba(255, 255, 255, 0.03);
  font-weight: 800;
  letter-spacing: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}
.footer-name {
  font-weight: 700;
  color: #fff;
}
.footer-dark a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}
.footer-dark a:hover {
  text-decoration: underline;
}

/* Marquee */
.marquee-wrap {
  overflow: hidden;
  margin-top: 6px;
}
.marquee {
  width: 100%;
  overflow: hidden;
}
.marquee-track {
  display: inline-block;
  white-space: nowrap;
}
.marquee-item {
  display: inline-block;
  margin-right: 24px;
  font-weight: 700;
  color: #bcd3ff;
}
.marquee-track {
  animation: marquee-left 12s linear infinite;
}
.special-name{
  color: #fff;
  font-weight: 800;
  letter-spacing: 2px;
  font-size: larger;
  padding-top: 20px;
}
@keyframes marquee-left {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-33.333%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
  .ai-card .ai-icon i {
    animation: none;
  }
}

@media (max-width: 767px) {
  .footer-bg-hero {
    font-size: 96px;
    left: 20%;
  }
}
