:root {
  --bg-color: #0f172a;
  --text-color: #e2e8f0;
  --text-muted: #94a3b8;
  --primary-color: #38bdf8;
  --secondary-color: #818cf8;
  --accent-color: #c084fc;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(30, 41, 59, 0.5);
  --font-main: "Outfit", sans-serif;
  --transition: all 0.3s ease;
}

/* Smooth scrolling for browsers that support it (fallback to JS otherwise) */
html {
  scroll-behavior: smooth;
}

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

/* Visually hidden (screen-reader only) */
.sr-only,
.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  /* Ensure site does not shrink below 350px; allow horizontal scroll if viewport is narrower */
  min-width: 350px;
  overflow-x: auto;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* Visible focus for keyboard users */
a:focus-visible,
button:focus-visible,
.theme-option:focus-visible,
.lang-btn:focus-visible,
.contact-email:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

ul {
  list-style: none;
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
