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

/* === BACK TO TOP === */
#backToTop {
  position: fixed;
  bottom: 76px;
  right: 28px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #ebebeb;
  color: #4a4a4a;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9997;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease, box-shadow 0.2s ease;
  pointer-events: none;
  font-size: 13px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

#backToTop.btt-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#backToTop:hover {
  background: #e0e0e0;
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

@media (max-width: 480px) {
  #backToTop { bottom: 60px; right: 12px; }
}

@media (max-height: 640px) {
  #backToTop { bottom: 60px; right: 12px; }
}

/* === SCROLL PROGRESS BAR === */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: #34c759;
  z-index: 9999;
  transition: width 0.1s linear;
}

#aresModeFlash {
  position: fixed;
  inset: 0;
  z-index: 10001;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 68, 68, 0.95) 0%, rgba(178, 18, 31, 0.8) 22%, rgba(18, 5, 7, 0.92) 56%, rgba(0, 0, 0, 0.98) 100%);
}

#aresModeFlash.ares-mode-flash-active {
  animation: aresModeFlash 850ms ease-out;
}

@keyframes aresModeFlash {
  0% {
    opacity: 0;
    transform: scale(1.06);
  }
  20% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

/* === TYPING CURSOR === */
.typed-cursor {
  display: inline-block;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 200;
  margin-left: 1px;
  animation: cursorBlink 0.75s step-end infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

: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;
}

.tesla-nav-controls {
  position: fixed;
  top: 10px;
  right: 24px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tesla-ares-toggle {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(23, 26, 32, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #171a20;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tesla-ares-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
}

.tesla-ares-toggle-active {
  background: #a31724;
  border-color: #a31724;
  color: #fff;
}

.tesla-ares-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

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;
}

.tesla-nav-link.nav-active {
  color: var(--t-black) !important;
  font-weight: 600;
}

/* === 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;
}

body.ares-mode {
  background: #07090c;
  color: #eff2f5;
}

body.ares-mode::before,
body.ares-mode::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body.ares-mode::before {
  z-index: 0;
  opacity: 0.95;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 66, 66, 0.18) 0%, transparent 26%),
    linear-gradient(180deg, rgba(120, 10, 18, 0.15) 0%, rgba(8, 8, 10, 0) 28%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px);
}

body.ares-mode::after {
  z-index: 0;
  opacity: 0.75;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 58, 58, 0.08) 48%, transparent 100%),
    linear-gradient(180deg, rgba(255, 40, 40, 0.08), transparent 36%);
  mix-blend-mode: screen;
}

body.ares-mode .tesla-navbar {
  background: rgba(8, 10, 13, 0.88) !important;
  border-bottom: 1px solid rgba(255, 74, 74, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.26) !important;
}

body.ares-mode .tesla-navbar.tesla-navbar-scrolled {
  border-bottom-color: rgba(255, 74, 74, 0.26);
}

body.ares-mode .tesla-nav-link,
body.ares-mode .tesla-nav-link.nav-active,
body.ares-mode .tesla-nav-descriptor,
body.ares-mode .tesla-ares-toggle,
body.ares-mode .tesla-dark-toggle {
  color: #f2f4f6 !important;
}

body.ares-mode .tesla-ares-toggle {
  background: rgba(18, 20, 24, 0.96);
  border-color: rgba(255, 74, 74, 0.26);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

body.ares-mode .tesla-ares-toggle.tesla-ares-toggle-active {
  background: #a31724;
  border-color: #d22d3b;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(255, 74, 74, 0.16), 0 14px 30px rgba(123, 10, 20, 0.32);
}

body.ares-mode .tesla-nav-pill {
  background: linear-gradient(135deg, rgba(255, 54, 54, 0.24), rgba(255, 255, 255, 0.06));
}

body.ares-mode .tesla-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(140, 14, 24, 0.18) 0%, rgba(12, 12, 14, 0) 32%),
    radial-gradient(circle at 50% 28%, rgba(255, 72, 72, 0.22) 0%, transparent 36%);
}

body.ares-mode .tesla-hero-overlay {
  background:
    linear-gradient(to bottom, rgba(12, 10, 12, 0.2) 0%, rgba(12, 8, 10, 0.52) 50%, rgba(4, 5, 7, 0.9) 100%),
    radial-gradient(circle at 50% 30%, rgba(255, 58, 58, 0.16) 0%, transparent 34%);
}

body.ares-mode .tesla-section-white {
  background: rgba(8, 10, 13, 0.96);
}

body.ares-mode .tesla-section-gray {
  background: rgba(12, 14, 18, 0.98);
}

body.ares-mode .tesla-section,
body.ares-mode .tesla-footer,
body.ares-mode .spotify-widget {
  position: relative;
  z-index: 1;
}

body.ares-mode .chat-panel,
body.ares-mode .chat-toggle-btn,
body.ares-mode .chat-teaser {
  position: fixed;
  z-index: 9999;
}

body.ares-mode .tesla-section-title,
body.ares-mode .tesla-subsection-title,
body.ares-mode .tesla-info-value,
body.ares-mode .tesla-pip-label,
body.ares-mode .tesla-exp-company,
body.ares-mode .tesla-exp-role,
body.ares-mode .tesla-edu-degree,
body.ares-mode .tesla-project-info h4,
body.ares-mode .tesla-ref-name,
body.ares-mode .tesla-footer-copy,
body.ares-mode .spotify-title,
body.ares-mode .chat-header-title {
  color: #eef1f4;
}

body.ares-mode .tesla-about-text,
body.ares-mode .tesla-info-label,
body.ares-mode .tesla-pip-score,
body.ares-mode .tesla-exp-date,
body.ares-mode .tesla-exp-tenure,
body.ares-mode .tesla-exp-list li,
body.ares-mode .tesla-edu-school,
body.ares-mode .tesla-edu-date,
body.ares-mode .tesla-edu-desc,
body.ares-mode .tesla-project-info p,
body.ares-mode .tesla-ref-title,
body.ares-mode .tesla-testimonial-text blockquote,
body.ares-mode .tesla-contact-link,
body.ares-mode .tesla-footer-tagline,
body.ares-mode .tesla-footer-last-commit,
body.ares-mode .chat-disclaimer,
body.ares-mode .spotify-artist {
  color: #abb3bb;
}

body.ares-mode .tesla-info-item,
body.ares-mode .tesla-exp-card,
body.ares-mode .tesla-edu-desc,
body.ares-mode .tesla-footer-divider {
  border-color: rgba(255, 74, 74, 0.12);
}

body.ares-mode .tesla-skill-tag-group,
body.ares-mode .tesla-project-card,
body.ares-mode .tesla-edu-card,
body.ares-mode .tesla-testimonial,
body.ares-mode .tesla-map-location-badge,
body.ares-mode .tesla-footer,
body.ares-mode .chat-panel,
body.ares-mode .spotify-widget,
body.ares-mode .chat-teaser,
body.ares-mode .tesla-form-input {
  background: rgba(10, 12, 16, 0.92);
  border-color: rgba(255, 74, 74, 0.14);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

body.ares-mode .chat-toggle-btn,
body.ares-mode #backToTop {
  background: #d7d9dd;
  color: #3d4147;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

body.ares-mode .tesla-skill-tag,
body.ares-mode .tesla-footer-tech-tag,
body.ares-mode .chat-bubble-msg,
body.ares-mode .chat-input,
body.ares-mode .chat-panel-header,
body.ares-mode .chat-input-row {
  background: rgba(12, 14, 18, 0.94);
  border-color: rgba(255, 74, 74, 0.12);
  color: #eef1f4;
}

body.ares-mode .chat-msg-user .chat-bubble-msg,
body.ares-mode .tesla-btn-blue,
body.ares-mode .tesla-skill-tag:hover,
body.ares-mode .tesla-footer-tech-tag:hover {
  background: #a31724;
  border-color: #a31724;
  color: #fff;
}

body.ares-mode .tesla-btn-blue:hover {
  background: #bc1d2c;
  border-color: #bc1d2c;
}

body.ares-mode .tesla-btn-outline {
  background: rgba(12, 14, 18, 0.88);
  color: #eef1f4;
  border-color: rgba(255, 255, 255, 0.16);
}

body.ares-mode .tesla-btn-outline:hover {
  background: rgba(22, 24, 30, 0.96);
  border-color: rgba(255, 74, 74, 0.3);
}

body.ares-mode .tesla-exp-list li::before,
body.ares-mode .tesla-contact-link i,
body.ares-mode .tesla-footer-social a,
body.ares-mode .tesla-social-icon,
body.ares-mode .tesla-carousel-control,
body.ares-mode .tesla-slide-arrow,
body.ares-mode .chat-header-btn,
body.ares-mode .chat-close-btn,
body.ares-mode .chat-teaser-icon,
body.ares-mode .chat-teaser-label,
body.ares-mode .spotify-label,
body.ares-mode .tesla-map-location-badge svg {
  color: #ff4a4a !important;
}

body.ares-mode .tesla-map-location-badge {
  color: #eef1f4;
}

body.ares-mode .tesla-project-card:hover,
body.ares-mode .tesla-edu-card:hover,
body.ares-mode .chat-toggle-btn:hover,
body.ares-mode .chat-teaser:hover,
body.ares-mode .spotify-widget:hover {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 74, 74, 0.12);
}

body.ares-mode .chat-toggle-btn:hover,
body.ares-mode #backToTop:hover {
  background: #c7cad0;
  color: #2d3137;
}

body.ares-mode .tesla-nav-logo,
body.ares-mode .tesla-footer-logo {
  filter: brightness(0) saturate(100%) invert(21%) sepia(85%) saturate(3145%) hue-rotate(341deg) brightness(102%) contrast(102%);
  opacity: 0.96;
}

body.ares-mode .squark-logo {
  filter: invert(1);
}

/* === SUCCESS MESSAGE === */
/* === TESLA FSD-STYLE NOTIFICATION TOASTS === */
.tesla-toast-base {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(18, 18, 18, 0.96);
  color: #fff;
  padding: 11px 22px 11px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 4px 24px rgba(0,0,0,0.28), 0 0 0 1px rgba(63,186,26,0.18);
}
.tesla-toast-base .t-check-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: block;
}
.tesla-success-msg {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: none;
  transition: opacity 3s ease;
}
.tesla-success-msg > .tesla-toast-base { /* pill inherits base */ }

/* === COPY TOAST === */
#copyToast {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
#copyToast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.tesla-email-copy {
  cursor: pointer;
  text-decoration-style: dotted !important;
  text-underline-offset: 3px;
}

