---
import BaseLayout from "../layouts/BaseLayout.astro";

const birthday = new Date(2003, 6, 8); // July 8, 2003
const now = new Date();
let age = now.getFullYear() - birthday.getFullYear();
if (now < new Date(now.getFullYear(), 6, 8)) age--;
---

<BaseLayout
    title="Hidden Den Cafe"
    description="Latte's cozy corner of the internet. Gay furry wizard, IT enthusiast, and self-hosting advocate."
>
    <div class="matrix-bg" aria-hidden="true"></div>

    <main class="main">
        <div class="container">
            <!-- Header -->
            <header class="header fade-in">
                <div class="hero-avatar">
                    <div class="avatar-circle">
                        <img src="/images/avatar.png" alt="Latte avatar" />
                    </div>
                </div>
                <h1 class="title">Hidden Den Cafe</h1>
                <div class="divider">══════════════════════════════</div>
            </header>

            <!-- About -->
            <section class="section fade-in">
                <p class="intro">
                    Hey, I'm <span class="highlight">Latte</span> (he/him).
                </p>
                <p class="tagline">gay furry wizard</p>
                <p class="desc">
                    IT wizard with a homelab. I believe in self-hosting,
                    privacy, and keeping control of my own data. Companies don't
                    get to sell or misuse what's mine.
                </p>
                <div class="meta">
                    <span><span class="meta-key">age:</span> {age}</span>
                    <span><span class="meta-key">status:</span> healing</span>
                </div>
            </section>

            <!-- Cryptographic Keys -->
            <section class="section fade-in">
                <h2>Cryptographic Keys</h2>
                <div class="keys">
                    <div class="key-item">
                        <span class="key-label">pgp fingerprint:</span>
                        <code class="key-value"
                            >50DAAAABFD6D76B86507C46E723D1C7AB893AEBE</code
                        >
                    </div>
                    <div class="key-item">
                        <span class="key-label">pgp key:</span>
                        <a
                            href="https://git.hiddenden.cafe/Latte.gpg"
                            target="_blank"
                            rel="noopener noreferrer"
                            class="key-link">latte.gpg</a
                        >
                    </div>
                    <div class="key-item">
                        <span class="key-label">ssh public key:</span>
                        <a
                            href="https://git.hiddenden.cafe/Latte.keys"
                            target="_blank"
                            rel="noopener noreferrer"
                            class="key-link">latte.keys</a
                        >
                    </div>
                </div>
            </section>

            <!-- Games -->
            <section class="section fade-in">
                <h2>Games</h2>
                <p class="games">
                    Minecraft, No Man's Sky, Warframe, Cyberpunk 2077
                </p>
            </section>

            <!-- Socials -->
            <section class="section fade-in">
                <h2>Socials</h2>
                <ul class="links">
                    <li>
                        <a href="mailto:latte@hiddenden.cafe">email</a> — latte@hiddenden.cafe
                    </li>
                    <li>
                        <a
                            href="https://signal.me/#eu/SkC6qz0-CzbhpnKwhkkvV6QGFL-NJ_FHfQqafsWqwHfW3QZGuO5D-KlCF2NBE6RA"
                            target="_blank"
                            rel="noopener noreferrer">signal</a
                        >
                    </li>
                    <li>
                        <a
                            href="https://discord.com/users/714955493923225639"
                            target="_blank"
                            rel="noopener noreferrer">discord</a
                        > — <a
                            href="https://discord.gg/kjwwDtSXYY"
                            target="_blank"
                            rel="noopener noreferrer">join my server</a
                        >
                    </li>
                    <li>
                        <a
                            href="https://bsky.app/profile/hiddenden.cafe"
                            target="_blank"
                            rel="noopener noreferrer">bluesky</a
                        >
                    </li>
                    <li>
                        <a
                            href="https://steamcommunity.com/profiles/76561198292838319/"
                            target="_blank"
                            rel="noopener noreferrer">steam</a
                        >
                    </li>
                    <li>
                        <a
                            href="https://git.hiddenden.cafe/Latte"
                            target="_blank"
                            rel="noopener noreferrer">gitea</a
                        >
                    </li>
                </ul>
            </section>

            <!-- Services -->
            <section class="section fade-in">
                <h2>Services</h2>
                <ul class="links">
                    <li>
                        <a
                            href="https://git.hiddenden.cafe"
                            target="_blank"
                            rel="noopener noreferrer">Gitea</a
                        > — self-hosted git server
                    </li>
                </ul>
            </section>

            <!-- Donate -->
            <section class="section fade-in">
                <h2>Support</h2>
                <div class="donate">
                    <div class="crypto">
                        <span class="crypto-label">[XMR]</span>
                        <code class="crypto-addr"
                            >41uiUeBru8jhtzjQz3M5CKV1uFpern7juStdfveNQS52LQ9aw3mNkdbc8akM81YnxuE2RT9K2Cmyp9cfyi1osrbVBjBbzQ3</code
                        >
                    </div>
                    <div class="crypto">
                        <span class="crypto-label">[ETH]</span>
                        <code class="crypto-addr"
                            >0x3Dfc92458267b91BFa6bF8f6c86bAE809Ab76Cb4</code
                        >
                    </div>
                </div>
            </section>

            <!-- Footer -->
            <footer class="footer fade-in">
                <p>Made with love by Latte</p>
            </footer>
        </div>
    </main>
