/* Base CSS Variables - Unified across all pages */
:root {
  /* Typography */
  --font-mono: 'SF Mono','Monaco','Inconsolata','Fira Mono','Droid Sans Mono','Source Code Pro',monospace;

  /* Colors - Light theme (default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f8f8;
  --bg-tertiary: #f0f0f0;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #888;
  --border: #e0e0e0;
  --border-strong: #c0c0c0;
  --accent: #E95420; /* Ubuntu orange */
  --link: #E95420;

  /* Icon colors */
  --icon-github: #000;
  --icon-linkedin: #0077B5;
  --icon-twitter: #000;
  --icon-email: #EA4335;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;

  /* Border radius */
  --radius-sm: 3px;
  --radius-md: 6px;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #242424;
  --bg-tertiary: #2d2d2d;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --text-muted: #666;
  --border: #3a3a3a;
  --border-strong: #4a4a4a;
  --accent: #E95420;
  --link: #FF6B35;
  --icon-github: #e0e0e0;
  --icon-linkedin: #5BA0D0;
  --icon-twitter: #e0e0e0;
  --icon-email: #FF6B6B;
}

/* Sublime Theme (Monokai-inspired) */
[data-theme="sublime"] {
  --bg-primary: #272822;
  --bg-secondary: #3e3d32;
  --bg-tertiary: #49483e;
  --text-primary: #f8f8f2;
  --text-secondary: #a6a6a6;
  --text-muted: #75715e;
  --border: #49483e;
  --border-strong: #5a584e;
  --accent: #f92672; /* Monokai pink */
  --link: #66d9ef; /* Monokai cyan */
  --icon-github: #f8f8f2;
  --icon-linkedin: #66d9ef;
  --icon-twitter: #f8f8f2;
  --icon-email: #f92672;
}

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

/* Smooth theme transitions */
html {
  transition: background-color 0.3s ease, color 0.3s ease;
}

body, a, svg, .theme-switcher {
  transition: background-color 0.3s ease, color 0.3s ease, fill 0.3s ease, border-color 0.3s ease;
}

/* Base typography */
body {
  font-family: var(--font-mono);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  padding: var(--space-lg);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection styling */
::selection {
  background-color: var(--accent);
  color: #fff;
}

/* Base link styling */
a {
  color: var(--link);
  text-decoration: none;
}

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

/* Focus styles for keyboard accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  body {
    background: #fff;
    color: #000;
    padding: 0;
  }
  .theme-switcher,
  .contact-links svg,
  .blog-nav,
  nav {
    display: none !important;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }
}
