/* =============================================
   TESLA-STYLE PORTFOLIO CSS
   Palette: #171a20 (black), #ffffff (white),
            #f4f4f4 (gray bg), #e0e0e0 (border),
            #5c5e62 (muted), #e31937 (red accent)
============================================= */

:root {
  --t-black:  #171a20;
  --t-white:  #ffffff;
  --t-gray:   #f4f4f4;
  --t-border: #e0e0e0;
  --t-muted:  #5c5e62;
  --t-red:    #e31937;
}

/* === BASE === */
body {
  font-family: 'Universal Sans Display', 'Helvetica Neue', Arial, sans-serif;
  color: var(--t-black);
  background: var(--t-white);
  margin: 0;
  padding: 0;
}

/* === NAVBAR === */
.tesla-navbar {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  box-shadow: none !important;
  height: 56px;
  padding: 0 32px;
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  transition: border-color 0.3s, box-shadow 0.3s;
  background-image: none !important;
}

/* Logo stays left */
.tesla-navbar .navbar-brand {
  position: relative;
  z-index: 2;
  margin-left: 24px;
  display: flex;
  align-items: center;
}

/* Nav links absolutely centered on screen */
.tesla-navbar .navbar-collapse {
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: auto !important;
  flex-grow: 0 !important;
}

.tesla-navbar.tesla-navbar-scrolled {
  border-bottom: 1px solid var(--t-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.tesla-nav-logo,
.tesla-navbar .navbar-brand img.tesla-nav-logo {
  height: 11px !important;
  width: auto !important;
  max-width: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: block;
}

.tesla-nav-descriptor {
  font-size: 14px;
  font-weight: 500;
  color: var(--t-black);
  letter-spacing: 0.02em;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid #c8c8c8;
  white-space: nowrap;
  line-height: 1;
  text-transform: none !important;
}

body.dark-mode .tesla-nav-descriptor {
  color: #d0d0d0;
  border-left-color: #4a4a4a;
}

/* Sliding nav highlight pill */
#teslaNavList {
  position: relative;
}

.tesla-nav-pill {
  position: absolute;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.07);
  pointer-events: none;
  opacity: 0;
  transition: left 0.22s ease, top 0.22s ease, width 0.22s ease, opacity 0.15s ease;
  z-index: 0;
}

body.dark-mode .tesla-nav-pill {
  background: rgba(255, 255, 255, 0.1);
}

.tesla-nav-link {
  color: var(--t-black) !important;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: none !important;
  padding: 5px 10px !important;
  border-radius: 6px;
  transition: background 0.18s;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.tesla-nav-link:hover,
.tesla-nav-link:focus,
.tesla-nav-link:active,
a.tesla-nav-link:hover,
a.tesla-nav-link:focus,
.tesla-navbar .tesla-nav-link:hover,
.tesla-navbar .tesla-nav-link:focus,
.tesla-navbar .tesla-nav-link:active,
.tesla-navbar a.tesla-nav-link:hover,
.tesla-navbar a.tesla-nav-link:visited:hover {
  background: transparent;
  text-decoration: none !important;
  color: var(--t-black) !important;
  outline: none;
}

/* === HERO === */
.tesla-hero {
  position: relative;
  height: 88vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tesla-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 8s ease-out;
}

.tesla-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.45) 50%,
    rgba(0, 0, 0, 0.65) 100%
  );
}

.tesla-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 56px 20px 0;
  color: white;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.tesla-profile-img {
  width: 165px;
  height: 165px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.65);
  display: block;
  margin: 0 auto 20px;
  position: relative;
}

.tesla-hero-profile {
  position: relative;
  display: inline-block;
  margin-bottom: 4px;
}

