/* ==========================================================================
   Carlo Arnaboldi - CV Website Stylesheet
   Dark theme with orange/teal accents
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Variables)
   -------------------------------------------------------------------------- */
:root {
  /* Background colors */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1c2128;
  --bg-elevated: #21262d;

  /* Text colors */
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;

  /* Accent colors */
  --accent-orange: #d97706;
  --accent-orange-light: #f59e0b;
  --accent-teal: #14b8a6;
  --accent-teal-light: #2dd4bf;

  /* Decorative */
  --border-color: #30363d;

  /* Skill tag colors */
  --skill-bg: rgba(217, 119, 6, 0.15);
  --skill-border: rgba(217, 119, 6, 0.4);

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Typography */
  --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;

  /* Layout */
  --max-width: 900px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
}

/* --------------------------------------------------------------------------
   Light Theme (toggled via data-theme attribute)
   -------------------------------------------------------------------------- */
[data-theme="light"] {
  /* Background colors */
  --bg-primary: #f5f5f5;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-elevated: #f0f0f0;

  /* Text colors */
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #6a6a6a;

  /* Accent colors - slightly darker for better contrast on light */
  --accent-orange: #b45309;
  --accent-orange-light: #d97706;
  --accent-teal: #0f766e;
  --accent-teal-light: #14b8a6;

  /* Decorative */
  --border-color: #d0d0d0;

  /* Skill tag colors */
  --skill-bg: rgba(180, 83, 9, 0.1);
  --skill-border: rgba(180, 83, 9, 0.3);
}

[data-theme="light"] body {
  background:
    /* Subtle dot pattern */
    radial-gradient(circle at center, rgba(180, 83, 9, 0.04) 1px, transparent 1px),
    /* Gradient blobs */
    radial-gradient(ellipse at 20% 20%, rgba(180, 83, 9, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(15, 118, 110, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 10%, rgba(15, 118, 110, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 10% 70%, rgba(180, 83, 9, 0.06) 0%, transparent 40%),
    var(--bg-primary);
  background-size:
    24px 24px,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%;
}

[data-theme="light"] .contact-icon,
[data-theme="light"] .interest-icon {
  filter: none;
}

[data-theme="light"] .cv-container {
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      rgba(0, 0, 0, 0.01) 1px,
      transparent 2px,
      transparent 4px
    ),
    repeating-linear-gradient(
      115deg,
      transparent 0px,
      transparent 8px,
      rgba(0, 0, 0, 0.018) 8px,
      rgba(0, 0, 0, 0.018) 9px,
      transparent 9px,
      transparent 20px
    ),
    repeating-linear-gradient(
      65deg,
      transparent 0px,
      transparent 12px,
      rgba(0, 0, 0, 0.012) 12px,
      rgba(0, 0, 0, 0.012) 13px,
      transparent 13px,
      transparent 28px
    ),
    repeating-linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.008) 0px,
      transparent 1px,
      transparent 6px
    ),
    rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 -1px 0 rgba(0, 0, 0, 0.05) inset;
}

/* --------------------------------------------------------------------------
   Base Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: var(--spacing-lg);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-primary);
  background:
    /* Subtle dot pattern */
    radial-gradient(circle at center, rgba(217, 119, 6, 0.03) 1px, transparent 1px),
    /* Gradient blobs */
    radial-gradient(ellipse at 20% 20%, rgba(217, 119, 6, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(20, 184, 166, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 10%, rgba(20, 184, 166, 0.05) 0%, transparent 40%),
    radial-gradient(ellipse at 10% 70%, rgba(217, 119, 6, 0.05) 0%, transparent 40%),
    var(--bg-primary);
  background-size:
    24px 24px,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* --------------------------------------------------------------------------
   Background Canvas Effect
   -------------------------------------------------------------------------- */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

a {
  color: var(--accent-teal);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-teal-light);
}

/* --------------------------------------------------------------------------
   Main Container
   -------------------------------------------------------------------------- */
.cv-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  /* Liquid glass + subtle brushed metal texture */
  background:
    /* Fine horizontal brush strokes */
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      rgba(255, 255, 255, 0.008) 1px,
      transparent 2px,
      transparent 4px
    ),
    /* Diagonal scratches - sparse */
    repeating-linear-gradient(
      115deg,
      transparent 0px,
      transparent 8px,
      rgba(255, 255, 255, 0.015) 8px,
      rgba(255, 255, 255, 0.015) 9px,
      transparent 9px,
      transparent 20px
    ),
    /* Opposite diagonal - offset */
    repeating-linear-gradient(
      65deg,
      transparent 0px,
      transparent 12px,
      rgba(255, 255, 255, 0.01) 12px,
      rgba(255, 255, 255, 0.01) 13px,
      transparent 13px,
      transparent 28px
    ),
    /* Subtle vertical variation */
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.006) 0px,
      transparent 1px,
      transparent 6px
    ),
    rgba(28, 33, 40, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 -1px 0 rgba(0, 0, 0, 0.2) inset;
  overflow: hidden;
}

