@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #1b1b20;
    --bg-soft: #232329;
    --border: #34343d;
    --text: #ededf1;
    --text-dim: #9b9ba6;
    --link: #9ad1ff;
    --link-hover: #d4ecff;
    --radius: 12px;
    --maxw: 640px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    margin: 0;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(154, 209, 255, 0.25);
    color: var(--text);
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
    color: var(--link-hover);
    text-shadow: 0 0 6px rgba(154, 209, 255, 0.35);
}

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

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.9em;
    overflow-wrap: break-word;
}

/* Layout */
#main {
    max-width: var(--maxw);
    width: 88%;
    margin: 0 auto;
    padding: 60px 0 72px;
}

/* Staggered entrance: each section rises in sequence */
#main > * {
    opacity: 0;
    animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#main > *:nth-child(1) { animation-delay: 0.05s; }
#main > *:nth-child(2) { animation-delay: 0.15s; }
#main > *:nth-child(3) { animation-delay: 0.25s; }
#main > *:nth-child(4) { animation-delay: 0.35s; }
#main > *:nth-child(5) { animation-delay: 0.45s; }
#main > *:nth-child(6) { animation-delay: 0.55s; }
#main > *:nth-child(7) { animation-delay: 0.65s; }

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

/* Intro / header */
.intro {
    display: flex;
    align-items: center;
    gap: 24px;
}

.intro-text {
    min-width: 0;
}

.name {
    margin: 0;
    font-weight: 400;
    font-size: clamp(1.4rem, 4vw, 1.9rem);
    line-height: 1.2;
    color: var(--text-dim);
}

.name-accent {
    display: block;
    margin-top: 2px;
    font-weight: 800;
    font-size: clamp(2.6rem, 9vw, 3.4rem);
    letter-spacing: -0.02em;
    color: #fff;
}

.tagline {
    margin: 14px 0 0;
    color: var(--text-dim);
    font-style: italic;
    font-size: clamp(0.9rem, 2.4vw, 1.05rem);
}

/* Social icons */
.socials {
    display: flex;
    gap: 4px;
    margin: 28px 0 0;
}

.social {
    display: inline-flex;
    padding: 4px;
    color: var(--text);
    transition: transform 0.2s ease, color 0.2s ease, filter 0.2s ease;
}

.social:hover {
    color: var(--link-hover);
    transform: translateY(-3px);
    filter: drop-shadow(0 0 6px rgba(154, 209, 255, 0.45));
}

.social svg {
    width: 46px;
    height: 46px;
    vertical-align: middle;
}

/* Body copy */
.bio {
    margin: 28px 0;
}

.notice {
    margin: 0 0 28px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Contact panel */
.panel {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin: 28px 0 14px;
}

.field + .field {
    margin-top: 14px;
}

.field-label {
    display: block;
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}

/* Other sites */
.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 6px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.site-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.site-list li:last-child {
    border-bottom: none;
}

.site-name {
    font-weight: 600;
}

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

.colophon {
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-dim);
}

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

.colophon a:hover {
    color: var(--link-hover);
}

/* 404 page */
.error {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    padding: 24px;
}

.error-code {
    margin: 0;
    font-weight: 800;
    line-height: 1;
    font-size: clamp(4.5rem, 20vw, 9rem);
    letter-spacing: -0.03em;
    color: #fff;
}

.error-msg {
    margin: 0 0 10px;
    color: var(--text-dim);
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-soft);
    color: var(--text);
    font-weight: 600;
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    color: var(--link-hover);
    border-color: var(--link);
    box-shadow: 0 0 0 1px var(--link), 0 8px 24px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

/* Avatar + neon ring */
.neon-ring {
    position: relative;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    background: radial-gradient(circle, rgba(255, 0, 204, 0.3), rgba(51, 51, 153, 0.2));
}

.neon-ring::before {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #ff00cc, #3939bc, #ff00cc);
    z-index: 0;
    filter: blur(7px);
    opacity: 0.9;
    animation: spin 8s linear infinite;
}

.avatar {
    display: block;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

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

/* Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

*::-webkit-scrollbar {
    width: 9px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #45454f;
}

/* Responsive */
@media (max-width: 600px) {
    #main {
        padding: 40px 0 56px;
    }

    .intro {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .avatar {
        width: 104px;
        height: 104px;
    }

    .social svg {
        width: 40px;
        height: 40px;
    }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    #main > * {
        opacity: 1 !important;
    }
}

/* Print: the dark on-screen theme is illegible on paper, so invert for print */
@media print {
    body {
        background: #fff;
        color: #111;
    }
    #main {
        max-width: none;
        width: 100%;
        padding: 0;
    }
    #main > * {
        opacity: 1 !important;
        animation: none !important;
    }
    .name, .name-accent {
        color: #111;
    }
    .tagline, .field-label, .site-desc {
        color: #444;
    }
    a {
        color: #00339a;
        text-decoration: underline;
        text-shadow: none;
    }
    .neon-ring::before {
        display: none;
    }
    .panel {
        background: #fff;
        border-color: #999;
    }
    .site-list li {
        border-color: #ccc;
    }
    .section-title {
        border-color: #999;
    }
    /* Expose link targets on paper */
    .bio a[href^="http"]::after,
    .site-list a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
        color: #555;
    }
}