</BaseLayout>

<style>
    /* Matrix-style animated background */
    .matrix-bg {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        opacity: 0.03;
        background:
            linear-gradient(var(--color-accent) 1px, transparent 1px),
            linear-gradient(90deg, var(--color-accent) 1px, transparent 1px);
        background-size: 50px 50px;
        animation: grid-move 20s linear infinite;
    }

    @keyframes grid-move {
        0% {
            transform: translate(0, 0);
        }
        100% {
            transform: translate(50px, 50px);
        }
    }

    .main {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: var(--space-lg) var(--space-md);
        padding-top: calc(var(--space-lg) + 3rem);
    }

    .container {
        max-width: 700px;
        width: 100%;
        background: var(--color-glass);
        backdrop-filter: blur(10px);
        border: 1px solid var(--color-surface);
        border-radius: 8px;
        padding: var(--space-xl);
    }

    .header {
        text-align: center;
        margin-bottom: var(--space-lg);
    }

    .hero-avatar {
        display: flex;
        justify-content: center;
        margin-bottom: 12px;
    }

    .avatar-circle {
        width: 128px;
        height: 128px;
        border-radius: 50%;
        overflow: hidden;
        flex-shrink: 0;
    }

    .avatar-circle img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scale(1.08);
        transform-origin: center;
    }

    .title {
        font-size: 2rem;
        font-weight: 700;
        letter-spacing: 2px;
    }

    .divider {
        color: var(--color-surface);
        text-align: center;
        font-size: 0.75rem;
        margin: var(--space-md) 0;
        user-select: none;
    }

    .section {
        margin: var(--space-lg) 0;
    }

    .section h2 {
        font-size: 1rem;
        text-transform: uppercase;
        letter-spacing: 2px;
        margin-bottom: var(--space-sm);
        color: var(--color-accent);
    }

    .intro {
        font-size: 1.1rem;
        margin-bottom: var(--space-xs);
    }

    .highlight {
        color: var(--color-accent-bright);
        font-weight: 700;
    }

    .tagline {
        color: var(--color-accent);
        font-style: italic;
        margin-bottom: var(--space-sm);
    }

    .desc {
        color: var(--color-text-dim);
        line-height: 1.7;
    }

    .meta {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-xs) var(--space-md);
        margin-top: var(--space-sm);
        font-size: 0.9rem;
        color: var(--color-text-dim);
    }

    .meta-key {
        color: var(--color-accent);
    }

    .keys {
        display: flex;
        flex-direction: column;
        gap: var(--space-xs);
    }

    .key-item {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: var(--space-xs);
    }

    .key-label {
        color: var(--color-accent);
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .key-value {
        font-size: 0.72rem;
        color: var(--color-text-dim);
        word-break: break-all;
        background: var(--color-bg);
        padding: 2px 6px;
        border-radius: 4px;
    }

    .key-link {
        color: var(--color-blue);
        font-size: 0.85rem;
    }

    .key-link:hover {
        color: var(--color-accent-bright);
    }

    .games {
        color: var(--color-text-dim);
    }

    .links {
        list-style: none;
    }

    .links li {
        margin-bottom: var(--space-xs);
        color: var(--color-text-dim);
    }

    .links a {
        color: var(--color-blue);
    }

    .links a:hover {
        color: var(--color-accent-bright);
    }

    .donate {
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
    }

    .crypto {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: var(--space-xs);
    }

    .crypto-label {
        color: var(--color-peach);
        font-weight: 700;
        font-size: 0.85rem;
    }

    .crypto-addr {
        font-size: 0.7rem;
        color: var(--color-text-dim);
        word-break: break-all;
        background: var(--color-bg);
        padding: 2px 6px;
        border-radius: 4px;
    }

    .footer {
        margin-top: var(--space-xl);
        text-align: center;
    }

    .footer p {
        color: var(--color-text-dim);
        font-size: 0.85rem;
    }

    /* Animations */
    .fade-in {
        animation: fadeIn 0.6s ease-out forwards;
        opacity: 0;
    }

    .fade-in:nth-child(1) {
        animation-delay: 0.1s;
    }
    .fade-in:nth-child(2) {
        animation-delay: 0.2s;
    }
    .fade-in:nth-child(3) {
        animation-delay: 0.3s;
    }
    .fade-in:nth-child(4) {
        animation-delay: 0.4s;
    }
    .fade-in:nth-child(5) {
        animation-delay: 0.5s;
    }
    .fade-in:nth-child(6) {
        animation-delay: 0.6s;
    }
    .fade-in:nth-child(7) {
        animation-delay: 0.7s;
    }

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

    /* Responsive */
    @media (max-width: 600px) {
        .container {
            padding: var(--space-md);
        }

        .avatar-circle {
            width: 100px;
            height: 100px;
        }

        .title {
            font-size: 1.5rem;
        }

        .divider {
            font-size: 0.6rem;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .matrix-bg {
            animation: none;
        }

        .fade-in {
            animation: none;
            opacity: 1;
        }
    }
</style>
