/* ===== Theme variables (Light mode = default) ===== */
:root {
  --bg-color: #ffffff;
  --text-color: #212529;
  --text-muted: #333;
  --card-bg: #ffffff;
  --card-border: #ddd;
  --table-border: #f0f0f0;
  --table-hover-bg: #f9f5ff;
  --mobile-table-border: #e8e8e8;
  --navbar-bg: #6f42c1;
  --footer-bg: #6f42c1;
  --icon-color: #212529;
  --accent-color: #6f42c1;
}

/* ===== Theme variables (Dark mode) ===== */
[data-theme="dark"] {
  --bg-color: #171320;
  --text-color: #f2f0f7;
  --text-muted: #b9b3c9;
  --card-bg: #211d30;
  --card-border: rgba(255, 255, 255, 0.08);
  --table-border: rgba(255, 255, 255, 0.08);
  --table-hover-bg: rgba(255, 255, 255, 0.05);
  --mobile-table-border: rgba(255, 255, 255, 0.08);
  --navbar-bg: #211735;
  --footer-bg: #211735;
  --icon-color: #f1f1f1;
  --accent-color: #a78bfa;
}

/* Smooth transition when switching themes */
body,
.custom-card,
.custom-navbar,
footer,
.skill-table tr,
.about-skill-table tr {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Universal box-sizing for all elements including pseudo-elements */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* HTML & Body - Full width, no horizontal scroll */
html,
body {
  width: 100%;
  overflow-x: hidden;
  background-color: var(--bg-color);
  color: var(--text-color);
}

html {
  font-size: 93.75%;
}

/* Responsive images - Maintain aspect ratio */
img {
  max-width: 100%;
  height: auto;
}

/* Container for navigation - aligns items to right */
.nav-wrapper {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

/* Custom navbar styling - purple background with left border radius */
.custom-navbar {
  background-color: var(--navbar-bg);
  border-bottom-left-radius: 4px;
  min-width: min(450px, 100%);
  width: auto;
}

/* Dark mode toggle button - minimal ring + dot style */
.dark-toggle-btn {
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: transparent;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 100px;
  padding: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.dark-toggle-btn .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.dark-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

/* When dark mode is active, hollow out the dot so the ring looks "off" */
[data-theme="dark"] .dark-toggle-btn .dot {
  background: transparent;
  border: 2px solid #fff;
  width: 6px;
  height: 6px;
}


/* Mouse cursor smoke trail effect */
.cursor-smoke-container {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  pointer-events: none;
  overflow: hidden;
}

.cursor-smoke-particle {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: rgba(129, 64, 220, 0.9);
  filter: blur(7px);
  opacity: 0;
  will-change: transform, opacity;
}

.cursor-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(129, 64, 220, 0.72);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(129, 64, 220, 0.16);
  opacity: 0;
  transform: translate3d(0, 0, 0);
  translate: -50% -50%;
  transition: opacity 180ms ease;
  will-change: transform;
}

.cursor-ring.is-visible {
  opacity: 0.82;
}

/* Navigation links - white text with spacing */
.nav-link {
  color: white;
  margin-left: 20px;
  margin-right: 20px;
  padding-left: 10px;
  white-space: nowrap;
}

/* Navigation link hover effect - reduced opacity */
.nav-link:hover {
  opacity: 0.8;
}

/* Name/Title highlighting - purple with responsive font */
.name-highlight {
  color: var(--accent-color);
  font-size: clamp(1.45rem, 5vw, 1.875rem);
}

/* Container for hero illustration - centers content */
.illustration-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: clamp(250px, 42vw, 400px);
  position: relative;
}

/* Background icons - rotating animation effect */
.bg-icons {
  position: absolute;
  width: min(80%, 450px);
  max-width: 450px;
  animation: rotateIcons 40s linear infinite;
}

/* Main character/illustration - centered with max width */
.main-character {
  position: relative;
  width: min(65%, 300px);
  max-width: 300px;
}

/* Animation - 360 degree rotation */
@keyframes rotateIcons {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Main container - top padding for spacing */
.main-container {
  padding-top: 50px;
}

/* Section header illustration - fixed width with bottom margin */
.header-illustration {
  width: 180px;
  margin-bottom: 15px;
}

/* Section title styling - light purple text */
.contribution-title {
  color: var(--accent-color);
  font-weight: 200;
}

/* Card base styling - flex column layout with rounded corners */
.custom-card {
   position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  padding: clamp(18px, 3vw, 24px);
  max-width: 360px;
  width: 100%;
  background: var(--card-bg);
  color: var(--text-color);
  height: 100%;
}
.custom-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--angle), transparent 50%, #6f42c1);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.2s ease;
  animation: rotate 2.5s linear infinite paused;
  z-index: -1;
}

