/* =====================================================
 * DecryptCode INC — Modern CSS Reset
 * Based on Josh Comeau's CSS Reset + Andy Bell's reset
 * Last Updated: February 21, 2026
 * ===================================================== */

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

/* Remove default margin and padding */
* {
  margin: 0;
  padding: 0;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-behavior: smooth;
}

/* Core body defaults */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Remove list styles on ul, ol with role="list" */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--text-hero);
  font-weight: var(--weight-extrabold);
}

h2 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
}

h3 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
}

h4 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
}

h5 {
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
}

h6 {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

/* Anchors */
a {
  color: var(--text-accent);
  text-decoration: none;
  text-decoration-skip-ink: auto;
  transition: color var(--transition-fast);
}

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

/* Images */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Form elements inherit fonts */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Textarea */
textarea {
  resize: vertical;
}

/* Button reset */
button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* Table */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Paragraphs */
p {
  text-wrap: pretty;
  overflow-wrap: break-word;
}

/* Code / Pre */
code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

pre {
  overflow-x: auto;
  padding: var(--space-4);
  background: var(--bg-code);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

code {
  background: var(--bg-code);
  padding: 0.125em 0.375em;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Selection */
::selection {
  background: rgba(250, 175, 82, 0.3);
  color: var(--text-primary);
}

/* Reduced motion */
@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;
    scroll-behavior: auto !important;
  }
}

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

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--accent-primary);
  color: var(--text-inverse);
  padding: var(--space-2) var(--space-4);
  z-index: var(--z-skip-link);
  border-radius: var(--radius-sm);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
  color: var(--text-inverse);
}
