@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;700&family=Outfit:wght@300;400;600;700&display=swap');

:root {
  --primary-color: #00d2ff;
  --secondary-color: #3a7bd5;
  --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --card-bg: rgba(18, 22, 42, 0.85);
  --font-main: 'Outfit', 'Poppins', sans-serif;
  --font-nepali: 'Noto Sans Devanagari', sans-serif;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  --transition: 0.25s ease;
  /* Dark (default) — slightly softer than pure black */
  --bg-body: #0d0d14;
  --bg-body-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 210, 255, 0.08), transparent), linear-gradient(180deg, #12121a 0%, #1a1a2e 45%, #0d0d14 100%);
  --text-main: #e8e8ed;
  --text-muted: #b0b5c1;
  --text-dim: #8892a0;
  --surface: rgba(0,0,0,0.25);
  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] {
  --card-bg: rgba(255, 255, 255, 0.92);
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --bg-body: #f0f4f8;
  --bg-body-image: linear-gradient(180deg, #e8eef5 0%, #f0f4f8 40%, #e2e8f0 100%);
  --text-main: #1e293b;
  --text-muted: #475569;
  --text-dim: #64748b;
  --surface: rgba(0,0,0,0.04);
  --border: rgba(0, 0, 0, 0.08);
  --border-subtle: rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

/* Skip link: off-screen until keyboard focus */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  z-index: 10000;
  padding: 0;
  margin: 0;
}

.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  clip: auto;
  overflow: visible;
  padding: 12px 18px;
  margin: 0;
  z-index: 10000;
  background: var(--card-bg);
  color: var(--primary-color);
  font-weight: 600;
  font-family: var(--font-main);
  border-radius: var(--radius-sm);
  border: 2px solid var(--primary-color);
  box-shadow: var(--shadow);
  text-decoration: none;
}

/* --- Accessibility: visible focus rings --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.tabs li:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--primary-color) 35%, transparent),
    0 0 0 1px var(--primary-color);
  border-radius: 12px;
}

.tabs li {
  outline: none;
}

body {
  font-family: var(--font-main);
  background: var(--bg-body);
  background-image: var(--bg-body-image);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text-main);
  margin: 0;
  padding: 28px 0;
  transition: background var(--transition), color var(--transition);
}

.container {
  max-width: 720px;
  width: 95%;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid color-mix(in srgb, var(--primary-color) 45%, transparent);
  box-shadow: var(--shadow), 0 0 60px -15px color-mix(in srgb, var(--primary-color) 25%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  overflow: hidden;
  animation: containerIn 0.6s ease-out;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

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

@media (min-width: 900px) {
  .container {
    max-width: 920px;
  }
}

/* --- Shared content layout (replaces inline styles; respects theme tokens) --- */
.section-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 15px 0;
}

.content-media {
  width: 100%;
  display: block;
  margin-top: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.stack-tight {
  margin-bottom: 5px;
}

.map-label {
  margin: 15px 0 5px 0;
}

.map-frame {
  display: block;
  width: 100%;
  border: 0;
}

.embed-youtube {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-top: 8px;
}

.embed-youtube iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Navigation Tabs --- */
.tabs {
  list-style-type: none;
  padding: 0 16px;
  margin: 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: flex-start;
  background: var(--surface);
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 2px;
  transition: background var(--transition), border-color var(--transition);
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs li {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-dim);
  transition: color var(--transition), background var(--transition);
  font-family: var(--font-main);
  font-size: 0.9rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

.tabs li:hover {
  color: var(--text-main);
  background: rgba(255,255,255,0.04);
}

[data-theme="light"] .tabs li:hover {
  background: rgba(0,0,0,0.04);
}

.tabs li.active {
  color: var(--primary-color);
  background: color-mix(in srgb, var(--primary-color) 12%, transparent);
  border-bottom: 3px solid var(--primary-color);
  font-weight: 600;
  margin-bottom: -1px;
}

[data-theme="light"] .tabs li.active {
  background: color-mix(in srgb, var(--primary-color) 14%, #fff);
  border-bottom: 3px solid var(--primary-color);
  color: var(--primary-color);
  margin-bottom: -1px;
}

.tab-content {
  display: none;
  padding: 32px 36px;
  animation: fadeIn 0.4s ease;
}

.tab-content.active {
  display: block;
}

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

/* --- Theme toggle button --- */
.theme-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.3);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 15;
  transition: background var(--transition), border-color var(--transition), transform 0.2s;
}

.theme-toggle:hover {
  background: rgba(0, 210, 255, 0.25);
  border-color: rgba(0, 210, 255, 0.4);
  transform: scale(1.05);
}

[data-theme="light"] .theme-toggle {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.1);
  color: #1e293b;
}

