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

:root {
    --bg: #0f0f0f;
    --card-bg: #1a1a1a;
    --text: #c8c8c8;
    --text-muted: #6b6b6b;
    --accent: #017a8b;
    --accent-hover: #0199ad;
    --accent-dim: #014f56;
    --border: #2a2a2a;
    --font-mono: "JetBrains Mono", monospace;
    --font-sans:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
        sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.7;
    min-height: 100vh;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.25rem;
}

header {
    display: flex;
    justify-content: center;
    margin-bottom: 3.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}

.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.avatar {
    width: clamp(128px, 25.6vw, 256px);
    height: clamp(128px, 25.6vw, 256px);
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
    margin-bottom: 0.25rem;
    transition: box-shadow 0.3s ease;
    cursor: pointer;
    filter: blur(0.3px);
}

.avatar:hover {
    box-shadow: 0 0 40px rgba(1, 122, 139, 0.5);
}

h1 {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.tagline {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}

section {
    margin-bottom: 3rem;
}

section:last-of-type {
    margin-bottom: 2.5rem;
}

h2 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.875rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.project-card.wip {
    border-color: #3a3a3a;
    opacity: 0.85;
}

.project-card.wip:hover {
    border-color: var(--accent-dim);
    transform: none;
}

.wip-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    background: var(--accent-dim);
    color: var(--text);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 0.5rem;
    width: fit-content;
}

.project-card h3 {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.project-card p {
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
    flex-grow: 1;
    line-height: 1.5;
}

.collab {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    margin-bottom: 0 !important;
}

.collab a {
    color: var(--accent);
    text-decoration: none;
}

.collab a:hover {
    text-decoration: underline;
}

.tags {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    background: var(--accent-dim);
    color: var(--text);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

.link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text);
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 0.5rem 0.85rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.link-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.icon {
    font-size: 0.85rem;
}

footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.credit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.credit a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

.easter-egg {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--bg);
    opacity: 1;
    cursor: pointer;
    transition: all 0.3s;
}

.easter-egg:hover {
    color: var(--text-muted);
    opacity: 1 !important;
}

.chipi-overlay {
    position: fixed;
    bottom: 0.75rem;
    right: 0.75rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.chipi-overlay img {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 1px solid var(--accent);
}

.chipi-overlay.visible {
    opacity: 1;
}

.avatar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 200;
}

.avatar-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.avatar-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.avatar-modal-img {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    border: 2px solid var(--accent);
    box-shadow: 0 0 60px rgba(1, 122, 139, 0.3);
    cursor: default;
}

@media (max-width: 520px) {
    .container {
        padding: 2rem 1rem;
    }

    header {
        margin-bottom: 2.5rem;
        padding-bottom: 1.75rem;
    }

    h1 {
        font-size: 1.35rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    section {
        margin-bottom: 2.25rem;
    }
}