.tesla-tesla-badge {
  position: absolute;
  bottom: 28px;
  right: -9px;
  background: white;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.tesla-tesla-badge img {
  width: 30px;
  height: auto;
}

.tesla-hero-name {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: white;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.tesla-hero-title {
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

.tesla-hero-sep {
  margin: 0 5px;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 200;
}

.tesla-hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
}

.tesla-hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.tesla-hero-social {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.tesla-social-icon {
  color: rgba(255, 255, 255, 0.75);
  font-size: 20px;
  transition: color 0.2s;
  text-decoration: none;
}

.tesla-social-icon:hover {
  color: white;
  text-decoration: none;
}

.tesla-hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  animation: bounce 2.2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* === BUTTONS === */
.tesla-btn {
  display: inline-block;
  padding: 10px 0;
  min-width: 160px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
}

.tesla-btn-white {
  background: var(--t-white);
  color: var(--t-black);
  border-color: var(--t-white);
}

.tesla-btn-white:hover {
  background: rgba(255, 255, 255, 0.85);
  color: var(--t-black);
  text-decoration: none;
}

.tesla-btn-outline {
  background: #ffffff;
  color: var(--t-black);
  border-color: #ffffff;
}

.tesla-btn-outline:hover {
  background: #d0d0d0;
  color: var(--t-black);
  text-decoration: none;
}

.tesla-btn-black {
  background: var(--t-black);
  color: white;
  border-color: var(--t-black);
  padding: 12px 32px;
  font-size: 14px;
  border-radius: 4px;
}

.tesla-btn-black:hover {
  background: #2a2d35;
  color: white;
  text-decoration: none;
}

.tesla-btn-blue {
  background: #3e6ae1;
  color: white;
  border-color: #3e6ae1;
}

.tesla-btn-blue:hover {
  background: #2d58c8;
  color: white;
  border-color: #2d58c8;
  text-decoration: none;
}

/* === SUCCESS MESSAGE === */
.tesla-success-msg {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--t-black);
  color: white;
  padding: 12px 28px;
  border-radius: 4px;
  z-index: 9999;
  display: none;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: opacity 3s;
  white-space: nowrap;
}

/* === SECTIONS === */
.tesla-section {
  padding: 88px 0;
}

.tesla-section-white { background: var(--t-white); }
.tesla-section-gray  { background: var(--t-gray);  }

.tesla-section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  text-align: left;
  color: var(--t-black);
  margin-bottom: 52px;
  letter-spacing: -0.01em;
}

.tesla-title-light {
  color: white;
}

.tesla-subsection-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--t-muted);
  margin-bottom: 20px;
  margin-top: 44px;
  text-align: left;
}

/* === ABOUT === */
.tesla-about-text {
  font-size: 15px;
  line-height: 1.75;
  color: #333;
  margin-bottom: 18px;
}
.tesla-about-text img {
  box-shadow: none !important;
  vertical-align: middle;
}

.tesla-info-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tesla-info-item {
  display: flex;
  flex-direction: column;
  padding: 11px 0;
  border-bottom: 1px solid var(--t-border);
}

.tesla-info-item:last-child {
  border-bottom: none;
}

.tesla-info-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-muted);
  margin-bottom: 3px;
}

.tesla-info-value {
  font-size: 14px;
  color: var(--t-black);
  font-weight: 400;
}

/* === SKILLS === */
.tesla-skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 12px;
}

.tesla-skill-tag-group {
  background: #ffffff;
  border: 1px solid var(--t-border);
  border-radius: 10px;
  padding: 20px 20px 16px;
}

.tesla-skill-group-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-muted);
  margin-bottom: 12px;
}

.tesla-skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tesla-skill-tag {
  display: inline-block;
  padding: 5px 13px;
  min-width: 90px;
  text-align: center;
  border: 1px solid var(--t-border);
  border-radius: 4px;
  font-size: 13px;
  color: var(--t-black);
  background: white;
  font-weight: 400;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.tesla-skill-tag:hover {
  background: #3e6ae1;
  color: white;
  border-color: #3e6ae1;
}

/* === PROGRESS BARS === */
.tesla-progress-item {
  margin-bottom: 20px;
}

.tesla-progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--t-black);
}

.tesla-progress-bar {
  height: 3px;
  background: var(--t-border);
  border-radius: 2px;
  overflow: hidden;
}

