:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bg-page: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #1a2234;
  --bg-surface-hover: #222d42;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.45);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(79, 70, 229, 0.4);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #4f46e5;
  --accent-light: #6366f1;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip; /* Clip horizontal overflow without disabling position: sticky */
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Material Symbols Rounded standard styling & animations */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

@keyframes iconWave {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(18deg) scale(1.18); }
  40% { transform: rotate(-12deg) scale(1.18); }
  60% { transform: rotate(16deg) scale(1.18); }
  80% { transform: rotate(-6deg) scale(1.12); }
}

@keyframes iconPulseSubtle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2.5px); }
}

@keyframes iconSpinSubtle {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ambient-glow {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: 600px;
  height: 350px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0.85rem 0.85rem 5rem 0.85rem;
  position: relative;
  z-index: 1;
}

/* App-like Top Bar */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  position: -webkit-sticky;
  position: sticky;
  top: 0.5rem;
  z-index: 1000;
}

.brand {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.brand .material-symbols-rounded {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover, .nav-link:active {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.25rem;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-focus);
}

/* Base Card */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-sm);
}

/* Hero Section */
.hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  text-align: left;
}

.hero-left {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.hero-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.avatar-wrapper {
  position: relative;
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  margin: 0;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  object-position: center;
  border: 2px solid var(--border-subtle);
}

.status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background-color: #64748b; /* Default muted gray for offline */
  border: 2px solid var(--bg-surface);
  border-radius: 50%;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.status-indicator.online {
  background-color: #10b981; /* Glowing vibrant green when working in VM */
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25), 0 0 8px rgba(16, 185, 129, 0.75);
  animation: liveDotPulse 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-indicator.offline {
  background-color: #64748b; /* Slate gray when offline/away */
  box-shadow: none;
}

@keyframes liveDotPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25), 0 0 8px rgba(16, 185, 129, 0.75);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15), 0 0 12px rgba(16, 185, 129, 0.9);
  }
}

.hero-title-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.hero-title-group h1 {
  font-size: clamp(1.3rem, 3.5vw, 1.7rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
}

.hero-subtitle {
  font-size: 0.86rem;
  color: var(--accent-light);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.15rem 0 0.35rem 0;
  justify-content: flex-start;
  text-align: left;
}

.hero-bio {
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.45;
  margin-bottom: 0.65rem;
  text-align: left;
}

.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0;
  justify-content: flex-start;
}

.hero-right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.hero-right .action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 170px;
}

.hero-right .action-buttons .btn {
  width: 100%;
  justify-content: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.55rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.chip .material-symbols-rounded {
  font-size: 14px;
  color: var(--accent);
  animation: iconPulseSubtle 3.2s ease-in-out infinite;
}

.chip:hover .material-symbols-rounded {
  transform: scale(1.25) rotate(6deg);
}

/* Circular Social Media Buttons at Top */
.social-circles {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.circle-btn .material-symbols-rounded {
  font-size: 18px;
}

.circle-btn:hover {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px) scale(1.12);
}

.circle-btn:active {
  transform: scale(0.95);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.42rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  min-height: 36px;
  width: fit-content;
  max-width: max-content;
  flex: 0 0 auto;
  white-space: nowrap;
}

.btn .material-symbols-rounded {
  font-size: 18px;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn:hover .material-symbols-rounded {
  transform: scale(1.22);
}

.btn:active .material-symbols-rounded {
  transform: scale(0.92);
}

.btn[href*="mailto"]:hover .material-symbols-rounded {
  animation: iconWave 0.8s ease-in-out infinite;
}

.btn[href*="calendar"]:hover .material-symbols-rounded,
.btn[href*="calendly"]:hover .material-symbols-rounded {
  animation: iconPulseSubtle 0.8s ease-in-out infinite;
}

.btn[href*="buymeacoffee"]:hover .material-symbols-rounded {
  animation: iconFloat 0.7s ease-in-out infinite;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: #4f46e5;
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-focus);
}

/* Section Titles & Headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.25rem 0 0.65rem 0;
  gap: 0.4rem;
  flex-wrap: nowrap;
  width: 100%;
}

.section-header .section-title {
  margin: 0;
  white-space: nowrap;
  flex-shrink: 1;
}

.section-header .btn {
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.25rem 0 0.65rem 0;
}

.section-title .material-symbols-rounded {
  color: var(--accent);
  font-size: 20px;
  animation: iconFloat 3.5s ease-in-out infinite;
}

.btn-sm {
  padding: 0.28rem 0.65rem;
  font-size: 0.74rem;
  min-height: 28px;
  gap: 0.25rem;
}

.btn-sm .material-symbols-rounded {
  font-size: 15px;
}

/* Projects Deck */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 0.75rem;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.project-card:hover {
  border-color: var(--border-focus);
}

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-light);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}

.project-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0.35rem 0 0.2rem 0;
}

.project-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 0.65rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
}

.tag {
  font-size: 0.68rem;
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.project-footer {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 500;
}

.project-link:hover {
  color: var(--accent);
}

/* Skills Deck (37 Items) */
.skills-deck {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.35rem;
}

.skill-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.4rem 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
}

.skill-tile:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-focus);
}

.skill-tile img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.skill-tile-name {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Observability & Badges */
.observability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.badge-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.badge-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.badge-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-card-title .material-symbols-rounded {
  color: var(--accent);
  font-size: 16px;
}

.badge-card-content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0;
  overflow-x: auto;
}

