/* Bio-link × goth mono — guns.lol inspired: grid, scanlines, sharp chrome */

:root {
    --bg-void: #020202;
    --bg-deep: #050505;
    --bg: #080808;
    --bg-panel: #0c0c0c;
    --bg-elevated: #101010;
    --border: #242424;
    --border-hot: #3a3a3a;
    --border-glow: rgba(255, 255, 255, 0.14);
    --text: #ececec;
    --text-muted: #7d7d7d;
    --text-faint: #4a4a4a;
    --white: #fafafa;
    --chrome: #ffffff;
    --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --font-body: "Outfit", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
    --font-bio: "Share Tech Mono", var(--font-mono);
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.75rem;
    --space-lg: 3rem;
    --space-xl: 5rem;
    --radius: 1px;
    --max: 42rem;
}

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

::selection {
    background: var(--chrome);
    color: var(--bg-deep);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-void);
    background-image:
        radial-gradient(ellipse 100% 70% at 50% -25%, rgba(255, 255, 255, 0.055), transparent 50%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 50%, var(--bg-void) 100%);
}

/* Layers */
.grain {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 3;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.grid-bg {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.45;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 85% 65% at 50% 35%, black 20%, transparent 72%);
}

.scanlines {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 2;
    opacity: 0.04;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.45) 2px,
        rgba(0, 0, 0, 0.45) 4px
    );
}

.hero,
.section,
.footer {
    position: relative;
    z-index: 1;
}

/* Hero */
.hero {
    text-align: center;
    padding: var(--space-xl) var(--space-sm) var(--space-lg);
    max-width: var(--max);
    margin: 0 auto;
}

