:root {
    /* Fluid type scales with clamp(min, preferred, max) */
    --size-hero: clamp(2rem, 6vw, 3.5rem);
    --size-body: clamp(1rem, 2.6vw, 1.25rem);
    --size-sub: clamp(1.125rem, 3vw, 1.5rem);

    --space-1: clamp(8px, 2vw, 12px);
    --space-2: clamp(12px, 3vw, 20px);
    --space-3: clamp(20px, 5vw, 40px);
    --space-4: clamp(28px, 7vw, 60px);

    --maxw: 720px;

    --text: #333333;
    --bg: #ffffff; /* white background */
    --link: #1a3d7c;
    --link-hover: #0f2852;
}

/* Base / mobile-first */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Yeseva One', serif;
    font-size: var(--size-body);
    background: var(--bg);
    color: var(--text);

    /* Center content vertically on tall screens but degrade gracefully on small ones */
    display: grid;
    place-items: center;
}

.container {
    width: min(92vw, var(--maxw));
    padding: var(--space-3) var(--space-2);
    text-align: center;
}

/* Header / Title */
.site-title {
    margin: 0 0 var(--space-2) 0;
    font-size: var(--size-hero);
    font-weight: normal;
    line-height: 1.1;
    word-break: break-word;
}

/* Tilted n */
.tilt-n {
    display: inline-block;
    transform: rotate(20deg) translateY(0.25em);
    transform-origin: bottom left;
}

/* Content */
.message {
    margin: 0 0 var(--space-1) 0;
    font-size: var(--size-sub);
}

.email {
    margin: 0 0 var(--space-3) 0;
}

.email-link {
    display: inline-block;
    padding: 0.5em 0.8em;            /* touch-friendly */
    border-radius: 8px;
    text-decoration: none;
    color: var(--link);
    outline-offset: 4px;
}

.email-link:hover,
.email-link:focus-visible {
    text-decoration: underline;
    color: var(--link-hover);
}

/* Footer image at the bottom, responsive and scalable */
.footer {
    margin-top: var(--space-4);
}

.shelf-figure {
    display: block;
    margin-inline: auto;
    width: min(80vw, 360px);
    height: auto;
    max-width: 100%;
    padding-top: 46px;
}

.footer {
    color: #1c1919;
    text-align: center;
    padding-top: 27px;
    font-size: 0.9rem;
    position: relative;
}

.footer-top {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 16px;
}

.footer-top p {
    margin: 0;
}

.footer-top ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-top li {
    margin: 0;
    color: #1e1e1e;
}

.footer-top a {
    color: #1c1919;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-top a:hover {
    color: #1c1919;
    text-decoration: underline;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.5px;
    background: linear-gradient(to right, transparent, #ccc 20%, #676767 80%, transparent);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* Larger screens: subtle spacing tweaks (already fluid via clamp, so keep minimal) */
@media (min-width: 768px) {
    .container { padding: var(--space-4) var(--space-3); }
}
