@font-face {
    font-family: "Baskerville Web";
    src: url("fonts/libre-baskerville-latin-400-normal.woff2") format("woff2");
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Baskerville Web";
    src: url("fonts/libre-baskerville-latin-400-italic.woff2") format("woff2");
    font-weight: 400; font-style: italic; font-display: swap;
}

:root {
    --bg: #0f1419;
    --surface: #151c23;
    --line: #26303a;
    --text: #e0e0e0;
    --heading: #ffffff;
    --muted: #8f9aa5;
    --faint: #66707a;
    --accent: #a0d8ff;
    --serif: "Baskerville Web", Georgia, "Times New Roman", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { background: var(--bg); }

body {
    background: radial-gradient(ellipse at 50% 0%, #16202a 0%, var(--bg) 60%) no-repeat, var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Faint film grain over everything: the "static". */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page {
    max-width: 560px;
    margin: 0 auto;
    padding: clamp(3rem, 12vh, 7rem) 1rem 3rem;
    text-align: center;
}

/* Intro */
.logo {
    width: 132px;
    height: 132px;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

h1 {
    font-family: var(--serif);
    font-size: clamp(2rem, 8.5vw, 2.7rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    color: var(--heading);
}

.tagline {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.15rem;
    color: #aaaaaa;
    margin-bottom: 0.9rem;
}

.about {
    color: var(--muted);
    max-width: 400px;
    margin: 0 auto;
}

/* Shared */
.label {
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #888888;
    margin-bottom: 1rem;
}

.btn {
    background: transparent;
    color: var(--accent);
    font: 600 1rem var(--sans);
    padding: 10px 26px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}
a.btn { display: inline-block; text-decoration: none; }
.btn:hover, .btn[aria-expanded="true"] { background: var(--accent); color: var(--bg); }
.btn-quiet { color: var(--muted); border-color: var(--line); }
.btn-quiet:hover, .btn-quiet[aria-expanded="true"] { background: var(--line); color: var(--heading); }
.btn:focus-visible, .link-btn:focus-visible, .field input:focus-visible, .field textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Optional sections */
.section {
    margin-top: 4rem;
    text-align: left;
}
.section .label { text-align: center; }
.section p + p { margin-top: 0.9rem; }
.section .prose { color: var(--muted); }

.entries { list-style: none; border-top: 1px solid var(--line); }
.entries li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.entry-title { font-family: var(--serif); font-size: 1.15rem; color: var(--heading); }
.entry-title a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.entry-title a:hover { text-decoration-color: var(--accent); }
.entry-meta { font-size: 0.9rem; color: var(--faint); }
.entry-meta em { font-family: var(--serif); color: var(--muted); }
.entry-note { margin-top: 0.3rem; color: var(--muted); font-size: 0.95rem; }

/* Contact */
.contact { margin-top: 3.5rem; }

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.email-box {
    margin-top: 1.4rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 0.8rem;
}
.email-address { font-size: 1.3rem; font-weight: 500; color: var(--heading); user-select: all; }
.link-btn {
    background: none;
    border: 0;
    color: var(--accent);
    font: 500 0.9rem var(--sans);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-form {
    margin: 1.6rem auto 0;
    max-width: 420px;
    text-align: left;
    display: grid;
    gap: 1rem;
}
.contact-form[hidden], .email-box[hidden] { display: none; }
.field span { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; }
.field input, .field textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font: 1rem/1.5 var(--sans);
    padding: 0.6rem 0.75rem;
}
.field textarea { resize: vertical; min-height: 7rem; }
.contact-form .btn { justify-self: start; }
.form-status { min-height: 1.5em; font-size: 0.95rem; color: var(--muted); }
.form-status.ok { color: var(--accent); }
.hp { position: absolute; left: -9999px; }

/* Footer and blind-embossed seal: three copies of the seal outline,
   a light edge up-left, a dark edge down-right, and a face the same tone as the page. */
.footer { margin-top: 5rem; color: var(--faint); font-size: 0.9rem; }

.seal {
    position: relative;
    width: min(220px, 60vw);
    aspect-ratio: 1;
    margin: 0 auto 1.6rem;
}
.seal span {
    position: absolute;
    inset: 0;
    -webkit-mask: url("seal.svg") center / contain no-repeat;
    mask: url("seal.svg") center / contain no-repeat;
}
.seal-hi { background: rgba(255, 255, 255, 0.10); transform: translate(-1px, -1px); }
.seal-lo { background: rgba(0, 0, 0, 0.75); transform: translate(1.5px, 1.5px); }
.seal-face { background: var(--bg); }

/* Gentle entrance */
@media (prefers-reduced-motion: no-preference) {
    .intro > *, .contact, .section, .footer {
        animation: rise 0.9s ease both;
    }
    .logo { animation-duration: 1.1s; }
    h1 { animation-delay: 0.3s; }
    .tagline { animation-delay: 0.5s; }
    .about { animation-delay: 0.65s; }
    .section, .contact { animation-delay: 0.8s; }
    .footer { animation-delay: 1s; }
}
@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}
