/* core.css - Base styles and reset */

/* FONT IMPORT - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');

/* 
 * MODERN CSS RESET
 * Based on Andy Bell's reset with modifications
 */

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

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

/* Remove list styles on ul, ol elements */
ul,
ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Set core root defaults */
html:focus-within {
    scroll-behavior: smooth;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.6;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
}

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

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
    font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 
 * TYPOGRAPHY
 * Base typography scale using Inter
 */

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 700;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 600;
}

h4 {
    font-size: clamp(1.125rem, 1.5vw, 1.25rem);
    font-weight: 500;
}

h5 {
    font-size: 1.125rem;
    font-weight: 500;
}

h6 {
    font-size: 1rem;
    font-weight: 500;
}

p {
    max-width: 65ch;
    margin-bottom: 1rem;
}

/* Default link styles */
a {
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

/* Text selection */
::selection {
    background-color: rgba(88, 166, 255, 0.3);
    color: inherit;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Remove focus for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Lists */
ul li,
ol li {
    margin-bottom: 0.5rem;
}

/* Blockquotes */
blockquote {
    padding-left: 1.5rem;
    border-left: 4px solid;
    font-style: italic;
    margin: 1.5rem 0;
}

/* Code */
code {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

pre {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
    padding: 1rem;
    border-radius: 8px;
}

pre code {
    padding: 0;
    background: none;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th,
td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid;
}

th {
    font-weight: 600;
}

/* Forms */
button,
input,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

button {
    cursor: pointer;
}

/* Disabled state */
:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Hidden elements */
[hidden] {
    display: none !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;
}

/* Utility: No scroll */
.no-scroll {
    overflow: hidden;
}

/* Print styles */
@media print {
    *,
    *::before,
    *::after {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a,
    a:visited {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
    
    img {
        max-width: 100% !important;
    }
    
    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }
    
    h2,
    h3 {
        page-break-after: avoid;
    }
}