/* Laser border trace effect */
.cv-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-orange) 50%, transparent 100%);
  filter: blur(1px);
  opacity: 0;
  pointer-events: none;
  animation: laser-trace 16s ease-in-out infinite;
}

@keyframes laser-trace {
  0%, 100% { opacity: 0; top: 0; left: -100px; transform: rotate(0deg); }
  /* Top edge - left to right */
  8% { opacity: 0.35; top: 0; left: 0; }
  18% { opacity: 0.25; top: 0; left: calc(100% - 100px); }
  20% { opacity: 0; }
  /* Pause */
  35% { opacity: 0; top: auto; bottom: 0; left: auto; right: -100px; transform: rotate(180deg); }
  /* Bottom edge - right to left */
  40% { opacity: 0.3; bottom: 0; right: 0; }
  52% { opacity: 0.2; bottom: 0; right: calc(100% - 100px); }
  55% { opacity: 0; }
  /* Long pause */
}

/* --------------------------------------------------------------------------
   Profile Header
   -------------------------------------------------------------------------- */
.profile {
  position: relative;
  padding: var(--spacing-2xl);
  background:
    /* Subtle dot grid pattern */
    radial-gradient(
      circle at center,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px
    ),
    /* Faint accent glow in corner */
    radial-gradient(
      ellipse at 95% 5%,
      rgba(217, 119, 6, 0.06) 0%,
      transparent 40%
    ),
    radial-gradient(
      ellipse at 5% 95%,
      rgba(20, 184, 166, 0.04) 0%,
      transparent 35%
    ),
    linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  background-size:
    16px 16px,
    100% 100%,
    100% 100%,
    100% 100%;
  border-bottom: 1px solid var(--border-color);
}

#profile-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] .profile {
  background:
    radial-gradient(
      circle at center,
      rgba(0, 0, 0, 0.025) 1px,
      transparent 1px
    ),
    radial-gradient(
      ellipse at 95% 5%,
      rgba(180, 83, 9, 0.06) 0%,
      transparent 40%
    ),
    radial-gradient(
      ellipse at 5% 95%,
      rgba(15, 118, 110, 0.04) 0%,
      transparent 35%
    ),
    linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  background-size:
    16px 16px,
    100% 100%,
    100% 100%,
    100% 100%;
}

.profile-inner {
  position: relative;
  z-index: 1;
  display: flex;
  gap: var(--spacing-xl);
  align-items: flex-start;
}

.profile-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-orange);
  box-shadow: 0 0 20px rgba(217, 119, 6, 0.3);
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.name {
  margin: 0 0 var(--spacing-xs);
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.title {
  margin: 0 0 var(--spacing-lg);
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--accent-orange);
}

/* Contact Links */
.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm) var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  padding: 0;
  list-style: none;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.contact-item a {
  color: var(--text-secondary);
}

.contact-item a:hover {
  color: var(--accent-teal);
}

.contact-icon {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  filter: invert(1);
}

/* Summary */
.summary {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Show More Button
   -------------------------------------------------------------------------- */
.show-more-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-xl);
  background: transparent;
}

/* Decorative lines flanking the button */
.show-more-wrapper::before,
.show-more-wrapper::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent-orange) 100%
  );
  opacity: 0.4;
}

