/* ============================================
   FILE: 0-reset.css
   
   WHAT THIS FILE DOES:
   Modern CSS reset that normalizes browser defaults
   and provides a clean foundation for all styles.
   Based on Josh Comeau's "A Modern CSS Reset" with
   Hydejack-specific additions.
   
   WHEN TO EDIT:
   - Rarely needs editing
   - Only if adding new global defaults
   
   WHEN NOT TO EDIT:
   - To change colors (use 1-variables.css)
   - To change fonts (use 1-variables.css)
   - For component styles (use 3-components.css)
   
   ============================================ */

/* ============================================
   LOCAL FONT DEFINITIONS
   ============================================ */

/* --- Kode Mono (Headings & Special Highlights) --- */
@font-face {
  font-family: 'Kode Mono';
  src: url('/assets/fonts/Kode_Mono/KodeMono-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --- Plus Jakarta Sans (Body Text) --- */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/assets/fonts/Plus_Jakarta_Sans/PlusJakartaSans-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/assets/fonts/Plus_Jakarta_Sans/PlusJakartaSans-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

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

/* Remove list styles in navigation contexts */
nav ul,
nav ol,
.nav-bar ul,
.left-panel__nav ul,
.left-panel__social ul,
.mobile-drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li,
.nav-bar li,
.left-panel__nav li,
.left-panel__social li {
  list-style: none;
}

/* Set core body defaults */
html {
  scroll-behavior: smooth;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-smooth: always;
}

/* Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* Remove built-in form typography styles */
input,
button,
textarea,
select {
  font: inherit;
}

/* Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* Create a root stacking context */
#root,
#__next {
  isolation: isolate;
}

/* Remove default button styles */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Accessible focus styles (can be overridden per component) */
:focus-visible {
  outline: 2px solid var(--color-primary, #513939);
  outline-offset: 2px;
}

/* Skip to content link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary, #513939);
  color: var(--color-background, #d1d4d6);
  padding: 8px;
  text-decoration: none;
  z-index: var(--z-lightbox);
  border-radius: 0 0 4px 0;
  font-weight: bold;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

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

  html {
    scroll-behavior: auto;
  }

  html:focus-within {
    scroll-behavior: auto;
  }
}
