/* Open Runde — SIL OFL 1.1, designed by Laurids Kern (the font wukko.me uses) */
@font-face {
    font-family: "Open Runde";
    font-style: normal;
    font-display: swap;
    font-weight: 500;
    src: url("assets/fonts/open-runde-latin-500-normal.woff2") format("woff2");
}

:root {
    --bg: #050505;
    --text: #e8e8e8;
    --muted: #9a9a9a;
    --faint: #6b6b6b;
    --line: #1d1d1d;
    --accent: #2fd6a3; /* jade — matches the character's horns/scales */
    --sans: "Open Runde", "SF Pro", sans-serif;
}

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

html {
    color-scheme: dark;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: color-mix(in srgb, var(--accent) 25%, transparent);
}

/* ---- layout ---- */

main {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    position: relative;
    z-index: 1;
}

main > * {
    width: min(29rem, 100%);
}

/* ambient glow behind the content */
.glow {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 40rem;
    height: 40rem;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.025;
    pointer-events: none;
}

/* ---- header ---- */

header {
    margin-bottom: 1.6rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.avatar {
    font-family: inherit;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-block;
    padding: 0;
    transition: transform 0.2s ease;
}

.avatar img {
    display: block;
    width: 2.5rem;
    height: auto;
}

.avatar:hover {
    transform: scale(1.1);
}

.avatar.spin {
    animation: spin 0.7s ease;
}

@keyframes spin {
    from { transform: rotate(0deg) scale(1.1); }
    to   { transform: rotate(360deg) scale(1); }
}

h1 {
    font-size: 1.4rem;
    font-weight: 500;
}

/* ---- bio ---- */

.bio {
    margin-bottom: 1.6rem;
}

.bio p {
    margin-bottom: 1em;
    color: #cfcfcf;
}

.bio p:last-child {
    margin-bottom: 0;
}

.bio .sub {
    font-size: 0.85rem;
    color: var(--faint);
}

a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--text) 45%, transparent);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s ease;
}

a:hover {
    text-decoration-color: var(--text);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ---- projects, t3-style mono rows ---- */

.projects {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.6rem;
}

.project {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "name arrow"
        "desc arrow";
    column-gap: 0.75rem;
    row-gap: 0.1rem;
    padding: 0.65rem 0;
    text-decoration: none;
}

.project-name {
    grid-area: name;
    font-size: 0.95rem;
    color: var(--text);
}

.project-tag {
    font-size: 0.72rem;
    color: var(--faint);
    margin-left: 0.4rem;
    white-space: nowrap;
}

.project:hover .project-title {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: color-mix(in srgb, var(--text) 45%, transparent);
}

.project-desc {
    grid-area: desc;
    font-size: 0.85rem;
    color: var(--faint);
}

.project-arrow {
    grid-area: arrow;
    align-self: center;
    font-size: 0.9rem;
    color: var(--muted);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.project:hover .project-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ---- footer ---- */

footer {
    border-top: 1px solid var(--line);
    padding-top: 1.25rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

footer nav {
    display: flex;
    gap: 1.25rem;
}

footer a,
.copy-email {
    font-size: 0.9rem;
    color: var(--faint);
    text-decoration: none;
    transition: color 0.15s ease;
}

footer a:hover,
.copy-email:hover {
    color: var(--text);
}

.copy-email {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.copied {
    font-size: 0.8rem;
    color: var(--accent);
    margin-left: auto;
}

/* ---- entrance animation ---- */

.fade {
    animation: fade-up 0.6s ease var(--delay, 0s) both;
}

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

/* ---- fx canvas: corner halftone shockwave ---- */

#fx {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* ---- print: plain contact info, wukko-style ---- */

.print-only {
    display: none;
}

@media print {
    body {
        background: #fff;
        color: #000;
    }

    main > *:not(.print-only),
    .glow,
    #fx {
        display: none !important;
    }

    .print-only {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fade,
    .avatar.spin {
        animation: none;
    }

    * {
        transition: none !important;
    }
}
