/* CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-light);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background: linear-gradient(-45deg, #0F363D, #1a4f5a, #0004f4, #2a5f6f);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    overflow-x: hidden;
    padding-bottom: 120px; /* Account for fixed footer */
}

main {
    padding-top: var(--header-height);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-light);
    line-height: var(--line-height-heading);
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}

h1 {
    font-size: clamp(20px, 6vw, 84px);
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Allow title wrapping on very small screens */
@media (max-width: 480px) {
    h1 {
        white-space: normal;
        word-wrap: break-word;
    }
}

h2 {
    font-size: var(--font-size-h2);
    text-transform: capitalize;
    color: var(--color-cream); /* Fallback for browsers without background-clip support */
    background: linear-gradient(135deg, #e8e1ce, #6E969E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

h3 {
    font-size: var(--font-size-h3);
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--color-primary-blue);
    text-decoration: underline;
    transition: color var(--transition-normal);
}

a:hover {
    color: var(--color-accent);
}

a:focus {
    outline: 2px solid var(--color-primary-blue);
    outline-offset: 2px;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lists */
ul, ol {
    list-style: none;
}

/* Buttons */
button {
    font-family: var(--font-family);
    cursor: pointer;
    border: none;
    background: none;
}

/* Selection */
::selection {
    color: var(--color-primary-blue);
    background: var(--color-cream);
}

::-moz-selection {
    color: var(--color-primary-blue);
    background: var(--color-cream);
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--color-primary-blue);
    outline-offset: 2px;
}