.hero__frame {
    position: relative;
    display: inline-block;
    padding: 5px;
    margin-bottom: var(--space-md);
    border: 1px solid var(--border);
    background:
        linear-gradient(145deg, rgba(20, 20, 20, 0.95) 0%, rgba(8, 8, 8, 0.98) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 0 40px -12px rgba(255, 255, 255, 0.06),
        0 28px 56px -28px rgba(0, 0, 0, 0.95);
}

.hero__corner {
    position: absolute;
    width: 10px;
    height: 10px;
    border-color: var(--text-faint);
    border-style: solid;
    pointer-events: none;
}

.hero__corner--tl {
    top: -1px;
    left: -1px;
    border-width: 1px 0 0 1px;
}

.hero__corner--tr {
    top: -1px;
    right: -1px;
    border-width: 1px 1px 0 0;
}

.hero__corner--bl {
    bottom: -1px;
    left: -1px;
    border-width: 0 0 1px 1px;
}

.hero__corner--br {
    bottom: -1px;
    right: -1px;
    border-width: 0 1px 1px 0;
}

.hero__avatar {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: cover;
    filter: grayscale(1) contrast(1.08) brightness(0.98);
    border-radius: var(--radius);
}

.hero__eyebrow {
    margin: 0 0 var(--space-xs);
    font-family: var(--font-bio);
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: lowercase;
    color: var(--text-muted);
}

.hero__title {
    margin: 0 0 var(--space-sm);
    font-family: var(--font-display);
    font-size: clamp(2.75rem, 8vw, 4rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.08;
    color: var(--white);
    text-shadow:
        0 0 80px rgba(255, 255, 255, 0.07),
        0 1px 0 rgba(255, 255, 255, 0.12);
}

.hero__tagline {
    margin: 0 0 var(--space-md);
    font-size: 1.02rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

/* guns.lol style primary link */
.guns-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: var(--space-sm);
    padding: 0.85rem 1.5rem 0.95rem;
    min-width: min(100%, 20rem);
    font-family: var(--font-bio);
    text-decoration: none;
    color: var(--chrome);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 0 1px rgba(0, 0, 0, 0.5);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.25s ease,
        transform 0.2s ease;
}

.guns-link:hover,
.guns-link:focus-visible {
    background: var(--chrome);
    color: var(--bg-void);
    border-color: var(--chrome);
    box-shadow:
        0 0 0 1px var(--chrome),
        0 0 48px -8px rgba(255, 255, 255, 0.35);
    outline: none;
    transform: translateY(-1px);
}

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

.guns-link__line {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    line-height: 1.3;
}

.guns-link__brand {
    font-size: 0.82rem;
    letter-spacing: 0.32em;
    text-transform: lowercase;
    opacity: 0.88;
}

.guns-link:hover .guns-link__brand,
.guns-link:focus-visible .guns-link__brand {
    opacity: 1;
}

.guns-link__slash {
    opacity: 0.4;
    margin: 0 0.02em;
    font-size: 0.95rem;
}

.guns-link__user {
    font-weight: 400;
    font-size: 1.02rem;
    letter-spacing: 0.14em;
}

.guns-link__hint {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-faint);
    transition: color 0.2s ease;
}

.guns-link:hover .guns-link__hint,
.guns-link:focus-visible .guns-link__hint {
    color: var(--bg-deep);
    opacity: 0.65;
}

/* Main */
main {
    max-width: calc(var(--max) + 4rem);
    margin: 0 auto;
    padding: var(--space-lg) var(--space-sm) var(--space-xl);
}

.section {
    margin-bottom: var(--space-xl);
}

.section:last-child {
    margin-bottom: 0;
}

.section__head {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.section__title {
    margin: 0;
    flex-shrink: 0;
    font-family: var(--font-bio);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.section__title::before {
    content: "[ ";
    color: var(--text-faint);
    letter-spacing: 0.15em;
}

.section__title::after {
    content: " ]";
    color: var(--text-faint);
    letter-spacing: 0.15em;
}

.section__rule {
    flex: 1;
    height: 1px;
    margin: 0;
    background: linear-gradient(90deg, var(--border-hot), transparent 92%);
    min-width: 2rem;
    position: relative;
}

.section__rule::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 4px;
    height: 4px;
    background: var(--text-faint);
    transform: translateY(-50%);
    opacity: 0.6;
}

/* Projects */
.projects {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.project-card {
    position: relative;
    border: 1px solid var(--border);
    background: linear-gradient(165deg, var(--bg-elevated) 0%, var(--bg-panel) 100%);
    transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 45%);
    transition: opacity 0.2s ease;
}

.project-card:hover {
    border-color: var(--border-hot);
    box-shadow:
        0 0 0 1px var(--border-glow),
        0 20px 48px -28px rgba(0, 0, 0, 0.9);
    transform: translateY(-3px);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card__link {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.3rem 1rem;
    padding: var(--space-md);
    text-decoration: none;
    color: inherit;
}

.project-card__name {
    grid-column: 1;
    font-family: var(--font-display);
    font-size: 1.32rem;
    font-weight: 600;
    color: var(--white);
}

.project-card__desc {
    grid-column: 1;
    font-size: 0.88rem;
    font-weight: 300;
    color: var(--text-muted);
}

.project-card__arrow {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
    font-family: var(--font-bio);
    font-size: 1.1rem;
    color: var(--text-faint);
    transition: color 0.2s ease, transform 0.2s ease;
}

.project-card:hover .project-card__arrow {
    color: var(--chrome);
    transform: translateX(5px);
}

/* GitHub stats */
.section--stats .stats__note {
    margin: 0 0 var(--space-md);
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.stats__mono {
    font-family: var(--font-mono);
    font-size: 0.75em;
}

.stats__note code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    padding: 0.15em 0.45em;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    color: var(--white);
}

.stats__grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.stats__figure {
    margin: 0;
    padding: var(--space-sm);
    border: 1px solid var(--border);
    background: var(--bg-panel);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.stats__img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* Footer */
.footer {
    padding: var(--space-lg) var(--space-sm);
    text-align: center;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.35));
}

.footer__text {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--text-faint);
}

@media (min-width: 640px) {
    .stats__grid {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stats__figure {
        flex: 1 1 calc(50% - var(--space-md) / 2);
        min-width: min(100%, 280px);
    }

    .guns-link {
        padding: 0.75rem 1.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .project-card,
    .project-card__arrow,
    .guns-link {
        transition: none;
    }

    .project-card:hover {
        transform: none;
    }

    .guns-link:hover,
    .guns-link:focus-visible {
        transform: none;
    }
}