/* === 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: center;
  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 {
  /* padding: 88px 0 inherited from .tesla-section */
}

.tesla-contact-split {
  display: flex;
  align-items: stretch;
  gap: 52px;
  min-height: 560px;
}

/* LEFT — form column */
.tesla-contact-left {
  flex: 1;
  min-width: 0;
}

/* RIGHT — map column */
.tesla-contact-right {
  flex: 0 0 44%;
  max-width: 44%;
  min-height: 560px;
  align-self: stretch;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

#leafletMap {
  width: 100%;
  height: 100%;
}

/* Tesla-red Leaflet pin */
.tesla-leaflet-pin {
  position: relative;
  display: inline-block;
}
.tesla-leaflet-pulse {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 8px;
  background: radial-gradient(ellipse, rgba(227, 25, 55, 0.55) 0%, transparent 70%);
  border-radius: 50%;
  animation: teslaPinPulse 2s ease-in-out infinite;
}
@keyframes teslaPinPulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(0.9); }
  50%       { opacity: 1;   transform: translateX(-50%) scale(1.35); }
}

/* Location badge on map */
.tesla-map-location-badge {
  position: absolute;
  bottom: 28px;
  left: 24px;
  background: white;
  border-radius: 4px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t-black);
  border: 1px solid rgba(0,0,0,0.08);
  z-index: 1001;
  pointer-events: none;
  letter-spacing: 0.01em;
}

