/* ============================================
   JAMWEB.SPACE - Base Styles & Reset
   ============================================ */

/* ─────────────────────────────────────────
   MODERN CSS RESET
   ───────────────────────────────────────── */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Remove list styles */
ul,
ol {
    list-style: none;
}

/* Remove default link styles */
a {
    color: inherit;
    text-decoration: none;
}

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

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

/* Remove text area resize */
textarea {
    resize: vertical;
}

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

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

/* Remove fieldset styling */
fieldset {
    border: none;
}

/* ─────────────────────────────────────────
   TYPOGRAPHY
   ───────────────────────────────────────── */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--color-text-primary);
}

h1 {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-6);
}

h2 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-5);
}

h3 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
}

h4 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
}

p {
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

p:last-child {
    margin-bottom: 0;
}

strong,
b {
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
}

small {
    font-size: var(--text-sm);
}

/* Highlighted/Accent Text */
.text-neon {
    color: var(--color-neon);
}

.text-gradient {
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─────────────────────────────────────────
   LINKS
   ───────────────────────────────────────── */

a {
    transition: color var(--transition-fast);
}

.link {
    color: var(--color-neon);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: var(--font-medium);
}

.link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-neon);
    transition: width var(--transition-base);
}

.link:hover::after {
    width: 100%;
}

.link:hover {
    text-shadow: 0 0 10px var(--color-neon-glow);
}

.link svg {
    width: 1em;
    height: 1em;
    transition: transform var(--transition-fast);
}

.link:hover svg {
    transform: translateX(4px);
}

/* ─────────────────────────────────────────
   LAYOUT CONTAINERS
   ───────────────────────────────────────── */

.container {
    width: 100%;
    max-width: var(--container-xl);
    margin-inline: auto;
    padding-inline: var(--space-6);
}

.container-sm {
    max-width: var(--container-md);
}

.container-lg {
    max-width: var(--container-2xl);
}

/* Section Spacing */
.section {
    padding-block: var(--space-20);
}

.section-lg {
    padding-block: var(--space-24);
}

/* ─────────────────────────────────────────
   FOCUS STYLES (Accessibility)
   ───────────────────────────────────────── */

:focus-visible {
    outline: 2px solid var(--color-neon);
    outline-offset: 3px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-neon);
    outline-offset: 3px;
}

/* ─────────────────────────────────────────
   SELECTION
   ───────────────────────────────────────── */

::selection {
    background-color: var(--color-neon);
    color: var(--color-bg-primary);
}

/* ─────────────────────────────────────────
   SCROLLBAR (Webkit)
   ───────────────────────────────────────── */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-neon-dark);
}

/* ─────────────────────────────────────────
   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;
}