/* Contact buttons, poem feature card, and a quiet network-information footer. */
:root {
    --control-radius: 10px;
    --control-rule: rgba(214, 176, 118, 0.22);
    --control-surface: rgba(10, 16, 24, 0.48);
    --control-hover: rgba(46, 40, 32, 0.72);
}

body::after {
    background:
        linear-gradient(90deg, rgba(5, 9, 16, 0.68), rgba(5, 9, 16, 0.32) 52%, rgba(5, 9, 16, 0.5)),
        linear-gradient(180deg, rgba(5, 9, 16, 0.24), transparent 48%, rgba(3, 7, 13, 0.52));
}

.hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.1rem;
    margin-top: 1.3rem;
}

.hero-meta .hero-name {
    margin: 0;
}

.site-clock {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 1rem;
    border-left: 1px solid var(--control-rule);
    color: var(--accent);
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-variant-numeric: tabular-nums;
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: nowrap;
}

.site-clock::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
}

.visually-hidden,
.clipboard-fallback {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1 0 auto;
    min-height: 0;
    padding: clamp(2rem, 7vh, 5rem) 0 2rem;
    align-items: center;
}

.content-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    grid-template-areas: "profile poem" "profile monitor";
    align-items: center;
    column-gap: clamp(2rem, 6vw, 5.5rem);
    row-gap: 1.1rem;
}

.profile-panel {
    grid-area: profile;
}

.links-row {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: none;
    margin: 2rem 0 0;
    gap: 0.6rem;
    border: 0;
}