/* Server-side error banner (reCAPTCHA / SMTP failures) */
.tesla-server-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(227, 25, 55, 0.07);
  border: 1px solid rgba(227, 25, 55, 0.35);
  border-radius: 6px;
  color: #c0132b;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}
body.dark-mode .tesla-server-error {
  background: rgba(227, 25, 55, 0.12);
  border-color: rgba(227, 25, 55, 0.4);
  color: #ff6b7a;
}

/* Contact form rows */
.tesla-contact-bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 4px;
}

.tesla-contact-quick-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.tesla-contact-link {
  font-size: 12px;
  color: var(--t-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}
.tesla-contact-link:hover {
  color: var(--t-black);
  text-decoration: none;
}

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

.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;
}

/* === FORM VALIDATION ERROR === */
/* Per-field subtle red border when invalid */
.tesla-form-input--error {
  border-color: rgba(227, 25, 55, 0.5) !important;
}
.tesla-form-input--error:focus {
  border-color: rgba(227, 25, 55, 0.7) !important;
}
/* Error toast — absolutely positioned below the failing field, doesn't push layout */
#formErrorToast {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(18, 18, 18, 0.94);
  color: #fff;
  padding: 5px 10px 5px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  max-width: calc(100% - 2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15), 0 0 0 1px rgba(227,25,55,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
#formErrorToast.visible {
  opacity: 1;
  pointer-events: auto;
}
#formErrorToast .t-err-icon {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
}

/* === FOOTER === */
.tesla-footer {
  background: var(--t-gray);
  padding: 56px 0 36px;
  border-top: 1px solid var(--t-border);
}

/* Top row */
.tesla-footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

/* Brand */
.tesla-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tesla-footer-logo {
  height: 14px;
  width: auto;
  opacity: 0.90;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.tesla-footer-tagline {
  font-size: 12px;
  color: var(--t-muted);
  line-height: 1.7;
  margin: 0;
}

/* Nav links */
.tesla-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  align-items: center;
  padding-top: 4px;
}