[data-theme="light"] .theme-toggle:hover {
  background: #fff;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.theme-toggle .hidden { display: none !important; }

.theme-toggle #theme-icon-light { display: none; }
[data-theme="light"] .theme-toggle #theme-icon-dark { display: none; }
[data-theme="light"] .theme-toggle #theme-icon-light { display: inline-block !important; }

/* --- Profile & Cover --- */
/* Moving wallpaper behind profile (video fills cover box only) */
.cover-video-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  z-index: 0;
  pointer-events: none;
}

.cover-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.cover {
  height: 230px;
  position: relative;
  margin-bottom: 88px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary-color) 18%, #16213e) 0%, color-mix(in srgb, var(--secondary-color) 12%, #1a1a3e) 50%, #0f172a 100%);
  background-image:
    linear-gradient(color-mix(in srgb, var(--primary-color) 8%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--primary-color) 8%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  border-bottom: 1px solid color-mix(in srgb, var(--primary-color) 50%, transparent);
  box-shadow: 0 8px 32px color-mix(in srgb, var(--primary-color) 20%, transparent);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: visible;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

[data-theme="light"] .cover {
  background: linear-gradient(145deg, #e0f2fe 0%, #bae6fd 40%, #7dd3fc 100%);
  background-image:
    linear-gradient(rgba(0, 210, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 210, 255, 0.08) 1px, transparent 1px);
  border-bottom-color: rgba(0, 210, 255, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.cover::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 1;
  background: linear-gradient(180deg, rgba(13, 13, 20, 0.3) 0%, rgba(13, 13, 20, 0.75) 100%);
  border-radius: var(--radius) var(--radius) 0 0;
  pointer-events: none;
}

[data-theme="light"] .cover::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.6) 100%);
}

/* Profile picture — slightly larger, clearer ring */
.cover .profile-pic {
  width: 140px;
  height: 140px;
  padding: 4px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border-radius: 50%;
  position: absolute;
  bottom: -70px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 14px 48px color-mix(in srgb, var(--primary-color) 35%, transparent), 0 0 0 1px rgba(255,255,255,0.12);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.35s, border-color var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.cover .profile-pic img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  transition: border-color var(--transition);
}

.cover .profile-pic:hover {
  transform: translateX(-50%) scale(1.05) translateY(-5px);
  box-shadow: 0 0 35px color-mix(in srgb, var(--primary-color) 55%, transparent);
}

.text-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

[data-theme="light"] .text-center {
  background: transparent;
}

/* Story mode tour button — matches subtitle / tab accent styling */
.tour-start-btn {
  margin: 10px auto 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 100px;
  border: 1px solid color-mix(in srgb, var(--primary-color) 35%, transparent);
  background: color-mix(in srgb, var(--primary-color) 14%, transparent);
  color: var(--primary-color);
  font-family: var(--font-main);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 20px color-mix(in srgb, var(--primary-color) 12%, transparent);
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), transform 0.15s ease;
}

.tour-start-btn:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--primary-color) 22%, transparent);
  border-color: color-mix(in srgb, var(--primary-color) 55%, transparent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--primary-color) 25%, transparent);
}

[data-theme="light"] .tour-start-btn {
  background: color-mix(in srgb, var(--primary-color) 12%, #fff);
  color: var(--primary-color);
  border-color: color-mix(in srgb, var(--primary-color) 35%, transparent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--primary-color) 10%, transparent);
}