.show-more-wrapper::after {
  background: linear-gradient(
    90deg,
    var(--accent-orange) 0%,
    transparent 100%
  );
}

#show-more-btn {
  position: relative;
  padding: var(--spacing-md) var(--spacing-xl);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-primary);
  /* Subtle glass effect */
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

/* Dark mode hover */
#show-more-btn:hover {
  color: #ffffff;
  background: rgba(217, 119, 6, 0.15);
  border-color: rgba(217, 119, 6, 0.3);
  transform: translateY(-2px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(217, 119, 6, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Light mode */
[data-theme="light"] #show-more-btn {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Light mode hover */
[data-theme="light"] #show-more-btn:hover {
  color: var(--text-primary);
  background: rgba(180, 83, 9, 0.1);
  border-color: rgba(180, 83, 9, 0.25);
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

#show-more-btn span {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   CV Content (Two Columns)
   -------------------------------------------------------------------------- */
.cv-content {
  display: flex;
  gap: 0;
}

.cv-column {
  padding: var(--spacing-xl);
}

.cv-column.left {
  flex: 1.2;
  border-right: 1px solid var(--border-color);
}

.cv-column.right {
  flex: 0.8;
  background: var(--bg-secondary);
}

/* --------------------------------------------------------------------------
   Section Styles
   -------------------------------------------------------------------------- */
.cv-section {
  margin-bottom: var(--spacing-2xl);
}

.cv-section:last-child {
  margin-bottom: 0;
}

.section-title {
  margin: 0 0 var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--accent-orange);
}

/* --------------------------------------------------------------------------
   Job / Education Entry (Timeline Style)
   -------------------------------------------------------------------------- */
.entry {
  position: relative;
  padding-left: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.entry:last-child {
  margin-bottom: 0;
}

/* Timeline line */
.entry::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: -var(--spacing-xl);
  width: 2px;
  background: var(--border-color);
}

.entry:last-child::before {
  bottom: 0;
}

/* Timeline circle */
.entry::after {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent-teal);
  z-index: 1;
}

.entry-header {
  margin-bottom: var(--spacing-sm);
}

.entry-title {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.entry-company {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-secondary);
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs) var(--spacing-md);
  margin-top: var(--spacing-xs);
  font-size: var(--font-size-sm);
  color: var(--accent-teal);
}

/* --------------------------------------------------------------------------
   Bracket Box (Task Lists)
   -------------------------------------------------------------------------- */
.bracket-box {
  position: relative;
  margin-top: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--bg-elevated);
  border-radius: var(--border-radius);
}

/* Corner brackets */
.bracket-box::before,
.bracket-box::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--accent-orange);
  border-style: solid;
}

.bracket-box::before {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
  border-top-left-radius: 4px;
}

.bracket-box::after {
  top: 0;
  right: 0;
  border-width: 2px 2px 0 0;
  border-top-right-radius: 4px;
}

/* Bottom corners using inner element */
.bracket-box-inner {
  position: relative;
}

.bracket-box-inner::before,
.bracket-box-inner::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--accent-orange);
  border-style: solid;
}

.bracket-box-inner::before {
  bottom: calc(-1 * var(--spacing-md));
  left: calc(-1 * var(--spacing-md));
  border-width: 0 0 2px 2px;
  border-bottom-left-radius: 4px;
}

.bracket-box-inner::after {
  bottom: calc(-1 * var(--spacing-md));
  right: calc(-1 * var(--spacing-md));
  border-width: 0 2px 2px 0;
  border-bottom-right-radius: 4px;
}

.details-intro {
  margin: 0 0 var(--spacing-sm);
  font-size: var(--font-size-sm);
  color: var(--accent-teal);
  font-weight: 600;
}

.task-list {
  margin: 0;
  padding-left: var(--spacing-lg);
  color: var(--text-secondary);
}

.task-list li {
  margin-bottom: var(--spacing-xs);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

.task-list li:last-child {
  margin-bottom: 0;
}

.task-list li::marker {
  color: var(--accent-orange);
}

/* --------------------------------------------------------------------------
   Skills Section
   -------------------------------------------------------------------------- */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.skill {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--accent-orange-light);
  background: var(--skill-bg);
  border: 1px solid var(--skill-border);
  border-radius: 20px;
  transition: all 0.2s ease;
}

