/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  transition: background 0.3s ease, color 0.2s ease;
}

/* ===== THEME VARIABLES ===== */
:root {
    overflow-x: hidden;
    --bg: #e8efff;
    --card: #f6f8ff;
    --text: #1f2b4d;
    --muted: #4f628e;
    --accent: #1c4ed8;
    --border-light: #c7d7ff;
  }

  body.dark {
    --bg: #0a1023;
    --card: #121d3b;
    --text: #e8efff;
    --muted: #a8bbec;
    --accent: #5f8dff;
    --border-light: #2d3f73;
  }

  body[data-expertise="ethical"] {
    --bg: #ffffff;
    --card: #f4f0ff;
    --text: #27164d;
    --muted: #5a4a83;
    --accent: #6343c5;
    --border-light: #d9ceff;
  }

  body.dark[data-expertise="ethical"] {
    --bg: #0f0a1c;
    --card: #18102a;
    --text: #f1e9ff;
    --muted: #c3b3ee;
    --accent: #6fdd53d7;
    --border-light: #36235f;
  }
  
  /* ===== NAVBAR ===== */
  .navbar {
    background: var(--card) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  }
  
  .nav-link {
    color: var(--muted);
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    line-height: 1.5;
    display: flex;
    align-items: center;
  }
  
  .nav-link.active {
    color: var(--accent);
  }
  
  body.dark .nav-link.active {
    color: #F2EBDC;
  }
  
  .navbar-toggler {
    border-color: var(--accent);
  }
  
  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0,0,128,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  }
  
  body.dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(242,235,220,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  }
  
  
  /* ===== NAVBAR ALIGNMENT FIXES ===== */
  .navbar-nav {
    align-items: center !important;
  }
  
  .nav-item {
    display: flex;
    align-items: center;
  }
  
  /* ===== THEME SWITCH with SUN/MOON icons ===== */
  .switch {
    position: relative;
    width: 85px;
    height: 33px;
    display: inline-block;
    vertical-align: middle;
  }
  
  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: var(--card);
    border-radius: 35px;
    border: 2px solid var(--border-light);
    cursor: pointer;
    transition: 0.35s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    box-sizing: border-box;
  }
  
  .slider i {
    font-size: 18px;
    color: var(--muted);
    z-index: 2;
    transition: 0.2s;
  }
  
  .slider .fa-sun { 
    color:rgb(255, 187, 78); 
  }
  
  .slider .fa-moon { 
    color: #b0b0d0; 
  }
  
  body.dark .slider .fa-sun { 
    color: #777; 
  }
  
  body.dark .slider .fa-moon { 
    color:rgb(255, 187, 78);
  }
  
  .slider:before {
    content: "";
    position: absolute;
    height: 24px;
    width: 24px;
    background: var(--accent);
    top: 2px;
    left: 2px;
    border-radius: 50%;
    transition: 0.3s;
    z-index: 1;
  }
  
  input:checked + .slider:before {
    transform: translateX(51px);
  }
  
  
  /* Mobile adjustment */
  @media (max-width: 768px) {
    .navbar-nav .nav-item.d-flex.align-items-center {
      margin-top: 100%;
      justify-content: center;
    }
    
    .switch {
      margin-left: 0;
    }
  }
  
  /* ===== HERO SECTION ===== */
  .full-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
  }
  
  .hero-name {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--accent);
  }
  
  .hero-role {
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 1rem;
  }
  
  body.dark .hero-name {
    color: #F2EBDC;
  }

  body.dark .hero-role {
    color: #7e8185;
  }

  body.dark .hi {
    color: #7e8185;
  }

  .expertise-switch-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .expertise-btn {
    border: 1px solid var(--border-light);
    background: var(--card);
    color: var(--muted);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
  }

  .expertise-btn.active,
  .expertise-btn:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
  }

  .learning-pill {
    display: inline-block;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    background: var(--card);
    color: var(--muted);
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
  }
  
  /* buttons */
  .btn-custom {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
    border-radius: 40px;
    padding: 0.25rem 1.2rem;
    font-weight: 500;
    transition: 0.2s;
    margin-right: 15px;
    margin-bottom: 5px;
    white-space: nowrap;
  }
  
  .btn-custom:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
  }
  
  body.dark .btn-custom {
    color: #F2EBDC;
    border-color: var(--accent);
  }
  
  body.dark .btn-custom:hover {
    background: var(--accent);
    color: #F2EBDC;
  }

  
  
  /* container background */
  .bg-container {
    background: var(--card);
    border-radius: 30px;
    border: 1px solid var(--border-light);
  }
  
  /* ===== RESPONSIVE FIXES ===== */
  @media (max-width: 768px) {
    .full-section {
      min-height: auto;
      padding: 3rem 0;
      text-align: center;
    }
    
    .hero-name {
      font-size: 2.5rem;
    }
    
    .hero-role {
      font-size: 1.15rem;
    }
    
    .hero-be {
      font-size: 3rem;
    }
    
    .d-flex.gap-4 {
      gap: 1rem !important;
      justify-content: center;
    }

    .expertise-switch-wrapper {
      justify-content: center;
    }

    .learning-pill {
      font-size: 0.8rem;
      padding: 0.4rem 0.8rem;
    }
    
    .btn-custom {
      margin-right: 0;
      width: auto;
      min-width: 160px;
      padding: 0.7rem 1.5rem;
      font-size: 1rem !important;
      white-space: nowrap;
    }
    @media (max-width: 768px) {
  .btn-custom {
    white-space: normal; /* 🔥 critical fix */
  }
}
    .row.mt-5.g-4 {
      margin-top: 2rem !important;
    }
    
    .stat-card {
      padding: 1rem 0.5rem;
    }
    
    .stat-card h3 {
      font-size: 1.8rem !important;
    }
  }
  
  @media (max-width: 480px) {
    .btn-custom {
      min-width: 140px;
      padding: 0.6rem 1rem;
      font-size: 0.9rem !important;
    }
    
    .hero-name {
      font-size: 2rem;
    }
    
    .hero-role {
      font-size: 1.5rem;
    }
    
    .hero-be {
      font-size: 2.5rem;
    }
  }
  
  /* service cards */
  .service-card {
    background: var(--card);
    border-radius: 24px;
    padding: 40px 20px;
    text-align: center;
    border: 1px solid var(--border-light);
    height: 100%;
  }
  
  .service-icon {
    color: var(--accent);
    font-size: 2.5rem;
    margin-bottom: 15px;
  }
  
  /* timeline */
  .timeline {
    position: relative;
    padding: 10px 0;
  }
  
  .timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
    opacity: 0.4;
    border-radius: 4px;
  }
  
  .timeline-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 40px;
  }
  
  .timeline-marker {
    position: absolute;
    left: 8px;
    top: 0;
    width: 26px;
    height: 26px;
    border-radius: 30%;
    background: var(--accent);
    border: 4px solid var(--card);
    box-shadow: 0 0 0 1.7px var(--accent);
    z-index: 2;
  }
  
  .timeline-content {
    background: var(--card);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
  }
  
  .timeline-content h4 {
    color: var(--accent);
    margin-bottom: 10px;
  }
  
  .timeline-content .date {
    color: var(--muted);
    font-size: 0.7rem;
    margin-bottom: 10px;
    display: inline-block;
    background: var(--bg);
    padding: 4px 12px;
    border-radius: 30px;
  }
  
  @media (min-width: 768px) {
    .timeline::before {
      left: 50%;
      transform: translateX(-2px);
    }
    
    .timeline-item {
      padding-left: 0;
      width: 50%;
      margin-bottom: 60px;
    }
    
    .timeline-item:nth-child(odd) {
      margin-left: 0;
      padding-right: 40px;
      text-align: right;
    }
    
    .timeline-item:nth-child(even) {
      margin-left: 50%;
      padding-left: 40px;
    }
    
    .timeline-item:nth-child(odd) .timeline-marker {
      left: auto;
      right: -14px;
    }
    
    .timeline-item:nth-child(even) .timeline-marker {
      left: -14px;
    }
    
    .timeline-item:nth-child(odd) .timeline-content {
      text-align: left;
    }
  }
  
  /* skill circles */
  .skill {
    text-align: center;
  }
  
  .circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 6px solid #c0c0d0;
    border-top-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-weight: 700;
    font-size: 1.4rem;
    background: var(--card);
    color: var(--text);
  }
  
  body.dark .circle {
    border-color: #33335a;
    border-top-color: var(--accent);
  }
  
  /* portfolio cards */
  .port-card {
    background: var(--card);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border-light);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.port-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.port-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 85%, white);
  color: #ffffff;
  padding: 0.28rem 0.65rem;
  }
  
  .port-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }
  
  .port-card .port-overlay {
    padding: 15px;
    background: var(--card);
  }

  .portfolio-link {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
  }

  .portfolio-link:hover {
    opacity: 0.9;
  }
    
  .port-card h5 {
    margin-bottom: 5px;
    color: var(--accent);
  }
  
  .port-card p {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0;
  }

  @media (max-width: 768px) {

    /* Fix image scaling */
    .port-card img {
      height: 100px;
      width: 100%;
    }
  
    /* Prevent weird hover behavior on touch */
    .port-card:hover {
      transform: none;
      box-shadow: none;
    }
  
    /* Slight spacing adjustments */
    .port-card .port-overlay {
      padding: 12px;
    }
  
    /* Fix chip overlapping */
    .port-chip {
      top: 8px;
      left: 8px;
      font-size: 0.6rem;
    }
  
  }
  
  /* contact form */
  .form-control {
    background: var(--card) !important;
    backdrop-filter: blur(5px);
    border: 1.5px solid var(--border-light) !important;
    color: var(--text) !important;
    border-radius: 20px;
    padding: 12px 18px;
  }
  
  .form-control:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(0,0,128,0.15);
  }
  
  .form-control::placeholder {
    color: var(--muted);
    opacity: 0.8;
  }
  
  /* footer */
  .footer {
    background: var(--card);
    padding: 25px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    color: var(--text);
  }
  
  .footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
  }
  
  /* headings */
  h2 {
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text);
  }
  
  .text-muted {
    color: var(--muted) !important;
  }
  
  
  .profile-overlay {
    position: absolute;
    top: 42%;
    left: 45%;
    transform: translate(-50%, -50%);
    width: 40%;
    z-index: 2;
  }

 .profile-image {
    left: 38%;
  }
    @media (max-width: 768px) {
    .profile-image {
      left: 33%;
    }
  }
  /* optional: make paint slightly behind */
  .col-lg-5 img:first-child {
    opacity: 1;
  }
  
  .occupation {
    width: 75%;
  }

  .section {
    min-height: 100vh;
    scroll-margin-top: 100px; /* adjust based on navbar height */
  }

  
  /* ====== Floating elements ======*/

  /* CONTAINER */