.custom-card:hover::before {
  opacity: 1;
  animation-play-state: running;

}
.custom-card:hover {
  box-shadow: 0 10px 40px rgba(87, 20, 212, 0.2);
  border: 1px solid #9d98aa;
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes rotate {
  to { --angle: 360deg; }
}

/* Brand/Company logo - centered with responsive height */
.brand-logo {
  display: block;
  max-height: 76px;
  width: auto;
  margin: 0 auto 18px;
}

/* Container for logo - ensures consistent height across cards */
.logo-area {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card heading - consistent sizing */
.custom-card h5 {
  font-size: 1.05rem;
  min-height: 26px;
}

/* Card description text - improved readability */
.custom-card p {
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 10px !important;
}

.expandable-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.expandable-description.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
}

.see-more-btn {
  align-self: flex-start;
  border: 0;
  background: transparent;
  color: var(--accent-color);
  font-weight: 700;
  padding: 0;
  margin-bottom: 18px;
  cursor: pointer;
}

.see-more-btn:hover {
  color: #430aab;
  text-decoration: underline;
}
.btn-visit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  min-height: 38px;
  padding: 6px 32px;
  border-radius: 50px;
  text-decoration: none;
  max-width: 100%;
  text-align: center;
}
.button-area {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding-top: 8px;
}
.btn-visit:hover {
  background-color: #6f42c1;
  color: white;
  box-shadow: 0 4px 10px rgba(111, 66, 193, 0.2);
}

/* Download CV Button */

.btn-download-cv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 24px;
  border-radius: 50px;
  background-color: #6f42c1;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(111, 66, 193, 0.18);
  transition: 0.3s;
}

.btn-download-cv:hover {
  background-color: #5722b9;
  color: #fff;
  box-shadow: 0 6px 14px rgba(111, 66, 193, 0.24);
}

/* Footer base - pink/purple background with padding */
footer {
  background-color: var(--footer-bg);
  color: white;
  padding: 50px 0 60px 0;
  margin-top: 15px;
}

/* Footer links - white color with small text */
footer a {
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
}

/* Social media icons - large size with spacing */
.social-icons a {
  font-size: 2.5rem;
  margin-left: 15px;
  transition: 0.3s;
}

/* Social icons hover - opacity effect */
.social-icons a:hover {
  opacity: 0.8;
}

/* Copyright text - small font with margin */
.copyright {
  font-size: 0.9rem;
  padding-top: 1px;
  margin-top: 20px;
}

/* Intro and description text - wraps long words */
.intro-text,
.description {
  overflow-wrap: anywhere;
}

/* Skill tables - full width layout */
.skill-table,
.about-skill-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* Table cells - top aligned with word wrapping */
.skill-table td,
.about-skill-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
  padding: 12px;
  border-bottom: 1px solid var(--table-border);
  color: var(--text-color);
}

/* Table rows - hover effect */
.skill-table tr,
.about-skill-table tr {
  transition: background-color 0.3s ease;
}

.skill-table tr:hover,
.about-skill-table tr:hover {
  background-color: var(--table-hover-bg);
}

/* First column in skill tables - bold label styling */
.skill-table td:first-child,
.about-skill-table td:first-child {
  font-weight: 600;
  min-width: 160px;
  color: var(--accent-color);
  width: 160px;
}

/* Middle separator column */
.skill-table td:nth-child(2),
.about-skill-table td:nth-child(2) {
  width: 30px;
  text-align: center;
  color: #999;
  padding: 12px 8px;
}

/* Profile photo - fixed dimensions with cover fit */
.profile-photo {
  width: 180px;
  height: 200px;
  object-fit: cover;
  border-color: #f3e5f5;
  flex: 0 0 auto;
}

/* Experience section images - contained within bounds */
.experience-section img {
  max-width: 160px;
  object-fit: contain;
}