.skill:hover {
  background: rgba(217, 119, 6, 0.25);
  border-color: var(--accent-orange);
}

/* --------------------------------------------------------------------------
   Languages Section
   -------------------------------------------------------------------------- */
.language-item {
  margin-bottom: var(--spacing-md);
}

.language-item:last-child {
  margin-bottom: 0;
}

.language-name {
  font-weight: 600;
  color: var(--text-primary);
}

.language-level {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Interests Section
   -------------------------------------------------------------------------- */
.interest-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
}

.interest-icon {
  width: 16px;
  height: 16px;
  margin-top: 4px;
  opacity: 0.6;
  filter: invert(1);
  flex-shrink: 0;
}

.interest-text {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Initially Hidden (for Show More)
   -------------------------------------------------------------------------- */
.initially-hidden {
  display: none;
  opacity: 0;
}

.initially-hidden.fade {
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  body {
    padding: var(--spacing-md);
  }

  .profile {
    padding: var(--spacing-xl);
  }

  .profile-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-photo {
    width: 120px;
    height: 120px;
  }

  .name {
    font-size: var(--font-size-2xl);
  }

  .title {
    font-size: var(--font-size-lg);
  }

  .contact-list {
    justify-content: center;
  }

  .cv-content {
    flex-direction: column;
  }

  .cv-column {
    padding: var(--spacing-lg);
  }

  .cv-column.left {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-xl: 1.5rem;
    --spacing-2xl: 2rem;
  }

  .profile-photo {
    width: 100px;
    height: 100px;
  }

  .name {
    font-size: var(--font-size-xl);
  }

  .entry {
    padding-left: var(--spacing-lg);
  }
}

/* --------------------------------------------------------------------------
   Theme Toggle Switch - Sliding pill design
   -------------------------------------------------------------------------- */
.theme-toggle {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  z-index: 100;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.toggle-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  width: 68px;
  height: 34px;
  padding: 5px;
  /* Liquid glass effect */
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.theme-toggle:hover .toggle-track {
  border-color: rgba(217, 119, 6, 0.5);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.25),
    0 0 20px rgba(217, 119, 6, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.toggle-icon {
  width: 18px;
  height: 18px;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.toggle-icon.icon-moon {
  color: var(--text-muted);
  margin-left: 2px;
}

.toggle-icon.icon-sun {
  color: var(--text-muted);
  margin-right: 2px;
}

.toggle-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  /* Liquid glass knob */
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0.8) 100%
  );
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.25),
    0 1px 2px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    inset 0 -1px 2px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover .toggle-knob {
  box-shadow:
    0 3px 12px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.6),
    inset 0 -1px 2px rgba(0, 0, 0, 0.1);
}

/* Dark mode (default) - knob on left, moon highlighted */
[data-theme="dark"] .toggle-knob,
:root:not([data-theme]) .toggle-knob {
  transform: translateX(0);
}

[data-theme="dark"] .icon-moon,
:root:not([data-theme]) .icon-moon {
  color: var(--accent-orange);
}

/* Light mode - knob on right, sun highlighted */
[data-theme="light"] .toggle-knob {
  transform: translateX(34px);
}

[data-theme="light"] .icon-sun {
  color: var(--accent-orange);
}

[data-theme="light"] .toggle-track {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);
}

@media (max-width: 480px) {
  .toggle-track {
    width: 80px;
    height: 40px;
    padding: 6px;
  }

  .toggle-icon {
    width: 22px;
    height: 22px;
  }

  .toggle-knob {
    width: 28px;
    height: 28px;
    top: 5px;
    left: 5px;
    box-shadow:
      0 3px 10px rgba(0, 0, 0, 0.25),
      0 1px 3px rgba(0, 0, 0, 0.15),
      inset 0 3px 5px rgba(255, 255, 255, 0.5),
      inset 0 -1px 3px rgba(0, 0, 0, 0.1);
  }

  [data-theme="light"] .toggle-knob {
    transform: translateX(40px);
  }
}