.paint-drops {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* BASE DROP */
.drop {
  position: absolute;
  border-radius: 50% 60% 40% 70% / 60% 40% 60% 40%;
  filter: blur(8px);
  opacity: 0.5;
  animation: floatMove 12s infinite ease-in-out;
}

/* LIGHT THEME COLORS */

/* Big floating elements */
.d1 { width: 60px; height: 60px; top: 10%; left: 5%; background: #000080; }
.d2 { width: 120px; height: 120px; bottom: 12%; left: 25%; background: #87CEEB; animation-delay: 2s; }
.d3 { width: 100px; height: 100px; top: 20%; right: 10%; background:rgb(112, 2, 163); animation-delay: 4s; }
.d4 { width: 120px; height: 120px; bottom: 6%; right: 7%; background: #000080; animation-delay: 6s; }

/* Small floating elements */
.d5 { width: 30px; height: 30px; top: 40%; left: 25%; background:rgb(96, 96, 133); }
.d6 { width: 90px; height: 90px; bottom: 12%; left: 25%; background:rgb(136, 202, 228); animation-delay: 2s; }
.d7 { width: 60px; height: 60px; top: 26%; right: 12%; background:rgb(51, 2, 73); animation-delay: 4s; }
.d8 { width: 90px; height: 90px; bottom: 6%; right: 7%; background:rgba(158, 71, 139, 0.68);; animation-delay: 6s; }

/* DARK THEME (remove purple, add cream) */
body.dark .d3 {
  background: #F2EBDC; /* cream */
}
body.dark .d1 {
  background:rgb(235, 192, 135);
}
body.dark .d4 {
  background:rgba(158, 71, 139, 0.68);
}
body.dark .d2 {
  background: #6ec1ff;
}

body.dark .d5 {
  background:rgb(199, 90, 17);
}

body.dark .d7 {
  background:rgb(255, 154, 87);
}

/* FLOAT ANIMATION */
@keyframes floatMove {
  0%   { transform: translateY(0px) scale(1); }
  50%  { transform: translateY(-30px) scale(1.05); }
  100% { transform: translateY(0px) scale(1); }
}

.drop {
  mix-blend-mode: multiply;
}

body.dark .drop {
  mix-blend-mode: screen;
}

@media (max-width: 868px) {
  .paint-drops {
    display: none;
  }
}

/* ========= Swipe animations ===========*/

/* base reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
}

/* directions */
.reveal-up { transform: translateY(60px) scale(1); }
.reveal-down { transform: translateY(-60px); }
.reveal-left { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }

.reveal-zoom-in { transform: translateY(40px) scale(0.8); }
.reveal-zoom-out { transform: translateY(40px) scale(1.2); }

/* active */
.reveal.show {
  opacity: 1;
  transform: translate(0,0);
}


/* ========= Side Dots ==========*/
.side-dots {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* dot style */
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-light);
  display: block;
  transition: all 0.3s ease;
}

/* hover */
.dot:hover {
  transform: scale(1.4);
  background: var(--accent);
}

/* active section */
.dot.active {
  background: var(--accent);
  transform: scale(1.6);
}

/* DARK MODE tweak */
body.dark .dot {
  background: rgba(245, 237, 220, 0.3);
}

body.dark .dot.active {
  background: #F5EDDC;
}

body .dot {
  background: rgba(139, 139, 139, 0.658);
}

body .dot.active {
  background: #000000;
}

@media (max-width: 868px) {
  .dot {
    display: none;
  }
}

/* Portfolio section*/

.filter-btn.active {
  background-color: var(--accent);
  color: #fff;
}

/* base */
.portfolio-item {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: 
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s ease;
}

/* hidden state (drift out) */
.portfolio-item.hide {
  opacity: 0;
  transform: translateY(50px) scale(0.95) rotate(2deg);
  pointer-events: none;
}

/* visible */
.portfolio-item.show {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(0);
}

/* wrapper */
.portfolio-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* buttons */
.portfolio-filters .btn-custom {
  white-space: nowrap;
  font-size: 0.9rem;
  padding: 0.5rem 1.2rem;
}

.portfolio-controls .btn-custom {
  min-width: 140px;
}

/* 🔥 MOBILE FIX */
@media (max-width: 768px) {
  .portfolio-filters {
    flex-wrap: wrap;              /* no wrapping */
    overflow-x: hidden;               /* scroll */
    justify-content: flex-start;
    padding-bottom: 8px;
    scrollbar-width: none;          /* firefox */
  }

  .portfolio-filters::-webkit-scrollbar {
    display: none;                  /* chrome */
  }

  .portfolio-filters .btn-custom {
    flex: 0 0 auto;                 /* prevent shrink */
    font-size: 0.8rem;
    padding: 0.45rem 1rem;
  }
}

/* Section */
.blogs-section {
  color: #fff;
  padding: 20px 20px;
}

/* Container */
.container {
  max-width: 1100px;
  margin: auto;
}

/* Heading */
.heading {
  font-size: 32px;
  margin-bottom: 40px;
}

/* Wrapper */
.carousel-wrapper {
  position: relative;
}

/* Visible area */
.carousel-shell {
  overflow-y: hidden;
}

/* Track (IMPORTANT FIX) */
.carousel-track {
  display: flex;
  gap: 20px;
  width: max-content; /* 🔥 KEY FIX */
  transition: transform 0.3s ease;
}

/* Cards */
.blog-card {
  flex: 0 0 260px; 
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 16px;
  background: var(--card);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover {
  transform: scale(1.05);
  background-color: var(--border-light);
}

/* Image fix */
.blog-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* Title */
.blog-card h3 {
  color: var(--accent);
  margin-bottom: 8px;
}

/* Text */
.blog-card p {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 12px;
}

/* Button */
.blog-card a {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  text-decoration: none;
  transition: 0.2s;
}

.blog-card a:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Navigation Buttons */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  border: none;
  padding: 15px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}

/* Desktop */
.nav-btn.left {
  left: -60px;
}

.nav-btn.right {
  right: -60px;
}

/* Mobile fix */
@media (max-width: 768px) {
  .nav-btn.left {
    left: 10px;
  }

  .nav-btn.right {
    right: 10px;
  }
}

.nav-btn:hover {
  transform: translateY(-50%) scale(1.1);
}

#cardTrack {
  display: flex;
  gap: 24px;                /* same as gap-6 */
  width: max-content;       /* 🔥 MOST IMPORTANT */
  scroll-behavior: smooth;
  padding: 8px 16px;        /* py-2 px-4 */
}

#cardTrack::-webkit-scrollbar {
  display: none;
}

#cardTrack {
  scrollbar-width: none; /* Firefox */
}