/* Mark Ward — a small door into the rabbit hole. */
:root {
    color-scheme: dark;
    --mint: #51bba6;
    --acid: #dcecaa;
    --text: #f1f5f3;
    --muted: #b5c2bc;
    --border: rgba(211, 233, 222, 0.18);
    --font-mono: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #111817; }
body {
    margin: 0;
    background-color: #111817;
    background-image: linear-gradient(rgba(17, 24, 23, 0.65), rgba(10, 15, 14, 0.75)), url('../img/dark_mosaic.png');
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Lato', Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    isolation: isolate;
}

::selection { background: var(--mint); color: #0c211b; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 10; top: 16px; left: 16px; padding: 12px 16px; background: var(--mint); color: #0c211b; transform: translateY(-180%); border-radius: 4px; }
.skip-link:focus { transform: translateY(0); }

.hero, .signal { width: min(100%, 840px); margin: 0 auto; padding-inline: 24px; text-align: center; }
.hero {
    min-height: 100vh;
    /* Keep the next section below the screen as mobile toolbars expand/collapse. */
    min-height: 100lvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-block: 72px 64px;
    /* Leave room for mobile browser controls while the section fills the larger viewport. */
    padding-bottom: calc(64px + 100lvh - 100svh);
    animation: arrive 650ms ease-out both;
}

.brand-mark {
    display: block;
    position: relative;
    flex-shrink: 0;
    width: 80px;
    aspect-ratio: 755 / 695;
    /* Share spare vertical space with the gap above the scroll link. */
    margin: auto auto 32px;
    /* Light catches the top edge; the soft cast shadow follows the ribbon. */
    filter: drop-shadow(0 -0.5px 0 rgba(210, 255, 239, 0.35))
            drop-shadow(0 3px 2px rgba(0, 0, 0, 0.28))
            drop-shadow(0 10px 14px rgba(0, 0, 0, 0.36));
}
.brand-mark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 22% 0%, rgba(235, 255, 247, 0.22), transparent 56%),
                linear-gradient(145deg, #94e3cc 0%, #57c0a6 45%, #269b83 100%);
    -webkit-mask: url('../img/mw-ribbon-white.png') center / 166.1% auto no-repeat;
    mask: url('../img/mw-ribbon-white.png') center / 166.1% auto no-repeat;
    mask-mode: alpha;
}

h1, h2 { margin: 0; font-weight: 400; line-height: 1.07; letter-spacing: -0.04em; text-wrap: balance; }
h1 { font-size: clamp(34px, 9.4vw, 76px); }
h1 em, h2 em { color: #8bd8c4; font-family: Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: -0.055em; }
h1 em { font-size: 1.08em; }
h2 { font-size: clamp(34px, 4.7vw, 50px); }
/* Give the centered flex item a stable width and predictable wrapping across browsers. */
.intro-copy { width: 100%; max-width: 570px; margin: 26px 0 0; color: var(--muted); font-size: 16px; line-height: 1.85; text-wrap: wrap; }
.intro-copy strong { color: var(--text); font-weight: 400; }
.hero-link { display: inline-flex; align-items: center; gap: 22px; flex-shrink: 0; min-height: 48px; margin-top: auto; padding: 8px 12px; color: var(--text); font-family: var(--font-mono); font-size: 12px; transition: opacity 180ms ease, visibility 0s linear; }
.hero-link.is-away { opacity: 0; visibility: hidden; pointer-events: none; transition-delay: 0s, 180ms; }
.hero-link > .icon { color: var(--mint); transition: transform 180ms ease; }
.hero-link:hover > .icon { transform: translateY(3px); }
.hero-link:hover { color: var(--mint); }
/* Move 16px of the space below the quote above it, keeping Find me in place. */
.wonder-quote { margin: 48px 0 calc(clamp(40px, 12vh, 120px) - 16px); margin-bottom: calc(clamp(40px, 12svh, 120px) - 16px); color: #a0b0a8; font-family: Georgia, 'Times New Roman', serif; font-size: 14px; font-style: italic; line-height: 1.6; text-wrap: balance; }

.signal {
    min-height: 100vh;
    /* Center within the visible screen as mobile browser controls open and close. */
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-block: 72px;
    scroll-margin-top: 0;
}
/* This section is a focusable scroll destination; its links retain visible keyboard focus. */
.signal:focus { outline: none; }
.section-divider { width: 44px; margin: 0 auto 64px; border-top: 1px solid rgba(81, 187, 166, 0.45); }
.contact-copy { width: 100%; max-width: 520px; margin: 26px auto 0; color: var(--muted); font-size: 16px; line-height: 1.85; text-wrap: wrap; }
.social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 50px;
    padding: 11px 20px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.025);
    font-size: 14px;
    font-weight: 700;
    transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.social-link .fa { color: #86d4bf; font-size: 19px; }
.social-link .external-arrow { width: 16px; height: 16px; margin-left: 8px; color: var(--muted); }
.social-link:hover { border-color: rgba(81, 187, 166, 0.55); background: rgba(81, 187, 166, 0.08); transform: translateY(-2px); }
.social-link:hover .external-arrow { color: var(--mint); }
.location-note { margin: 32px 0 0; color: #a0b0a8; font-size: 14px; line-height: 1.8; text-wrap: balance; }
.back-to-surface { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 28px; padding: 8px; color: #a0b0a8; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.back-to-surface:hover { color: var(--mint); }
.back-to-surface .icon { width: 14px; height: 14px; }

@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
    .hero { padding-block: 56px 48px; padding-bottom: calc(48px + 100lvh - 100svh); }
    .brand-mark { width: 72px; margin-bottom: 28px; }
    .intro-copy, .contact-copy { max-width: 360px; font-size: 15px; }
    .desktop-break { display: none; }
    .wonder-quote { max-width: 290px; font-size: 13px; }
    .signal { padding-block: 56px; }
    .section-divider { margin-bottom: 48px; }
    .social-links { gap: 10px; }
    .social-link { padding-inline: 16px; }
    .social-link .external-arrow { margin-left: 2px; }
    .location-note { max-width: 320px; margin-inline: auto; font-size: 13px; }
}

@media (max-height: 750px) and (min-width: 601px) {
    .hero { padding-block: 48px; padding-bottom: calc(48px + 100lvh - 100svh); }
    .brand-mark { width: 64px; margin-bottom: 24px; }
    h1 { font-size: 60px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
