/* Shared base styles for index2.html and the detail_*.html pages.
   Layout and colors come from Tailwind utility classes in the markup. */

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    line-height: 1.7;
}

h1,
h2,
h3,
.mono {
    font-family: 'Space Mono', monospace;
}

h1 {
    font-size: 3.25rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.25rem;
}

h1,
h2,
h3 {
    line-height: 1.2;
    margin-bottom: 0.5em;
}

p {
    margin-bottom: 0.5em;
}

@media (max-width: 640px) {
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.75rem;
    }
}

/* Leave room for the floating nav when jumping to a section */
section[id] {
    scroll-margin-top: 6rem;
}

/* Accent underline: used sparingly, for one key phrase per section */
.accent {
    text-decoration: underline wavy #F26649 2px;
    text-underline-offset: 6px;
}

/* Pixel art stays sharp when scaled up */
.pixelated {
    image-rendering: pixelated;
}

/* Fade sections in as they scroll into view */
.reveal {
    opacity: 0;
    transform: translateY(1.5rem);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* Current section in the floating nav */
.nav-link.active {
    color: #D9512F;
    background: rgb(242 102 73 / 0.1);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
