@font-face {
    font-family: 'Shantell Sans';
    src: url('fonts/ShantellSans-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Shantell Sans';
    src: url('fonts/ShantellSans-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

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

:root {
    --bg: #faf8f0;
    --text: #2d2a24;
    --muted: #6b6560;
    --subtle: #e8e4dc;
    --accent: #2563eb;
    --card-bg: rgba(250, 248, 240, 0.6);
    --particle-color: rgba(37, 99, 235, 0.25);
    --particle-connection-color: rgba(37, 99, 235, 0.15);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1816;
        --text: #ffffff;
        --muted: #b8b4ac;
        --subtle: #3d3830;
        --accent: #60a5fa;
        --card-bg: rgba(26, 24, 22, 0.6);
        --particle-color: rgba(96, 165, 250, 0.35);
        --particle-connection-color: rgba(96, 165, 250, 0.2);
    }
}

#canvas-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

body {
    font-family: 'Shantell Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding: 4rem;
    display: flex;
    flex-direction: column;
}

main {
    width: 100%;
    max-width: 800px;
    margin-inline: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 2rem;
}

.intro {
    flex: 0.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    background: var(--card-bg);
    border-radius: 1rem;
    justify-content: space-around;
}

.glitch-text {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    position: relative;
    display: inline-block;
}

.intro p {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--muted);
    text-align: left;
}

.projects {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    text-align: left;
    background: var(--card-bg);
    border-radius: 1rem;
    gap: 1rem;
}

.section-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--muted);
}

.project-link {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    text-decoration: none;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--subtle);
    color: var(--text);
    transition: transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.project-link:last-child {
    border-bottom: none;
}

.project-name {
    font-size: 1.125rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.project-desc {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.4;
}

.socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--card-bg);
    border-radius: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--muted);
    font-size: 1rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

/* Touch tap feedback — always */
.project-link:active .project-name {
    color: var(--accent);
}

.project-link:active {
    transform: scale(0.98);
}

.social-link:active {
    background-color: var(--accent);
    color: var(--bg);
    transform: scale(0.98);
}

/* Hover only on pointer devices (not touch) */
@media (hover: hover) {
    .project-link:hover .project-name {
        color: var(--accent);
    }

    .social-link:hover {
        background-color: var(--accent);
        color: var(--bg);
    }
}

@media (max-width: 640px) {
    body {
        min-height: 100svh;
        padding: 2rem;
    }

    .glitch-text {
        font-size: 2.25rem;
    }

    .intro p {
        font-size: 1.1rem;
    }

    .section-label {
        font-size: 0.875rem;
    }

    .project-name {
        font-size: 1rem;
    }

    .project-desc {
        font-size: 0.9rem;
    }

    .social-link {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}