.social-link,
.social-link:nth-child(even) {
    min-height: 44px;
    padding: 0.6rem 0.8rem;
    gap: 0.45rem;
    justify-content: center;
    border: 1px solid var(--control-rule);
    border-radius: var(--control-radius);
    background: var(--control-surface);
    transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.social-link .icon-wrap,
.social-link:hover .icon-wrap {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.social-link .icon-wrap svg {
    width: 18px;
    height: 18px;
}

.social-label {
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}

.social-link:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: var(--control-hover);
}

.social-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.social-link:focus-visible .icon-wrap {
    outline: none;
}

.poem-zone {
    grid-area: poem;
    position: relative;
    padding: clamp(1.4rem, 3.5vw, 2.6rem);
    border: 1px solid rgba(214, 176, 118, 0.28);
    border-radius: 22px;
    background: linear-gradient(140deg, rgba(42, 37, 32, 0.8), rgba(9, 17, 26, 0.83));
    box-shadow: 0 22px 65px rgba(0, 0, 0, 0.24), inset 0 1px rgba(255, 240, 211, 0.07);
}

.poem-zone::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.poem-zone::after {
    content: "\201C";
    position: absolute;
    top: 2.1rem;
    right: 1rem;
    color: rgba(214, 176, 118, 0.12);
    font-family: Georgia, serif;
    font-size: 8rem;
    line-height: 1;
    pointer-events: none;
}

.poem-top {
    position: relative;
    z-index: 1;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.poem-tag {
    margin-right: auto;
    color: var(--accent);
    font-weight: 400;
    letter-spacing: 0.08em;
}

.poem-refresh {
    min-height: 36px;
    padding: 0.35rem 0.65rem;
    border-color: var(--control-rule);
    border-radius: var(--control-radius);
    background: var(--control-surface);
    transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.poem-refresh:hover {
    border-color: var(--accent);
    background: var(--control-hover);
    transform: translateY(-1px);
}

.poem-refresh:active,
.social-link:active {
    transform: translateY(0);
}

.poem-copy {
    min-width: 3.8rem;
}

.poem-copy[data-state="success"] {
    color: var(--accent);
    border-color: var(--accent);
}

.poem-copy[data-state="error"] {
    color: #edb9a9;
}


.poem-text {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    margin-top: 2rem;
    min-height: 3.6em;
    font-size: clamp(1.3rem, 2.2vw, 1.85rem);
    line-height: 1.8;
    letter-spacing: 0.035em;
    word-break: normal;
    line-break: strict;
    text-wrap: pretty;
}

.poem-text::before,
.poem-text::after {
    display: none;
}

.poem-author {
    position: relative;
    z-index: 1;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    text-align: right;
    line-height: 1.6;
}


footer {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "identity";
    width: min(1120px, calc(100% - 3rem));
    padding: 1.3rem 0 max(1.4rem, env(safe-area-inset-bottom));
    gap: 2rem;
    border-top: 1px solid rgba(214, 176, 118, 0.18);
    align-items: center;
    text-align: left;
}

.ip-card {
    grid-area: monitor;
    justify-content: center;
    width: 100%;
}

.ip-card[hidden] {
    display: none;
}

.ip-card-shell {
    width: 100%;
    border: 1px solid rgba(214, 176, 118, 0.2);
    border-radius: 12px;
    background: rgba(10, 16, 24, 0.3);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

/* White raster pixels become black, then screen blending lets the page show
   through. Dark image text becomes light; do not reduce the whole image opacity. */
.ip-card img {
    filter: invert(1) hue-rotate(180deg) saturate(0.55);
    mix-blend-mode: screen;
}

.footer-meta {
    grid-area: identity;
    min-width: 0;
    font-size: 0.76rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.footer-signature {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
    font-size: 1.4rem;
    color: var(--text-main);
}

.footer-signature span {
    font-size: 0.64rem;
    letter-spacing: 0.18em;
    color: var(--accent);
}

.footer-copyright {
    margin-bottom: 0.3rem;
    letter-spacing: 0.015em;
}

.footer-icp {
    font-size: 0.72rem;
    border-bottom-color: rgba(214, 176, 118, 0.25);
}

@media (max-width: 860px) {
    .site-main,
    footer {
        width: min(620px, calc(100% - 2.5rem));
    }

    .site-main {
        padding: 1.8rem 0 1.25rem;
    }

    .content-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "profile" "poem" "monitor";
        gap: 1.5rem;
        text-align: left;
    }

    .hero-title::after {
        margin-inline: 0;
    }

    .social-link {
        flex: 1 1 0;
    }

    footer {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "identity";
        gap: 0.75rem;
        text-align: center;
    }

    .ip-card {
        justify-content: center;
    }

    .ip-card-shell {
        width: min(340px, 100%);
    }

    .footer-signature {
        display: none;
    }

    .footer-copyright {
        margin-bottom: 0.15rem;
    }
}

@media (max-width: 520px) {
    body::after {
        background:
            linear-gradient(180deg, rgba(5, 9, 16, 0.58), rgba(5, 9, 16, 0.25) 48%, rgba(3, 7, 13, 0.64)),
            linear-gradient(90deg, rgba(5, 9, 16, 0.22), transparent 75%);
    }

    .hero-meta {
        margin-top: 0.6rem;
        gap: 0.5rem 0.75rem;
    }

    .site-clock {
        padding-left: 0.75rem;
        gap: 0.4rem;
        font-size: 0.7rem;
    }

    .poem-copy {
        min-width: 3.1rem;
    }

    .site-main,
    footer {
        width: calc(100% - 2rem);
    }

    .site-main {
        padding: 1.2rem 0 1rem;
    }

    .content-grid {
        gap: 1.1rem;
    }

    .hero-title {
        font-size: clamp(2.7rem, 12.5vw, 3.2rem);
    }

    .hero-title::after {
        margin-top: 0.65rem;
    }

    .hero-name {
        margin-top: 0.6rem;
        font-size: 0.7rem;
    }

    .links-row {
        margin-top: 1rem;
        gap: 0.4rem;
    }

    .social-link,
    .social-link:nth-child(even) {
        flex: 1 1 0;
        min-width: 0;
        min-height: 44px;
        padding: 0.45rem 0.25rem;
        gap: 0.3rem;
        border-radius: 10px;
    }

    .social-label {
        font-size: 0.74rem;
    }

    .social-link .icon-wrap,
    .social-link:hover .icon-wrap,
    .social-link .icon-wrap svg {
        width: 15px;
        height: 15px;
        flex-basis: 15px;
    }

    .poem-zone {
        padding: 1rem;
        border-radius: 17px;
    }

    .poem-zone::after {
        top: 1.5rem;
        right: 0.55rem;
        font-size: 6rem;
    }

    .poem-tag {
        font-size: 0.76rem;
        letter-spacing: 0.02em;
    }

    .poem-top {
        gap: 0.35rem;
    }

    .poem-refresh {
        min-height: 36px;
        padding: 0.3rem 0.5rem;
        font-size: 0.72rem;
    }

    .poem-text {
        margin-top: 1rem;
        min-height: 3.6em;
        font-size: 1.12rem;
        line-height: 1.8;
    }

    .poem-author {
        margin-top: 0.35rem;
        font-size: 0.77rem;
        line-height: 1.5;
    }


    footer {
        padding-top: 0.65rem;
        padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
        gap: 0.5rem;
    }

    .ip-card-shell {
        width: min(320px, 100%);
    }

    .footer-meta {
        font-size: 0.7rem;
    }
}

@media (max-width: 350px) {
    .links-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .social-link:hover,
    .poem-refresh:hover,
    .ip-card-shell:hover {
        transform: none;
    }
}