[data-theme="light"] .tour-start-btn:hover {
  background: color-mix(in srgb, var(--primary-color) 18%, #fff);
  border-color: color-mix(in srgb, var(--primary-color) 50%, transparent);
}

/* Story mode overlay */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

.tour-overlay:not(.hidden) {
  pointer-events: auto;
}

.tour-overlay.hidden {
  display: none;
}

.tour-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  pointer-events: auto;
}

.tour-tooltip {
  position: absolute;
  max-width: 320px;
  background: var(--card-bg);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  pointer-events: auto;
  font-size: 0.9rem;
  border: 1px solid color-mix(in srgb, var(--primary-color) 45%, transparent);
  font-family: var(--font-main);
  /* Default center position so it is always visible,
     JS will override top/left when positioning near sections */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

[data-theme="light"] .tour-tooltip {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.tour-step-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-color);
  margin-bottom: 4px;
  font-weight: 600;
}

.tour-step-text {
  margin-bottom: 8px;
  color: var(--text-muted);
  line-height: 1.5;
}

.tour-step-progress {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-bottom: 10px;
  color: var(--text-dim);
}

.tour-step-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.tour-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: color-mix(in srgb, var(--primary-color) 15%, #020617);
  color: #e5e7eb;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: 500;
}

.tour-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.tour-exit {
  background: transparent;
  border-color: transparent;
  color: var(--text-dim);
}

h1 {
  font-family: var(--font-main);
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, var(--primary-color) 60%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  transition: background var(--transition);
}

/* Hero: stack and center title + subtitle (overrides generic h1 / .subtitle display) */
.text-center h1 {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.text-center .subtitle {
  display: block;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
}

[data-theme="light"] h1 {
  color: var(--primary-color);
  background: none;
  -webkit-text-fill-color: var(--primary-color);
}

.subtitle {
  display: inline-block;
  background: color-mix(in srgb, var(--primary-color) 14%, transparent);
  color: var(--primary-color);
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--primary-color) 35%, transparent);
  margin-bottom: 28px;
  box-shadow: 0 0 20px color-mix(in srgb, var(--primary-color) 12%, transparent);
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}
/* --- Typography & Info Blocks --- */
.tab-content strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text-main);
  font-size: 1.1em;
}

.tab-content > h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  transition: color var(--transition);
}

.tab-content > h3 + p {
  margin-top: 0;
}

.tab-content .intro-lead {
  font-size: 1.05rem;
  margin-top: 8px;
}

.tab-content p {
  margin: 0 0 16px 0;
  text-align: left;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
  transition: color var(--transition);
}

.info-block {
  background: color-mix(in srgb, var(--primary-color) 4%, transparent);
  padding: 22px;
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary-color);
  transition: background var(--transition), border-color var(--transition);
}

[data-theme="light"] .info-block {
  background: rgba(0, 210, 255, 0.06);
  border-color: rgba(0, 0, 0, 0.06);
}

/* Hometown time & weather card — readable in both themes */
.hometown-time-card {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  border: 1px solid var(--border);
}

.hometown-clock {
  font-size: 18px;
  font-weight: bold;
  color: var(--primary-color);
}

.hometown-date {
  font-size: 14px;
  color: #b8c4d0;
  margin-top: 2px;
}

.hometown-card-hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 10px 0;
}

.hometown-weather {
  font-size: 18px;
  font-weight: bold;
  color: #fad648;
}