.tesla-progress-fill {
  height: 100%;
  background: var(--t-black);
  border-radius: 2px;
  transition: width 1.6s ease;
}

/* === PIP / SEGMENT PROFICIENCY BARS === */
.tesla-pip-item {
  margin-bottom: 22px;
}

.tesla-pip-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
}

.tesla-pip-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--t-black);
  letter-spacing: 0.01em;
}

.tesla-pip-score {
  font-size: 11px;
  font-weight: 400;
  color: var(--t-muted);
  letter-spacing: 0.05em;
}

.tesla-pip-track {
  display: flex;
  gap: 4px;
}

.tesla-pip {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #c0c0c0;
  transition: background 0.25s ease;
}

.tesla-pip.filled {
  background: #3e6ae1;
}

/* === EXPERIENCE === */
.tesla-exp-card {
  display: flex;
  gap: 48px;
  padding: 44px 0;
  border-bottom: 1px solid var(--t-border);
  align-items: flex-start;
}

.tesla-exp-card:last-child {
  border-bottom: none;
}

.tesla-exp-left {
  min-width: 200px;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.tesla-exp-date {
  font-size: 12px;
  color: var(--t-muted);
  font-weight: 400;
}

.tesla-exp-company {
  font-size: 14px;
  font-weight: 600;
  color: var(--t-black);
}

/* Experience logos — flat, no shadow */
.tesla-exp-left img {
  box-shadow: none !important;
  border-radius: 0 !important;
  height: 60px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

.tesla-exp-logo-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  background: white;
  border: 1px solid var(--t-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tesla-exp-logo-circle img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  border-radius: 0 !important;
}

.tesla-exp-right {
  flex: 1;
}

.tesla-exp-role {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--t-black);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.tesla-exp-tenure {
  font-size: 12px;
  font-weight: 400;
  color: var(--t-muted);
}

.tesla-exp-role-block {
  margin-bottom: 28px;
}

.tesla-exp-role-block:last-child {
  margin-bottom: 0;
}

.tesla-exp-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tesla-exp-list li {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
  padding: 4px 0 4px 22px;
  position: relative;
}

.tesla-exp-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  font-size: 18px;
  line-height: 1.4;
  color: #3e6ae1;
  font-weight: 300;
}

/* === EDUCATION === */
.tesla-edu-card {
  display: flex;
  gap: 24px;
  padding: 32px;
  background: white;
  border: 1px solid var(--t-border);
  border-radius: 4px;
  margin-bottom: 20px;
  align-items: flex-start;
  transition: box-shadow 0.2s ease;
}

.tesla-edu-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

.tesla-edu-logo {
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tesla-edu-degree {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--t-black);
  margin-bottom: 4px;
}

.tesla-edu-school {
  font-size: 13px;
  font-weight: 500;
  color: var(--t-muted);
  margin-bottom: 2px;
}

.tesla-edu-date {
  font-size: 12px;
  color: var(--t-muted);
  margin-bottom: 12px;
}

.tesla-edu-desc {
  font-size: 13px;
  color: #555;
  line-height: 1.65;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--t-border);
}

/* === PROJECT / ACTIVITY GRID === */
.tesla-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.tesla-project-card {
  border: 1px solid var(--t-border);
  border-radius: 4px;
  overflow: hidden;
  background: white;
  transition: transform 0.25s, box-shadow 0.25s;
}

.tesla-project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}

.tesla-project-card a {
  text-decoration: none;
  color: inherit;
}

.tesla-project-img {
  height: 200px;
  background-size: cover;
  background-position: center;
  transition: transform 0.35s;
}

.tesla-project-card:hover .tesla-project-img {
  transform: scale(1.04);
}

.tesla-project-info {
  padding: 18px;
}

.tesla-project-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--t-black);
  margin-bottom: 4px;
  line-height: 1.4;
}

.tesla-project-info p {
  font-size: 12px;
  color: var(--t-muted);
  margin: 0;
}

/* === ACTIVITY SLIDESHOW === */
.tesla-slide-wrap {
  position: relative;
  overflow: hidden;
}