.badge-card-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-xs);
}

.badge-card-content iframe {
  width: 100%;
  max-width: 100%;
  border: none;
}

.wcg-frame-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  height: 190px;
  background: #ffffff;
  border-radius: var(--radius-xs);
}

.wcg-frame-wrapper iframe {
  width: 405px;
  height: 190px;
  border: none;
  display: block;
  transform-origin: center center;
}

@media (max-width: 480px) {
  .wcg-frame-wrapper {
    height: 160px;
  }
  .wcg-frame-wrapper iframe {
    transform: scale(0.82);
  }
}

@media (max-width: 380px) {
  .wcg-frame-wrapper {
    height: 145px;
  }
  .wcg-frame-wrapper iframe {
    transform: scale(0.72);
  }
}

/* Photography Showcase Slider */
.photo-slider-wrapper {
  width: 100%;
  overflow-x: auto;
  padding: 0.25rem 0 0.75rem 0;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.photo-slider-wrapper::-webkit-scrollbar {
  height: 5px;
}

.photo-slider-wrapper::-webkit-scrollbar-track {
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
}

.photo-slider-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-focus);
  border-radius: var(--radius-full);
}

.photo-slider-track {
  display: flex;
  gap: 0.65rem;
  width: max-content;
}

.slider-photo-card {
  width: 220px;
  height: 155px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  flex-shrink: 0;
  text-decoration: none;
  scroll-snap-align: start;
  display: block;
}

.slider-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-photo-card:hover img {
  transform: scale(1.08);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 14, 23, 0.88) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.6rem 0.65rem;
  transition: background 0.2s ease;
}

.slider-photo-card:hover .photo-overlay {
  background: linear-gradient(180deg, rgba(10, 14, 23, 0.15) 0%, rgba(10, 14, 23, 0.94) 100%);
}

.photo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.photo-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.photo-tag {
  font-size: 0.62rem;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-weight: 500;
  white-space: nowrap;
}

.photo-icon {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  transition: transform 0.2s ease;
}

.slider-photo-card:hover .photo-icon {
  transform: translateX(2px) translateY(-2px);
  color: var(--accent-light);
}

/* Channels Bar */
.channels-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: 1rem;
}

.channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  color: var(--text-secondary);
  text-decoration: none;
  min-height: 34px;
}

.channel-pill:hover, .channel-pill:active {
  color: var(--text-primary);
  border-color: var(--border-focus);
}

/* Footer */
footer {
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Mobile-Specific Refinements (Phones < 640px) */
@media (max-width: 640px) {
  .container {
    padding: 0.5rem 0.5rem 4rem 0.5rem;
  }

  .nav-bar {
    padding: 0.4rem 0.65rem;
    position: -webkit-sticky;
    position: sticky;
    top: 0.25rem;
    z-index: 1000;
  }

  .brand span:not(.material-symbols-rounded) {
    display: none; /* Just icon on mobile */
  }

  .nav-link {
    padding: 0.35rem 0.45rem;
  }

  .nav-link span:not(.material-symbols-rounded) {
    display: none; /* Icon-only touch bar */
  }

  .nav-link .material-symbols-rounded {
    font-size: 20px;
  }

  .hero-card {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 0.85rem;
    padding: 0.85rem 0.75rem;
  }

  .hero-left {
    text-align: left;
  }

  .hero-identity {
    gap: 0.75rem;
  }

  .avatar-wrapper {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    margin: 0;
  }

  .hero-title-group h1 {
    font-size: 1.25rem;
  }

  .hero-subtitle {
    justify-content: flex-start;
    text-align: left;
    font-size: 0.8rem;
  }

  .social-circles {
    justify-content: flex-start;
  }

  .meta-chips {
    justify-content: flex-start;
  }

  .hero-right {
    width: 100%;
    align-items: stretch;
  }

  .hero-right .action-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.35rem;
    width: 100%;
  }

  .hero-right .action-buttons .btn {
    width: fit-content;
    max-width: max-content;
    flex: 0 0 auto;
    font-size: 0.76rem;
    padding: 0.35rem 0.6rem;
    min-height: auto;
  }

  .section-header .section-title {
    font-size: 0.88rem;
  }

  .section-header .btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    min-height: 24px;
  }

  .projects-grid,
  .observability-grid {
    grid-template-columns: 1fr;
  }

  .slider-photo-card {
    width: 175px;
    height: 130px;
  }

  .skills-deck {
    grid-template-columns: repeat(3, 1fr); /* Clean 3-col grid on phones */
    gap: 0.3rem;
  }

  .skill-tile {
    padding: 0.35rem 0.4rem;
  }

  .channels-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
    padding: 0.5rem;
  }

  .channel-pill {
    justify-content: center;
    font-size: 0.72rem;
    padding: 0.35rem 0.45rem;
  }

  .channel-pill:first-child {
    grid-column: span 2;
  }
}

/* WPM Stat Highlight */
.wpm-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0;
  text-align: center;
}

.wpm-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.wpm-unit {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 0.05em;
}

.wpm-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Floating Go to Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, border-color 0.2s ease;
}

.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-2px) scale(1.08);
}

.scroll-top-btn:active {
  transform: scale(0.92);
}

.scroll-top-btn .material-symbols-rounded {
  font-size: 20px;
}