@media (max-width: 991.98px) {
  /* Navbar spans full width on tablets */
  .nav-wrapper {
    justify-content: stretch;
    padding-top: 10px;
  }

  /* Navbar full width with bottom rounded corners */
  .custom-navbar {
    width: 100%;
    border-radius: 0 0 4px 4px;
  }

  /* Navigation items stack with adjusted padding */
  .navbar-nav {
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 0 8px;
  }

  /* Navigation links - no side margins, can wrap */
  .nav-link {
    margin: 0;
    padding: 8px 0;
    white-space: normal;
  }
}

@media (max-width: 767.98px) {
  html {
    font-size: 90%;
  }

  /* Slightly smaller body text for mobile */
  body {
    font-size: 0.95rem;
  }

  /* Reduced container padding on mobile */
  .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  body > .container:first-child {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  body > .container:first-child .nav-wrapper {
    padding-top: 0;
  }

  body > .container:first-child .custom-navbar {
    border-radius: 0;
  }

  /* Smaller hero illustration area */
  .illustration-wrapper {
    min-height: 250px;
    margin-top: 7px;
  }

  .main-character,
  .profile-photo {
    aspect-ratio: 1 / 1;
    border-radius: 50% !important;
    object-fit: cover;
  }

  .main-character {
    width: min(68vw, 250px);
    height: min(68vw, 250px);
  }

  .profile-photo {
    width: min(180px, 60vw);
    height: min(180px, 60vw);
  }

  /* Reduced top padding on mobile */
  .main-container {
    padding-top: 28px;
  }

  /* Smaller header illustrations on mobile */
  .header-illustration {
    width: min(150px, 55vw);
  }

  /* Remove table-responsive horizontal scroll on mobile */
  .table-responsive {
    overflow-x: visible !important;
  }

  /* Skill tables - card-like layout for mobile */
  .skill-table,
  .about-skill-table {
    display: flex !important;
    flex-direction: column;
    border-spacing: 0;
  }

  .skill-table tr,
  .about-skill-table tr {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--mobile-table-border);
    margin-bottom: 10px;
    align-items: stretch;
  }

  .skill-table tr:last-child,
  .about-skill-table tr:last-child {
    margin-bottom: 0;
  }

  .skill-table tr:hover,
  .about-skill-table tr:hover {
    background-color: var(--table-hover-bg);
    border-color: #d4b5f3;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.1);
  }

  /* Mobile table cells */
  .skill-table td,
  .about-skill-table td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    width: 100% !important;
    text-align: left;
  }

  /* Label styling for mobile */
  .skill-table td:first-child,
  .about-skill-table td:first-child {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
  }

  /* Hide the colon separator on mobile */
  .skill-table td:nth-child(2),
  .about-skill-table td:nth-child(2) {
    display: none !important;
  }

  /* Values styling for mobile */
  .skill-table td:nth-child(3),
  .about-skill-table td:nth-child(3) {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.6;
  }

  /* Center align card content on mobile */
  .custom-card {
    text-align: center !important;
  }

  /* Full width download button on mobile */
  .btn-download-cv {
    width: 100%;
  }

  /* Adjusted footer padding on mobile */
  footer {
    padding: 32px 0 38px;
    text-align: center;
  }

  /* Center align footer text on mobile */
  footer .text-start,
  footer .text-md-end {
    text-align: center !important;
  }

  /* Smaller social icons with reduced spacing */
  .social-icons a {
    margin: 0 8px;
    font-size: 2rem;
  }
}

@media (max-width: 575.98px) {
  /* Profile photo responsive sizing for small screens */
  .profile-photo {
    width: min(180px, 70vw);
    height: min(180px, 70vw);
    aspect-ratio: 1 / 1;
  }

  /* Reduced left margin for experience section */
  .experience-section .ms-4 {
    margin-left: 1rem !important;
  }

  /* Reduced padding for experience list items */
  .experience-section ul {
    padding-left: 1rem;
  }
}

/* ===== Projects Pagination ===== */
.projects-pagination {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.pagination-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 100%;
}

.proj-page-item {
  display: flex;
}

.proj-page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 50px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-color);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.proj-page-btn:hover:not(:disabled) {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

.proj-page-item.active .proj-page-btn {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
  font-weight: 600;
}

.proj-page-item.disabled .proj-page-btn {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--card-bg);
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .proj-page-btn {
    min-width: 34px;
    height: 34px;
    font-size: 0.85rem;
    padding: 0 8px;
  }

  .pagination-list {
    gap: 6px;
  }
}