.tesla-slide-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: max(15px, calc((100vw - 1110px) / 2));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 16px;
  padding: 8px 40px 24px 0;
}

/* Reliable spacer that aligns first card with Bootstrap container (PRABHU logo) */
.tesla-slide-track::before {
  content: '';
  flex-shrink: 0;
  width: max(15px, calc((100vw - 1110px) / 2));
}

.tesla-slide-track::-webkit-scrollbar {
  display: none;
}

.tesla-slide-card {
  flex: 0 0 540px;
  scroll-snap-align: start;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.tesla-slide-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.tesla-slide-img {
  position: relative;
  height: 450px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.35s;
}

.tesla-slide-card:hover .tesla-slide-img {
  transform: scale(1.03);
}

.tesla-slide-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 52px 18px 18px;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.72));
  border-radius: 0 0 8px 8px;
}

.tesla-slide-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 3px;
  line-height: 1.4;
}

.tesla-slide-info p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

.tesla-slide-arrow {
  position: absolute;
  top: 44%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  border: 1px solid rgba(200, 200, 200, 0.7);
  background: rgba(255, 255, 255, 0.93);
  color: #171a20;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tesla-slide-prev {
  left: 12px;
  display: none; /* hidden at start; JS shows it after user scrolls */
}

.tesla-slide-next {
  right: 12px;
}

.tesla-slide-arrow:hover {
  background: #ffffff;
  color: #171a20;
}

/* dark mode slideshow */
body.dark-mode .tesla-slide-arrow {
  background: rgba(30, 30, 34, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
  color: #f0f0f0;
}

body.dark-mode .tesla-slide-arrow:hover {
  background: #f0f0f0;
  color: #0d0d0f;
}

@media (max-width: 768px) {
  .tesla-slide-card {
    flex: 0 0 80vw;
  }
}

/* === REFERENCES / TESTIMONIALS === */
.tesla-testimonial-carousel {
  max-width: 100%;
  margin: 0 auto;
  padding-bottom: 56px;
}

.tesla-testimonial {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 44px;
  background: white;
  border: 1px solid var(--t-border);
  border-radius: 4px;
}

.tesla-ref-photo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--t-border);
}

.tesla-testimonial-text blockquote {
  font-size: 15px;
  line-height: 1.75;
  color: #333;
  font-style: italic;
  border: none;
  border-left: 3px solid var(--t-border);
  padding: 0 0 0 14px;
  margin: 0 0 14px;
}

.tesla-ref-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--t-black);
  margin: 0;
}

.tesla-ref-title {
  font-size: 12px;
  color: var(--t-muted);
  margin: 0;
}

.tesla-carousel-indicators {
  bottom: -48px;
}

.tesla-carousel-indicators li {
  background-color: var(--t-border);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 1;
  margin: 0 4px;
  cursor: pointer;
  border-top: none;
  border-bottom: none;
  transition: background-color 0.2s;
}

.tesla-carousel-indicators .active {
  background-color: var(--t-black);
}

.tesla-carousel-control {
  color: var(--t-muted) !important;
  width: 44px;
  height: 44px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  font-size: 16px;
  text-shadow: none;
}

.tesla-carousel-control:hover {
  color: var(--t-black) !important;
}

/* === CONTACT === */
.tesla-section-contact {
  position: relative;
  padding: 0 0 88px;
  background: var(--t-black);
  overflow: hidden;
}

.tesla-contact-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.08;
}

.tesla-contact-card {
  background: white;
  border-radius: 4px;
  padding: 44px;
  position: relative;
  z-index: 1;
}

.tesla-contact-heading {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--t-black);
  margin-bottom: 28px;
}

.tesla-form-group {
  margin-bottom: 20px;
}

.tesla-form-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t-muted);
  margin-bottom: 6px;
}

.tesla-form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--t-border);
  border-radius: 4px;
  font-size: 14px;
  color: var(--t-black);
  background: white;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}

.tesla-form-input:focus {
  border-color: var(--t-black);
}

.tesla-form-textarea {
  height: 110px;
  resize: vertical;
}