[data-theme="light"] .hometown-time-card {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .hometown-clock {
  color: var(--primary-color);
}

[data-theme="light"] .hometown-date {
  color: #475569;
}

[data-theme="light"] .hometown-card-hr {
  border-top-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .hometown-weather {
  color: #b45309;
}

.info-block h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 12px;
}

/* --- Games section --- */
.hidden { display: none !important; }

.game-card {
  background: color-mix(in srgb, var(--primary-color) 4%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 26px;
  margin-top: 22px;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

[data-theme="light"] .game-card {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

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

.game-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.game-score {
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: 600;
}

.game-question {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.game-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-choice {
  width: 100%;
  padding: 14px 18px;
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform 0.15s;
}

[data-theme="light"] .game-choice {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

.game-choice:hover:not(:disabled) {
  background: rgba(0, 210, 255, 0.12);
  border-color: rgba(0, 210, 255, 0.35);
  transform: translateX(4px);
}

.game-choice.correct {
  background: rgba(81, 207, 102, 0.2);
  border-color: #51cf66;
  color: #fff;
}

.game-choice.wrong {
  background: rgba(255, 107, 107, 0.2);
  border-color: #ff6b6b;
  color: #fff;
}

.game-choice:disabled {
  cursor: default;
  opacity: 0.9;
}

.game-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.game-btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  border: none;
}

.game-btn.primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #0f0c29;
}

.game-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 210, 255, 0.35);
}

.game-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(0, 210, 255, 0.3);
}

.game-btn.secondary:hover {
  background: rgba(0, 210, 255, 0.15);
}

.game-result {
  margin-top: 24px;
  padding: 16px;
  background: rgba(0, 210, 255, 0.08);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 210, 255, 0.2);
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

[data-theme="light"] .game-result {
  background: rgba(0, 210, 255, 0.1);
  border-color: rgba(0, 210, 255, 0.25);
  color: var(--text-muted);
}

/* --- Spotify Player Styles (accent aligned to theme) --- */
.spotify-player {
  background: linear-gradient(to bottom, #2a2a2a, #141414);
  padding: 22px;
  border-radius: var(--radius-sm);
  text-align: center;
  margin-top: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  max-width: 350px;
  margin-left: auto;
  margin-right: auto;
}

.album-art img {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  margin-bottom: 15px;
  object-fit: cover;
}

.track-info {
  margin-bottom: 15px;
}

.track-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
}

.artist-name {
  font-size: 14px;
  color: #b3b3b3;
}

.progress-container {
  background-color: #535353;
  border-radius: 5px;
  cursor: pointer;
  margin: 10px 0;
  height: 4px;
  width: 100%;
}

.progress {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 5px;
  height: 100%;
  width: 0%;
  transition: width 0.1s linear;
}

.time-stamps {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #b3b3b3;
  margin-bottom: 15px;
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.control-btn {
  background: none;
  border: none;
  color: #b3b3b3;
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s;
}

.control-btn:hover {
  color: #fff;
}

.play-btn {
  background-color: #fff;
  color: #000;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s;
}

.play-btn:hover {
  transform: scale(1.05);
}

/* --- CHATBOT STYLES (MODERNIZED & FIXED) --- */
.chat-widget {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  right: calc(20px + env(safe-area-inset-right, 0px));
  z-index: 1000;
  font-family: var(--font-main);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* --- VOICE ASSISTANT STYLES --- */
.voice-btn {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
  border: none;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
}

.voice-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

.voice-btn.listening {
  animation: voice-pulse 1s ease-in-out infinite;
  background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

.voice-btn:disabled,
.voice-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
  filter: grayscale(0.2);
}

.voice-btn:disabled:hover,
.voice-btn[aria-disabled="true"]:hover {
  transform: none;
  box-shadow: none;
}

/* Voice button inside chat — next to send button */
.chat-voice-btn {
  width: 45px !important;
  height: 45px !important;
  font-size: 18px !important;
  flex-shrink: 0;
  margin-right: 0 !important;
}

.chat-voice-btn i {
  color: #fff;
}

/* Voice status when inside chat */
.chat-voice-status {
  margin-left: 0;
  margin-bottom: 0;
  padding: 8px 12px;
  display: none;
}

.chat-voice-status.active {
  display: block;
}

@keyframes voice-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4); }
  50% { transform: scale(1.15); box-shadow: 0 6px 25px rgba(245, 87, 108, 0.8); }
}

.voice-status {
  display: none;
  font-size: 12px;
  color: var(--primary-color);
  padding: 6px 12px;
  background: rgba(0, 210, 255, 0.15);
  border-radius: 20px;
  border: 1px solid rgba(0, 210, 255, 0.3);
  white-space: nowrap;
}

.voice-status.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.voice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-help-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  color: var(--primary-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}