.tesla-footer-nav a {
  font-size: 13px;
  color: var(--t-muted);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.tesla-footer-nav a:hover {
  color: var(--t-black);
  text-decoration: none;
}

/* Social icons */
.tesla-footer-social {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-top: 4px;
}

.tesla-footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--t-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t-muted);
  font-size: 15px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.tesla-footer-social a:hover {
  border-color: var(--t-muted);
  color: var(--t-black);
  background: rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

/* Divider */
.tesla-footer-divider {
  border: none;
  border-top: 1px solid var(--t-border);
  margin: 36px 0 28px;
}

/* Bottom row */
.tesla-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.tesla-footer-built {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tesla-footer-built-label {
  font-size: 11px;
  color: var(--t-muted);
  margin-right: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tesla-footer-tech-tag {
  display: inline-block;
  padding: 4px 11px;
  border: 1px solid var(--t-border);
  border-radius: 4px;
  font-size: 12px;
  color: var(--t-muted);
  background: transparent;
  font-weight: 400;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: border-color 0.2s, color 0.2s;
}

a.tesla-footer-tech-tag {
  color: #3e6ae1;
  border-color: rgba(62, 106, 225, 0.35);
}

a.tesla-footer-tech-tag:hover {
  background: #3e6ae1;
  border-color: #3e6ae1;
  color: white;
  text-decoration: none;
}

body.chat-footer-visible .chat-teaser {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(0.85) !important;
  transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.tesla-footer-tag {
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.01em;
}

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

.tesla-footer-copy a {
  color: var(--t-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.tesla-footer-copy a:hover {
  color: var(--t-black);
}

.tesla-footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.tesla-footer-last-commit {
  font-size: 11px;
  color: var(--t-muted);
  margin: 0;
  opacity: 0.55;
  min-height: 1em;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.02em;
}

/* === 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: relative;
  top: auto;
  right: auto;
  z-index: auto;
  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; }

/* Icon subtle fade */
.tesla-dark-toggle .icon-sun,
.tesla-dark-toggle .icon-moon {
  position: absolute;
  display: flex;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.tesla-dark-toggle .icon-sun  { opacity: 0; transform: scale(0.85); }
.tesla-dark-toggle .icon-moon { opacity: 1; transform: scale(1); }
body.dark-mode .tesla-dark-toggle .icon-sun  { opacity: 1; transform: scale(1); }
body.dark-mode .tesla-dark-toggle .icon-moon { opacity: 0; transform: scale(0.85); }
body.dark-mode .tesla-dark-toggle { color: #f0f0f0; }
body.dark-mode .tesla-ares-toggle {
  background: #17181c;
  border-color: rgba(255, 255, 255, 0.08);
  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-link.nav-active {
  color: #ffffff !important;
  font-weight: 600;
}
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-left img.squark-logo { filter: invert(1); }
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-form-label  { color: #6e6e73; }
body.dark-mode .tesla-form-input  {
  background: #111113;
  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-link { color: #6e6e73; }
body.dark-mode .tesla-contact-link:hover { color: #f0f0f0; }
body.dark-mode .tesla-map-location-badge {
  background: #1e1e22;
  color: #f0f0f0;
  border-color: rgba(255,255,255,0.08);
}

/* Footer dark mode */
body.dark-mode .tesla-footer {
  background: var(--t-black);
  border-top-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .tesla-footer-logo {
  filter: brightness(0) invert(1);
  opacity: 0.82;
}
body.dark-mode .tesla-footer-tagline { color: rgba(255, 255, 255, 0.42); }
body.dark-mode .tesla-footer-nav a { color: rgba(255, 255, 255, 0.55); }
body.dark-mode .tesla-footer-nav a:hover { color: rgba(255, 255, 255, 0.92); }
body.dark-mode .tesla-footer-social a {
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.55);
}
body.dark-mode .tesla-footer-social a:hover {
  border-color: rgba(255, 255, 255, 0.45);
  color: white;
  background: rgba(255, 255, 255, 0.07);
}
body.dark-mode .tesla-footer-divider { border-top-color: rgba(255, 255, 255, 0.08); }
body.dark-mode .tesla-footer-built-label { color: rgba(255, 255, 255, 0.35); }
body.dark-mode .tesla-footer-tech-tag { border-color: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.45); }
body.dark-mode a.tesla-footer-tech-tag { color: #7da4f5; border-color: rgba(125, 164, 245, 0.3); }
body.dark-mode a.tesla-footer-tech-tag:hover { background: #3e6ae1; border-color: #3e6ae1; color: white; }
body.dark-mode .tesla-footer-copy { color: rgba(255, 255, 255, 0.3); }
body.dark-mode .tesla-footer-copy a { color: rgba(255, 255, 255, 0.45); }
body.dark-mode .tesla-footer-copy a:hover { color: rgba(255, 255, 255, 0.75); }
body.dark-mode .tesla-footer-last-commit { color: rgba(255, 255, 255, 0.25); }

/* === 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-split {
    flex-direction: column;
    gap: 36px;
  }

  .tesla-contact-left,
  .tesla-contact-right {
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  #leafletMap {
    min-height: 360px;
  }

  .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;
  }

  .tesla-footer-top {
    flex-direction: column;
    gap: 28px;
  }

  .tesla-footer-nav {
    gap: 6px 20px;
  }

  .tesla-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .tesla-footer-right {
    align-items: flex-start;
  }
}

/* ============================================================
   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::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #34c759;
  border: 2px solid #ebebeb;
  box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.4);
  animation: chat-dot-pulse 2.5s infinite;
}
@keyframes chat-dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.45); }
  70%  { box-shadow: 0 0 0 5px rgba(52, 199, 89, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}
.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: 28px;
  right: 76px;
  z-index: 9997;
  background: #ebebeb;
  border-radius: 10px;
  height: 40px;
  padding: 0 14px 0 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: visible;
  margin-bottom: 2px;
  position: relative;
}
.chat-msg-bot .chat-msg-avatar::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #34c759;
  border: 2px solid #fff;
}

body.ares-mode .chat-toggle-btn::after,
body.ares-mode .chat-msg-bot .chat-msg-avatar::after {
  background: #d22d3b;
  box-shadow: 0 0 0 0 rgba(210, 45, 59, 0.4);
}

body.ares-mode .chat-toggle-btn::after {
  border-color: #111318;
}

body.ares-mode .chat-msg-bot .chat-msg-avatar::after {
  border-color: #121418;
}
.chat-msg-avatar img {
  border-radius: 50%;
  overflow: hidden;
}
.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;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s,
              max-width 0.4s cubic-bezier(0.4,0,0.2,1),
              padding 0.4s cubic-bezier(0.4,0,0.2,1),
              opacity 0.4s ease;
  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;
  transition: opacity 0.35s ease, max-height 0.4s cubic-bezier(0.4,0,0.2,1),
              width 0.4s cubic-bezier(0.4,0,0.2,1);
}
.spotify-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
  min-width: 0;
  max-height: 60px; /* explicit so we can transition it */
  transition: opacity 0.35s ease, max-height 0.4s cubic-bezier(0.4,0,0.2,1);
}
.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;
}

@media (max-width: 991px) {
  .tesla-nav-controls {
    top: 10px;
    right: 56px;
  }
}

@media (max-width: 600px) {
  .tesla-nav-controls {
    gap: 8px;
    right: 52px;
  }

  .tesla-ares-toggle,
  .tesla-dark-toggle {
    width: 30px;
    height: 30px;
  }
}
.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; }

/* Collapsed state — icon only pill, expands on hover */
.spotify-widget--collapsed {
  max-width: 42px;
  padding: 9px 10px;
  opacity: 0.75;
}
.spotify-widget--collapsed .spotify-text {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}
.spotify-widget--collapsed .spotify-art {
  width: 0;
  opacity: 0;
  pointer-events: none;
}
.spotify-widget--collapsed:hover {
  max-width: 260px;
  padding: 9px 14px 9px 10px;
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0,0,0,0.18);
}
.spotify-widget--collapsed:hover .spotify-text {
  max-height: 60px;
  opacity: 1;
}
.spotify-widget--collapsed:hover .spotify-art {
  width: 40px;
  opacity: 1;
}

/* Mobile: hide entirely when collapsed (not relevant below about) */
@media (max-width: 768px) {
  .spotify-widget--collapsed {
    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; }

/* =============================================
   GITHUB CODING ACTIVITY SECTION
============================================= */
.github-activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.tesla-subsection-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--t-black, #171a20);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.github-icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.tesla-github-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--t-light-gray, #f4f4f4);
  border: 1px solid var(--t-border, #e0e0e0);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--t-black, #171a20);
  transition: all 0.3s ease;
}

.tesla-github-toggle:hover {
  background: #ebebeb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.tesla-chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.tesla-github-toggle[aria-expanded="true"] .tesla-chevron {
  transform: rotate(180deg);
}

.github-activity-content {
  overflow: visible;
  transition: max-height 0.4s ease-out, opacity 0.3s ease;
  padding-top: 4px;
}

.github-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.github-stat-card {
  background: var(--t-light-gray, #f4f4f4);
  border: 1px solid var(--t-border, #e0e0e0);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.github-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.github-stat-icon {
  font-size: 28px;
  margin-bottom: 8px;
  color: #5c5e62;
  display: flex;
  align-items: center;
  justify-content: center;
}

.github-stat-icon svg {
  stroke: #5c5e62;
  transition: all 0.3s ease;
}

.github-stat-card:hover .github-stat-icon svg {
  stroke: #171a20;
  transform: scale(1.1);
}

.github-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--t-black, #171a20);
  margin-bottom: 6px;
}

.github-stat-label {
  font-size: 12px;
  color: var(--t-muted, #5c5e62);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Coding Status Indicator */
.coding-status-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #00c853;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.7);
  }
  
  50% {
    box-shadow: 0 0 0 8px rgba(0, 200, 83, 0);
  }
  
  100% {
    box-shadow: 0 0 0 0 rgba(0, 200, 83, 0);
  }
}

.github-activity-chart,
.github-recent-commits {
  background: var(--t-light-gray, #f4f4f4);
  border: 1px solid var(--t-border, #e0e0e0);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  overflow: visible;
}

/* R2-D2 Project Visualization */
.r2d2-container {
  background: var(--t-light-gray, #f4f4f4);
  border: 1px solid var(--t-border, #e0e0e0);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.r2d2-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--t-black, #171a20);
  margin-bottom: 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.r2d2-title svg {
  stroke: #5c5e62;
}

.r2d2-visualization {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: center;
}

.r2d2-svg {
  width: 100%;
  height: auto;
  max-width: 200px;
}

.r2d2-eye-light {
  animation: r2d2-blink 3s ease-in-out infinite;
}

@keyframes r2d2-blink {
  0%, 96%, 100% { opacity: 1; }
  98% { opacity: 0.3; }
}

.r2d2-panel {
  transition: all 0.3s ease;
  cursor: pointer;
}

.r2d2-panel:hover {
  stroke-width: 2;
  filter: brightness(1.1);
}

.r2d2-panel.active {
  animation: panel-pulse 2s ease-in-out infinite;
}

@keyframes panel-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.r2d2-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.r2d2-legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--t-border, #e0e0e0);
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.2s ease;
}

.r2d2-legend-item:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.r2d2-legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.r2d2-legend-text {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.r2d2-legend-project {
  font-weight: 500;
  color: var(--t-black, #171a20);
}

.r2d2-legend-hours {
  color: var(--t-muted, #5c5e62);
  font-size: 12px;
}

.github-chart-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--t-black, #171a20);
  margin-bottom: 20px;
}

.github-chart-bars {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 120px;
  padding: 10px 0;
}

.github-chart-bar {
  flex: 1;
  background: linear-gradient(180deg, #5c5e62 0%, #171a20 100%);
  border-radius: 4px 4px 0 0;
  position: relative;
  min-height: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.github-chart-bar:hover {
  background: linear-gradient(180deg, #e31937 0%, #b01429 100%);
  transform: translateY(-4px);
}

.github-chart-bar-label {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--t-muted, #5c5e62);
  white-space: nowrap;
}

.github-chart-bar-value {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  color: var(--t-black, #171a20);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.github-chart-bar:hover .github-chart-bar-value {
  opacity: 1;
}

.github-commits-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.github-commit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--t-border, #e0e0e0);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.github-commit-item:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.github-commit-icon {
  width: 32px;
  height: 32px;
  background: var(--t-light-gray, #f4f4f4);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.github-commit-icon svg {
  stroke: #5c5e62;
}

.github-commit-details {
  flex: 1;
  min-width: 0;
}

.github-commit-message {
  font-size: 14px;
  font-weight: 500;
  color: var(--t-black, #171a20);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.github-commit-meta {
  font-size: 12px;
  color: var(--t-muted, #5c5e62);
}

.github-commit-time {
  font-size: 12px;
  color: var(--t-muted, #5c5e62);
  flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .r2d2-visualization {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .r2d2-svg {
    max-width: 150px;
    margin: 0 auto;
  }
  
  .github-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Dark Mode Support */
body.dark-mode .tesla-subsection-title,
body.dark-mode .tesla-github-toggle,
body.dark-mode .github-stat-value,
body.dark-mode .github-chart-title,
body.dark-mode .github-commit-message {
  color: #f5f5f5;
}

body.dark-mode .tesla-github-toggle,
body.dark-mode .github-stat-card,
body.dark-mode .github-activity-chart,
body.dark-mode .github-recent-commits {
  background: #1a1a1a;
  border-color: #2a2a2a;
}

body.dark-mode .github-commit-item {
  background: #252525;
  border-color: #2a2a2a;
}

body.dark-mode .github-commit-icon {
  background: #2a2a2a;
}

body.dark-mode .github-stat-icon svg,
body.dark-mode .r2d2-title svg,
body.dark-mode .github-commit-icon svg {
  stroke: #a0a0a0;
}

body.dark-mode .github-stat-card:hover .github-stat-icon svg {
  stroke: #f4f4f4;
}

body.dark-mode .status-dot {
  background: #00e676;
  box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7);
}

@keyframes pulse-green-dark {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7);
  }
  
  50% {
    box-shadow: 0 0 0 8px rgba(0, 230, 118, 0);
  }
  
  100% {
    box-shadow: 0 0 0 0 rgba(0, 230, 118, 0);
  }
}

body.dark-mode .status-dot {
  animation: pulse-green-dark 2s infinite;
}

body.dark-mode .r2d2-container {
  background: #1a1a1a;
  border-color: #2a2a2a;
}

body.dark-mode .r2d2-title,
body.dark-mode .r2d2-legend-project {
  color: #f4f4f4;
}

body.dark-mode .r2d2-legend-item {
  background: #252525;
  border-color: #2a2a2a;
}

body.dark-mode .r2d2-legend-hours,
body.dark-mode .github-commit-meta,
body.dark-mode .github-commit-time {
  color: #a0a0a0;
}

/* ============================================================
   WAKATIME PROFESSIONAL DASHBOARD
   ============================================================ */

.wakatime-section {
  background: #ffffff;
  border: 1px solid var(--t-border, #e0e0e0);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
}

.wakatime-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--t-black, #171a20);
  margin: 0 0 24px 0;
  letter-spacing: -0.02em;
}

/* Languages List */
.languages-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lang-item {
  animation: fadeSlideIn 0.4s ease forwards;
  opacity: 0;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lang-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.lang-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--t-black, #171a20);
  letter-spacing: -0.01em;
}

.lang-stats {
  font-size: 13px;
  color: var(--t-muted, #5c5e62);
  font-weight: 500;
}

.lang-bar-container {
  height: 8px;
  background: var(--t-light-gray, #f4f4f4);
  border-radius: 4px;
  overflow: hidden;
}

.lang-bar {
  height: 100%;
  background: linear-gradient(90deg, #5c5e62 0%, #171a20 100%);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Wakatime Grid - Tools & Projects */
.wakatime-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
  overflow: visible;
}

.wakatime-card {
  background: #ffffff;
  border: 1px solid var(--t-border, #e0e0e0);
  border-radius: 10px;
  padding: 20px;
}

.wakatime-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--t-black, #171a20);
  margin: 0 0 20px 0;
  letter-spacing: -0.02em;
}

/* Tools & Projects Lists */
.tools-list,
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-item,
.project-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--t-light-gray, #f4f4f4);
  border-radius: 8px;
  transition: all 0.2s ease;
  animation: fadeSlideIn 0.3s ease forwards;
  opacity: 0;
}

.tool-item:hover,
.project-item:hover {
  background: #e8e8e8;
  transform: translateX(4px);
}

.tool-name,
.project-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--t-black, #171a20);
}

.tool-stats,
.project-stats {
  font-size: 13px;
  color: var(--t-muted, #5c5e62);
  font-weight: 500;
}

/* Dark Mode WakaTime Dashboard */
body.dark-mode .wakatime-section,
body.dark-mode .wakatime-card {
  background: #1a1a1a;
  border-color: #2a2a2a;
}

body.dark-mode .wakatime-section-title,
body.dark-mode .wakatime-card-title,
body.dark-mode .lang-name,
body.dark-mode .tool-name,
body.dark-mode .project-name {
  color: #f4f4f4;
}

body.dark-mode .lang-stats,
body.dark-mode .tool-stats,
body.dark-mode .project-stats {
  color: #a0a0a0;
}

body.dark-mode .lang-bar-container {
  background: #2a2a2a;
}

body.dark-mode .lang-bar {
  background: linear-gradient(90deg, #a0a0a0 0%, #f4f4f4 100%);
}

body.dark-mode .tool-item,
body.dark-mode .project-item {
  background: #252525;
}

body.dark-mode .tool-item:hover,
body.dark-mode .project-item:hover {
  background: #2a2a2a;
}

/* ============================================================
   WAKATIME CUSTOM VISUALIZATIONS
   ============================================================ */

/* Main visualization layout - pie left, heatmap + stream stacked right */
.wakatime-main-visualization {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 20px;
  margin-bottom: 20px;
  overflow: hidden;
}

.wakatime-viz-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  min-width: 0;
}

/* Responsive: stack on smaller screens */
@media (max-width: 992px) {
  .wakatime-main-visualization {
    grid-template-columns: 1fr;
  }
}

.wakatime-viz-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  overflow: hidden;
}

.wakatime-viz-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Pie Chart Styles */
#languagesPieChart {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

.pie-chart-legend {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--t-black, #171a20);
  cursor: pointer;
  transition: all 0.2s ease;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  margin-right: 8px;
  flex-shrink: 0;
}

.legend-label {
  font-weight: 500;
  margin-right: 4px;
}

.legend-percent {
  color: var(--t-light-gray, #5c5e62);
  margin-left: auto;
}

/* Contribution Heatmap Styles */
.contribution-heatmap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0;
  overflow-x: auto;
  overflow-y: auto;
  max-width: 100%;
  max-height: 280px;
}

.contribution-heatmap::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.contribution-heatmap::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.contribution-heatmap::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.contribution-heatmap::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.heatmap-weeks {
  display: flex;
  gap: 4px;
  min-width: max-content;
}

.heatmap-week {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.heatmap-day {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: #ebedf0;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.heatmap-day:hover {
  transform: scale(1.15);
  border: 2px solid var(--t-black, #171a20);
}

.heatmap-day[data-level="0"] { background: #cbd5e1; }
.heatmap-day[data-level="1"] { background: #93c5fd; }
.heatmap-day[data-level="2"] { background: #60a5fa; }
.heatmap-day[data-level="3"] { background: #3b82f6; }
.heatmap-day[data-level="4"] { background: #2563eb; }

/* Dark mode heatmap colors */
.dark-mode .heatmap-day[data-level="0"] { background: #475569; }

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--t-light-gray, #5c5e62);
}

.heatmap-legend-colors {
  display: flex;
  gap: 4px;
}

.heatmap-months {
  display: flex;
  margin-bottom: 4px;
  padding-left: 20px;
  height: 16px;
  overflow: visible;
}

.heatmap-day-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding-right: 4px;
  min-width: 20px;
}

/* Enhanced Activity Timeline */
.github-activity-chart {
  margin-bottom: 32px;
}

.github-chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 200px;
  gap: 12px;
  padding: 24px 16px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.activity-bar-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.activity-bar {
  width: 100%;
  background: linear-gradient(180deg, #4a90e2 0%, #357abd 100%);
  border-radius: 6px 6px 0 0;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  min-height: 4px;
}

.activity-bar:hover {
  background: linear-gradient(180deg, #5aa0f2 0%, #458acd 100%);
  transform: scaleY(1.05);
}

.activity-bar-label {
  font-size: 11px;
  color: var(--t-light-gray, #5c5e62);
  font-weight: 500;
  text-align: center;
}

.activity-bar-hours {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  color: var(--t-black, #171a20);
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.activity-bar:hover .activity-bar-hours {
  opacity: 1;
}

/* Dark Mode for Custom Visualizations */
body.dark-mode .wakatime-viz-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
}

body.dark-mode .legend-item {
  color: #f4f4f4;
}

body.dark-mode .legend-percent {
  color: #a0a0a0;
}

body.dark-mode .heatmap-day[data-level="0"] { background: #374151; }
body.dark-mode .heatmap-day:hover {
  border-color: #f4f4f4;
}

body.dark-mode .github-chart-bars {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
}

body.dark-mode .activity-bar-label {
  color: #a0a0a0;
}

body.dark-mode .activity-bar-hours {
  color: #f4f4f4;
}

/* Activity Stream Styles */
#activityStream {
  background: transparent;
  min-height: 120px;
  max-height: 200px;
  overflow: visible;
}

#activityStream svg {
  display: block;
  width: 100%;
}

/* Language Force Graph Styles */
#languageForceGraph {
  background: var(--t-bg-white, #ffffff);
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s ease;
}

#languageForceGraph svg {
  display: block;
  margin: 0 auto;
  background: transparent;
}

#languageForceGraph text {
  pointer-events: none;
  user-select: none;
}

body.dark-mode #languageForceGraph {
  background: #1a1a1a;
}

body.dark-mode #languageForceGraph text {
  fill: #f4f4f4 !important;
}

body.dark-mode .contribution-heatmap::-webkit-scrollbar-track {
  background: #2a2a2a;
}

body.dark-mode .contribution-heatmap::-webkit-scrollbar-thumb {
  background: #555;
}

body.dark-mode .contribution-heatmap::-webkit-scrollbar-thumb:hover {
  background: #777;
}


body.dark-mode .heatmap-legend {
  color: #a0a0a0;
}

/* Responsive */
@media (max-width: 768px) {
  .wakatime-visualization-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .pie-chart-legend {
    grid-template-columns: 1fr;
  }
  
  .heatmap-day {
    width: 10px;
    height: 10px;
  }
  
  .github-chart-bars {
    height: 150px;
    gap: 8px;
  }
}

/* ============================================================
   END WAKATIME CUSTOM VISUALIZATIONS
   ============================================================ */

/* ============================================================
   END WAKATIME DASHBOARD
   ============================================================ */

/* Responsive */
@media (max-width: 768px) {
  .github-activity-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .github-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .github-chart-bars {
    height: 120px;
  }
}