.tesla-form-hint {
  font-size: 11px;
  color: var(--t-muted);
  margin-top: 5px;
  line-height: 1.4;
}

.tesla-contact-info {
  padding-left: 28px;
  border-left: 1px solid var(--t-border);
  height: 100%;
}

.tesla-contact-detail {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  color: #444;
}

.tesla-contact-detail i {
  color: var(--t-muted);
  width: 16px;
  text-align: center;
}

.tesla-contact-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
}

.tesla-contact-social-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--t-border);
  border-radius: 4px;
  font-size: 13px;
  color: var(--t-black);
  text-decoration: none;
  transition: background 0.2s;
}

.tesla-contact-social-btn:hover {
  background: var(--t-gray);
  color: var(--t-black);
  text-decoration: none;
}

/* === FOOTER === */
.tesla-footer {
  background: var(--t-black);
  color: rgba(255, 255, 255, 0.5);
  padding: 44px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tesla-footer-inner {
  text-align: center;
}

.tesla-footer-credit {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 18px;
}

.tesla-footer-credit strong {
  color: white;
}

.tesla-footer-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tesla-footer-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}

.tesla-footer-copy {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  margin: 0;
}

/* === TABLEAU === */
.tesla-tableau-wrap {
  width: 100%;
}

.tesla-tableau-ratio {
  position: relative;
  width: 100%;
  padding-bottom: 68.55%; /* 861/1256 — matches dashboard aspect ratio */
  height: 0;
  overflow: hidden;
}

.tesla-tableau-ratio iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* =============================================
   DARK MODE
   Triggered by: body.dark-mode
   Palette: #0d0d0f bg, #161618 surface,
            #1e1e22 card, #2a2a2e border,
            #a1a1a6 muted, #f0f0f0 text
============================================= */