.voice-help-btn:hover {
  background: rgba(0, 210, 255, 0.2);
  border-color: var(--primary-color);
}

.voice-commands-panel {
  display: none;
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 8px;
  width: 300px;
  max-width: 90vw;
  background: var(--card-bg);
  border: 1px solid color-mix(in srgb, var(--primary-color) 45%, transparent);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.5;
  animation: fadeIn 0.25s ease;
}

[data-theme="light"] .voice-commands-panel {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 210, 255, 0.4);
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
}

[data-theme="light"] .voice-commands-list li { color: var(--text-muted); }

.voice-commands-panel.open {
  display: block;
}

.voice-commands-header {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-commands-list {
  list-style: none;
  padding: 0;
  margin: 0;
  color: #b0b5c1;
}

.voice-commands-list li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.voice-commands-list li:last-child {
  border-bottom: none;
}

.voice-commands-list strong {
  color: #e0e0e0;
  display: inline-block;
  min-width: 70px;
}

.chat-toggle-btn {
  background: var(--primary-color);
  color: #0f0c29;
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chat-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.6);
}

.chat-box {
  display: none;
  flex-direction: column;
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 340px;
  max-width: calc(100vw - 24px);
  height: 480px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid color-mix(in srgb, var(--primary-color) 45%, transparent);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 40px -10px color-mix(in srgb, var(--primary-color) 20%, transparent);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

[data-theme="light"] .chat-box {
  background: var(--card-bg);
  border-color: color-mix(in srgb, var(--primary-color) 45%, transparent);
  box-shadow: var(--shadow), 0 0 30px -8px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

.chat-box.open {
  display: flex;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
}

.chat-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18);
}

.chat-status-dot.status-online {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.chat-status-dot.status-offline {
  background: #f97373;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.25);
}

.chat-status-text {
  font-weight: 500;
}

.chat-call-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: #0f0c29;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(15, 12, 41, 0.5), 0 8px 18px rgba(0, 210, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.chat-call-btn:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 0 0 1px rgba(15, 12, 41, 0.7), 0 10px 24px rgba(0, 210, 255, 0.4);
}

.chat-call-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 4px 14px rgba(0, 210, 255, 0.22);
}

.chat-call-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

[data-theme="light"] .chat-call-btn {
  color: #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.15), 0 8px 18px rgba(15, 23, 42, 0.2);
}

/* --- Accessibility: reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  /* Hero video off for users who prefer reduced motion (gradient cover remains) */
  .cover-video-bg {
    display: none !important;
  }
}

.chat-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 16px 18px;
  color: #0f0c29;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  flex-shrink: 0;
  transition: background var(--transition);
}

.call-screen {
  display: none;
  flex: 1;
  padding: 20px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: radial-gradient(
    circle at top,
    color-mix(in srgb, var(--primary-color) 25%, transparent),
    transparent 55%
  );
}

.call-screen.active {
  display: flex;
}

[data-theme="light"] .call-screen {
  background: radial-gradient(
    circle at top,
    color-mix(in srgb, var(--primary-color) 18%, transparent),
    transparent 55%
  );
}

.call-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.call-avatar {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  background: rgba(15, 12, 41, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.6rem;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--primary-color) 85%, transparent),
    0 0 26px color-mix(in srgb, var(--primary-color) 55%, transparent);
}

[data-theme="light"] .call-avatar {
  background: rgba(15, 23, 42, 0.9);
}

.call-name {
  font-weight: 600;
  font-size: 1rem;
}

.call-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.call-status-text {
  font-weight: 500;
}

.call-timer {
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}

.call-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.call-record-btn,
.call-end-btn {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.call-record-btn {
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.5);
}

.call-record-btn.recording {
  background: #ef4444;
  color: #fee2e2;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.8), 0 0 16px rgba(248, 113, 113, 0.6);
}

.call-end-btn {
  background: #ef4444;
  color: #fee2e2;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.8), 0 0 18px rgba(248, 113, 113, 0.5);
}

.call-end-btn i {
  transform: rotate(135deg);
}

.call-record-btn:hover,
.call-end-btn:hover {
  transform: translateY(-1px) scale(1.03);
}

.call-record-btn:active,
.call-end-btn:active {
  transform: translateY(0) scale(0.96);
}

.call-record-btn[disabled],
.call-end-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.call-record-btn.muted {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.5);
}

/* --- Video Call Screen (Anam) --- */

.video-call-screen {
  display: none;
  flex: 1;
  flex-direction: column;
  position: relative;
  background: #0a0a0f;
  overflow: hidden;
}

.video-call-screen.active {
  display: flex;
}

.video-call-connecting {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(
    circle at top,
    color-mix(in srgb, var(--primary-color) 25%, transparent),
    #0a0a0f 55%
  );
  transition: opacity 0.4s ease;
}

.video-call-connecting.hidden {
  opacity: 0;
  pointer-events: none;
}

.video-call-avatar-icon {
  width: 70px;
  height: 70px;
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 85%, transparent), 0 0 26px color-mix(in srgb, var(--primary-color) 55%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary-color) 40%, transparent), 0 0 40px color-mix(in srgb, var(--primary-color) 30%, transparent); }
  100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 85%, transparent), 0 0 26px color-mix(in srgb, var(--primary-color) 55%, transparent); }
}

.video-call-status-text {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
}

.video-call-frame {
  width: 100%;
  flex: 1;
  position: relative;
  z-index: 1;
  background: transparent;
  overflow: hidden;
}

.video-call-frame .anam-video-stack {
  position: absolute;
  inset: 0;
  background: #000;
}

.video-call-frame .anam-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Background fills the whole frame to remove black bars */
.video-call-frame .anam-video-bg {
  object-fit: cover;
  object-position: center;
  filter: blur(22px) saturate(1.08) brightness(0.9);
  transform: scale(1.25);
  z-index: 0;
}

/* Foreground shows full face (zoomed out) */
.video-call-frame .anam-video-fg {
  object-fit: contain;
  object-position: center;
  z-index: 1;
}

.video-call-frame iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
}

.video-call-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 12px 0;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.18) 40%);
  backdrop-filter: blur(6px);
}

[data-theme="light"] .video-call-screen {
  background: #f0f2f5;
}

[data-theme="light"] .video-call-connecting {
  background: radial-gradient(
    circle at top,
    color-mix(in srgb, var(--primary-color) 18%, transparent),
    #f0f2f5 55%
  );
}

.chat-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-header-title i {
  font-size: 1.1rem;
  opacity: 0.95;
}

.chat-close-btn {
  background: rgba(0,0,0,0.15);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #0f0c29;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.chat-close-btn:hover {
  background: rgba(0,0,0,0.25);
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent !important;
  min-height: 0;
}

.message {
  padding: 12px 14px;
  border-radius: 14px;
  max-width: 88%;
  font-size: 0.9rem;
  line-height: 1.5;
  word-wrap: break-word;
  animation: messageIn 0.25s ease;
}

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

.chat-welcome {
  border-radius: 14px 14px 14px 4px;
}

.bot-message {
  background: rgba(255,255,255,0.06) !important;
  color: #e2e8f0 !important;
  align-self: flex-start;
  border-radius: 14px 14px 14px 4px;
  border-left: 3px solid var(--primary-color);
}

[data-theme="light"] .bot-message {
  background: rgba(0,0,0,0.05) !important;
  color: #1e293b !important;
  border-left-color: var(--primary-color);
}