/* Dark mode toggle button — fixed top-right, vertically centered in navbar */
.tesla-dark-toggle {
  position: fixed;
  top: 14px;
  right: 24px;
  z-index: 10000;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t-black);
  opacity: 0.85;
  transition: opacity 0.2s;
}
.tesla-dark-toggle:hover { opacity: 1; }
.tesla-dark-toggle .icon-sun  { display: none; }
.tesla-dark-toggle .icon-moon { display: block; }
body.dark-mode .tesla-dark-toggle .icon-sun  { display: block; }
body.dark-mode .tesla-dark-toggle .icon-moon { display: none; }
body.dark-mode .tesla-dark-toggle { color: #f0f0f0; }

/* Base */
body.dark-mode {
  background: #0d0d0f;
  color: #f0f0f0;
}

/* Navbar */
body.dark-mode .tesla-navbar {
  background: rgba(13, 13, 15, 0.97) !important;
  border-bottom-color: #2a2a2e;
}
body.dark-mode .tesla-navbar.tesla-navbar-scrolled {
  box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
}
body.dark-mode .tesla-nav-link {
  color: #f0f0f0 !important;
}
body.dark-mode .tesla-nav-link:hover,
body.dark-mode .tesla-nav-link:focus,
body.dark-mode a.tesla-nav-link:hover,
body.dark-mode .tesla-navbar .tesla-nav-link:hover,
body.dark-mode .tesla-navbar a.tesla-nav-link:visited:hover {
  background: transparent;
  color: #f0f0f0 !important;
}
body.dark-mode .tesla-nav-logo {
  filter: invert(1);
}

/* Sections */
body.dark-mode .tesla-section-white { background: #0d0d0f; }
body.dark-mode .tesla-section-gray  { background: #111113; }
body.dark-mode .tesla-section-title { color: #f0f0f0; }
body.dark-mode .tesla-subsection-title { color: #6e6e73; }

/* About */
body.dark-mode .tesla-about-text { color: #b0b0b8; }
body.dark-mode .tesla-info-item  { border-bottom-color: #2a2a2e; }
body.dark-mode .tesla-info-label { color: #6e6e73; }
body.dark-mode .tesla-info-value { color: #f0f0f0; }

/* Skills */
body.dark-mode .tesla-skill-group-label { color: #6e6e73; }
body.dark-mode .tesla-skill-tag-group {
  background: #1c1c1e;
  border-color: #3a3a3c;
}
body.dark-mode .tesla-skill-tag {
  background: #1e1e22;
  border-color: #2a2a2e;
  color: #e0e0e8;
}
body.dark-mode .tesla-skill-tag:hover {
  background: #3e6ae1;
  border-color: #3e6ae1;
  color: white;
}

/* Progress bars */
body.dark-mode .tesla-progress-label { color: #e0e0e8; }
body.dark-mode .tesla-progress-pct   { color: #6e6e73; }
body.dark-mode .tesla-progress-track { background: #2a2a2e; }

/* Pip dark mode */
body.dark-mode .tesla-pip-label  { color: #f0f0f0; }
body.dark-mode .tesla-pip-score  { color: #6e6e73; }
body.dark-mode .tesla-pip        { background: #3e3e44; }
body.dark-mode .tesla-pip.filled { background: #5b82e8; }

/* Experience */
body.dark-mode .tesla-exp-card  { border-bottom-color: #2a2a2e; }
body.dark-mode .tesla-exp-date  { color: #6e6e73; }
body.dark-mode .tesla-exp-company { color: #f0f0f0; }
body.dark-mode .tesla-exp-role  { color: #f0f0f0; }
body.dark-mode .tesla-exp-tenure { color: #6e6e73; }
body.dark-mode .tesla-exp-list li { color: #b0b0b8; }
body.dark-mode .tesla-exp-list li::before { color: #5b8def; }
body.dark-mode .tesla-exp-left img { filter: brightness(0.9); }
body.dark-mode .tesla-exp-logo-circle {
  background: #1e1e22;
  border-color: #2a2a2e;
}

/* Education */
body.dark-mode .tesla-edu-card {
  background: #1e1e22;
  border-color: #2a2a2e;
}
body.dark-mode .tesla-edu-degree { color: #f0f0f0; }
body.dark-mode .tesla-edu-school,
body.dark-mode .tesla-edu-date   { color: #6e6e73; }
body.dark-mode .tesla-edu-desc   { color: #b0b0b8; border-top-color: #2a2a2e; }

/* Projects & Activities */
body.dark-mode .tesla-project-card {
  background: #1e1e22;
  border-color: #2a2a2e;
}
body.dark-mode .tesla-project-card:hover {
  box-shadow: 0 10px 28px rgba(0,0,0,0.5);
}
body.dark-mode .tesla-project-info h4 { color: #f0f0f0; }
body.dark-mode .tesla-project-info p  { color: #6e6e73; }

/* References */
body.dark-mode .tesla-testimonial { background: #1e1e22; }
body.dark-mode .tesla-testimonial  { background: #1e1e22; border-color: #2a2a2e; }
body.dark-mode .tesla-testimonial-text blockquote { color: #b0b0b8; border-left-color: #2a2a2e; }
body.dark-mode .tesla-ref-photo   { border-color: #2a2a2e; }
body.dark-mode .tesla-testimonial-text blockquote { color: #b0b0b8; }
body.dark-mode .tesla-ref-name    { color: #f0f0f0; }
body.dark-mode .tesla-ref-title   { color: #6e6e73; }
body.dark-mode .tesla-carousel-indicators li { background-color: #2a2a2e; }
body.dark-mode .tesla-carousel-indicators .active { background-color: #f0f0f0; }
body.dark-mode .tesla-carousel-control { color: #f0f0f0 !important; }
body.dark-mode .tesla-carousel-control:hover { color: #f0f0f0 !important; }

/* Contact card */
body.dark-mode .tesla-contact-card {
  background: #1e1e22;
}
body.dark-mode .tesla-contact-heading { color: #f0f0f0; }
body.dark-mode .tesla-form-label  { color: #6e6e73; }
body.dark-mode .tesla-form-input  {
  background: #0d0d0f;
  border-color: #2a2a2e;
  color: #f0f0f0;
}
body.dark-mode .tesla-form-input:focus { border-color: #3e6ae1; }
body.dark-mode .tesla-form-hint   { color: #6e6e73; }
body.dark-mode .tesla-contact-detail { color: #b0b0b8; }
body.dark-mode .tesla-contact-info { border-left-color: #2a2a2e; }
body.dark-mode .tesla-contact-social-btn {
  border-color: #2a2a2e;
  color: #e0e0e8;
}
body.dark-mode .tesla-contact-social-btn:hover {
  background: #2a2a2e;
  color: #f0f0f0;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .tesla-exp-card {
    flex-direction: column;
    gap: 20px;
  }

  .tesla-exp-left {
    min-width: unset;
    max-width: unset;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .tesla-navbar {
    padding: 0 16px;
  }

  .tesla-section {
    padding: 64px 0;
  }

  .tesla-section-title {
    margin-bottom: 36px;
  }

  .tesla-testimonial {
    flex-direction: column;
    padding: 28px;
    gap: 20px;
  }

  .tesla-contact-info {
    border-left: none;
    border-top: 1px solid var(--t-border);
    padding-left: 0;
    padding-top: 24px;
    margin-top: 28px;
  }

  .tesla-contact-card {
    padding: 28px 20px;
  }

  .tesla-skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .tesla-project-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .tesla-hero-content {
    padding-bottom: 80px;
  }
}

/* ============================================================
   CHAT WIDGET
   ============================================================ */

/* --- Floating toggle button --- */
.chat-toggle-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9998;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #ebebeb;
  color: #4a4a4a;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, opacity 0.25s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.chat-toggle-btn::before {
  display: none;
}
.chat-toggle-btn:hover {
  background: #e0e0e0;
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.chat-toggle-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}
.chat-toggle-hidden::before {
  animation: none;
}

/* --- Chat teaser pill --- */
.chat-teaser {
  position: fixed;
  bottom: 31px;
  right: 76px;
  z-index: 9997;
  background: #ebebeb;
  border-radius: 10px;
  padding: 7px 14px 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.2s;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.chat-teaser-icon {
  color: #4a4a4a;
  flex-shrink: 0;
}
.chat-teaser-label {
  font-size: 13px;
  font-weight: 600;
  color: #0d0d0d;
  font-family: inherit;
}
.chat-teaser-q {
  font-size: 13px;
  color: #777;
  font-family: inherit;
  transition: opacity 0.45s ease;
}
.chat-teaser-q-fade {
  opacity: 0;
}
.chat-teaser-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
}
.chat-teaser-scroll-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
}
@media (max-width: 600px) {
  .chat-teaser {
    display: none;
  }
}

/* --- Chat panel --- */
.chat-panel {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: calc(100vh - 80px);
  max-height: 700px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.chat-panel-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* --- Header (Tesla-style: white, centered title) --- */
.chat-panel-header {
  background: #fff;
  color: #0d0d0d;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid #efefef;
  position: relative;
}
.chat-header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-header-title {
  font-size: 15px;
  font-weight: 600;
  color: #0d0d0d;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.chat-header-btn {
  background: none;
  border: none;
  color: #555;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.chat-header-btn:hover { background: #f3f3f3; color: #0d0d0d; }
/* keep old id working */
.chat-close-btn {
  background: none;
  border: none;
  color: #555;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.chat-close-btn:hover { background: #f3f3f3; color: #0d0d0d; }

/* --- Messages area --- */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #fff;
  scroll-behavior: smooth;
}

/* Bot message row: avatar + bubble stacked */
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 100%;
}
.chat-msg-bot {
  align-items: flex-start;
}
.chat-msg-user {
  align-items: flex-end;
}
.chat-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 88%;
}
.chat-msg-user .chat-msg-row {
  flex-direction: row-reverse;
}

/* Small bot avatar beside bubble */
.chat-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1a1d24;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  margin-bottom: 2px;
}
.chat-header-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.chat-msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.chat-msg-avatar-initials {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

.chat-bubble-msg {
  padding: 11px 15px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-msg-bot .chat-bubble-msg {
  background: #f0f0f0;
  color: #0d0d0d;
  border-top-left-radius: 5px;
}
.chat-msg-user .chat-bubble-msg {
  background: #0d0d0d;
  color: #fff;
  border-top-right-radius: 5px;
}

/* --- Quick suggestion chips --- */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-left: 42px;
}
.chat-chip {
  font-size: 12px;
  padding: 6px 16px;
  border-radius: 4px;
  border: 1.5px solid #d0d0d0;
  color: #0d0d0d;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.chat-chip:hover {
  background: #0d0d0d;
  border-color: #0d0d0d;
  color: #fff;
}

/* --- Typing indicator --- */
.chat-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
  min-width: 60px;
  background: #f0f0f0;
  border-radius: 20px;
  border-top-left-radius: 5px;
}
.chat-typing span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #888;
  animation: chatBounce 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40%            { transform: translateY(-5px); opacity: 1; }
}

/* --- Disclaimer --- */
.chat-disclaimer {
  text-align: center;
  font-size: 11px;
  color: #888;
  padding: 8px 16px 4px;
  background: #fff;
  border-top: 1px solid #efefef;
  line-height: 1.4;
}
.chat-disclaimer a { color: #555; text-decoration: underline; }
.chat-disclaimer a:hover { color: #0d0d0d; }

/* --- Input row --- */
.chat-input-row {
  padding: 10px 14px 14px;
  background: #fff;
  flex-shrink: 0;
}
.chat-input-wrapper {
  position: relative;
  display: flex;
  align-items: flex-end;
}
.chat-input {
  flex: 1;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  padding: 10px 52px 10px 16px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  min-height: 42px;
  max-height: 120px;
  line-height: 1.45;
  transition: border-color 0.2s;
  background: #f7f7f7;
  color: #0d0d0d;
  width: 100%;
}
.chat-input:focus {
  border-color: #aaa;
  background: #fff;
}
.chat-input::placeholder { color: #aaa; }
.chat-send-btn {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #c8c8c8;
  border: none;
  color: #0d0d0d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.chat-send-btn:hover { background: #a0a0a0; }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* --- Responsive: slightly taller on short screens --- */
@media (max-height: 640px) {
  .chat-panel {
    max-height: 82vh;
    bottom: 12px;
    right: 12px;
  }
  .chat-toggle-btn {
    bottom: 12px;
    right: 12px;
  }
}
@media (max-width: 480px) {
  .chat-panel {
    width: calc(100vw - 24px);
    right: 12px;
    bottom: 12px;
  }
  .chat-toggle-btn {
    right: 12px;
    bottom: 12px;
  }
}

/* ===== SPOTIFY NOW PLAYING WIDGET ===== */
.spotify-widget {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 9px 14px 9px 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  text-decoration: none !important;
  color: inherit;
  max-width: 260px;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.spotify-widget:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,0.18);
  transform: translateY(-2px);
  text-decoration: none !important;
  color: inherit;
}
.spotify-icon-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.spotify-logo {
  width: 22px;
  height: 22px;
  fill: #1DB954;
}
.spotify-art {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  display: none;
}
.spotify-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
  min-width: 0;
}
.spotify-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1DB954;
  display: flex;
  align-items: center;
  gap: 5px;
}
.spotify-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1DB954;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.3s;
}
.spotify-widget--playing .spotify-dot {
  opacity: 1;
  animation: spotifyPulse 1.4s ease-in-out infinite;
}
@keyframes spotifyPulse {
  0%, 100% { transform: scale(1);   opacity: 1;   }
  50%       { transform: scale(1.5); opacity: 0.5; }
}
.spotify-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--t-black, #171a20);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spotify-artist {
  font-size: 11px;
  color: var(--t-muted, #888);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Idle state — narrower, just logo + "Not playing" */
.spotify-widget--idle .spotify-art { display: none; }
/* Dark mode */
body.dark-mode .spotify-widget {
  background: #1a1a1a;
  border-color: #2a2a2a;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
body.dark-mode .spotify-title { color: #f5f5f5; }