.user-message {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)) !important;
  color: #fff !important;
  align-self: flex-end;
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 2px 12px color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.quick-replies {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.chip {
  background: color-mix(in srgb, var(--primary-color) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary-color) 55%, transparent);
  color: var(--primary-color);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover {
  background: color-mix(in srgb, var(--primary-color) 22%, transparent);
  transform: translateY(-1px);
}

.chip:hover {
  background: var(--primary-color);
  color: #0f0c29;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.35);
}

.typing-indicator {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-left: 4px;
  margin-bottom: 8px;
  display: none;
  align-items: center;
  gap: 6px;
}


.chat-input-area {
  padding: 12px 15px;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.2);
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.chat-input-area input {
  flex: 1 !important;
  min-width: 0;
}

.chat-input-area input {
  flex: 1 !important;
  padding: 10px 15px !important;
  border-radius: 25px !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  background: rgba(255,255,255,0.05) !important;
  color: #fff !important;
  height: 45px !important;
  transition: border-color 0.3s;
}

.chat-input-area input:focus {
  border-color: var(--primary-color) !important;
  outline: none;
}

[data-theme="light"] .chat-input-area {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .chat-input-area input {
  border: 1px solid rgba(0, 0, 0, 0.18) !important;
  background: #fff !important;
  color: #1e293b !important;
}

[data-theme="light"] .chat-input-area input::placeholder {
  color: #64748b;
}

[data-theme="light"] .chat-input-area input:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.2);
}

/* Generic button styles — overridden by specific classes below */
.chat-input-area button {
  padding: 0 !important;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* --- Map Container --- */
.map-container iframe {
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  filter: grayscale(20%) contrast(110%);
  transition: filter 0.3s, border-color var(--transition), box-shadow var(--transition);
}

.map-container iframe:hover {
  filter: grayscale(0%) contrast(100%);
}

[data-theme="light"] .map-container iframe {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

/* --- Modern Project Card Styles --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 25px;
}

.project-card {
  background: rgba(22, 33, 62, 0.6);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 25px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
}

[data-theme="light"] .project-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .project-card h4 { color: #0f172a; }
[data-theme="light"] .project-card p { color: var(--text-muted); }

[data-theme="light"] .project-card:hover {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .project-card::before {
  opacity: 0.22;
}

[data-theme="light"] .project-card:hover::before {
  opacity: 0;
}

[data-theme="light"] .project-card:hover .icon-box {
  background: rgba(0, 0, 0, 0.06);
  color: #475569;
}

[data-theme="light"] .project-card:hover .tech-stack span {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: none;
}

.project-card:hover {
  transform: translateY(-6px);
  background: rgba(22, 33, 62, 0.92);
  border-color: color-mix(in srgb, var(--primary-color) 70%, transparent);
  box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  opacity: 0.38;
  transition: opacity 0.3s;
}

.project-card:hover::before {
  opacity: 1;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.icon-box {
  width: 50px;
  height: 50px;
  background: rgba(0, 210, 255, 0.1);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-color);
  font-size: 24px;
  transition: transform 0.3s, background 0.3s;
}

.project-card:hover .icon-box {
  transform: rotate(-10deg) scale(1.1);
  background: var(--primary-color);
  color: #0f0c29;
}

.code-btn {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: #ccc;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-btn:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

[data-theme="light"] .code-btn {
  color: var(--text-muted);
  border-color: var(--border);
}

[data-theme="light"] .code-btn:hover {
  background: var(--primary-color);
  color: #0f172a;
  border-color: var(--primary-color);
}

.project-card h4 {
  color: #fff;
  font-size: 1.4rem;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.project-card p {
  font-size: 14px;
  color: #b0b5c1;
  line-height: 1.6;
  margin-bottom: 25px;
  flex-grow: 1;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tech-stack span {
  font-size: 11px;
  font-weight: 500;
  color: var(--primary-color);
  border: 1px solid rgba(0, 210, 255, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  background: transparent;
  transition: all 0.3s;
}

.project-card:hover .tech-stack span {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

/* --- UNIVERSAL ICON FIXES --- */
h3 i, strong i, p strong i {
  color: var(--primary-color);
  margin-right: 10px;
  width: 20px;
  text-align: center;
  filter: drop-shadow(0 0 5px rgba(0, 210, 255, 0.4));
}

.tabs li i {
  margin-right: 8px;
}

.chat-toggle-btn i {
  font-size: 24px;
}

/* Icon styles handled by specific button classes */

.controls button i {
  font-size: 18px;
}

.play-btn span {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.play-btn i {
  color: #000;
  margin-left: 4px;
}

/* Send button — proper size and alignment */
.chat-send-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
  border-radius: 12px !important;
  width: 48px !important;
  height: 45px !important;
  display: flex !important;
  justify-content: center;
  align-items: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-color) 35%, transparent);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  flex-shrink: 0;
}

.chat-send-btn i {
  color: #0f0c29 !important;
  font-size: 18px !important;
  margin: 0 !important;
}

.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--primary-color) 45%, transparent);
}

/* Voice button — blue theme, changes with color */
.chat-input-area .chat-voice-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
  color: #fff !important;
  border-radius: 12px !important;
  width: 48px !important;
  height: 45px !important;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-color) 35%, transparent);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  flex-shrink: 0;
}

.chat-input-area .chat-voice-btn i {
  color: #fff !important;
  font-size: 18px !important;
}

.chat-input-area .chat-voice-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--primary-color) 45%, transparent);
}

.chat-input-area .chat-voice-btn.listening {
  animation: voice-pulse 1s ease-in-out infinite;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--primary-color) 60%, transparent);
}

/* --- MODERN CONTACT SECTION (Row Layout) --- */
.contact-grid {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.social-btn {
  flex: 1;
  min-width: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.social-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.resume-btn {
  background: linear-gradient(135deg, #FF512F 0%, #DD2476 100%);
}

.linkedin-btn {
  background: linear-gradient(135deg, #0077b5 0%, #00d2ff 100%);
}

.github-btn {
  background: linear-gradient(135deg, #24292e 0%, #1f2328 100%);
}

.btn-icon {
  margin-right: 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.arrow-icon {
  display: none;
}

/* Hide text on very small screens if needed */
@media (max-width: 350px) {
  .social-btn span { display: none; }
  .btn-icon { margin: 0; font-size: 18px; }
}

/* --- MODERN CONTACT FORM --- */
.form-container {
  margin-top: 40px;
  background: color-mix(in srgb, var(--primary-color) 4%, transparent);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 15px;
}

.form-status {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 0;
  transition: opacity 0.2s;
}
.form-status:empty {
  display: none;
}
.form-status-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}
[data-theme="light"] .form-status-success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: #15803d;
}
.form-status-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
[data-theme="light"] .form-status-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
  color: #b91c1c;
}

/* Floating Label Inputs */
.input-group {
  position: relative;
}

.input-group input, 
.input-group textarea {
  width: 100%;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 15px;
  outline: none;
  transition: all 0.3s;
}

[data-theme="light"] .input-group input,
[data-theme="light"] .input-group textarea {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: #1e293b;
}

.input-group textarea {
  resize: vertical; /* Allows user to resize height */
}

.message-count {
  display: block;
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Focus Effects */
.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
}

/* Floating Label Logic */
.input-group label {
  position: absolute;
  top: 12px;
  left: 15px;
  color: #aaa;
  font-size: 14px;
  pointer-events: none;
  transition: 0.3s ease all;
}

/* Move label up when focused or has text */
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
  top: -10px;
  left: 10px;
  font-size: 11px;
  background: var(--primary-color);
  color: #0f0c29;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

/* Submit Button */
.send-btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #0f0c29;
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.send-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px color-mix(in srgb, var(--primary-color) 45%, transparent);
}

.send-btn i {
  font-size: 16px;
  transition: transform 0.3s;
}

.send-btn:hover i {
  transform: translateX(5px) rotate(-10deg);
}

#hometown .content-media {
  height: 240px;
  object-fit: cover;
}

#favcity .content-media {
  height: 300px;
  object-fit: cover;
}

/* --- News tab --- */
.news-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
}

.news-item {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.news-item:hover {
  border-color: color-mix(in srgb, var(--primary-color) 45%, transparent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.news-link {
  display: block;
  padding: 14px 16px 14px 19px;
  text-decoration: none;
  color: var(--text-main);
  border-left: 3px solid transparent;
  transition: border-left-color var(--transition), color var(--transition);
}

.news-item:hover .news-link {
  border-left-color: var(--primary-color);
}

.news-link:hover {
  color: var(--primary-color);
}

.news-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  margin-bottom: 4px;
}

.news-desc {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 4px;
}

.news-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.news-loading,
.news-error,
.news-empty {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  padding: 1rem 0;
}