* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Helvetica, "Nimbus Sans", Arial, "Liberation Sans", sans-serif;
}

:root {
    --accent: #38bdf8;
    --accent-hover: #7dd3fc;
    --bg-card: #15171d;
    --bg-card-hover: #191c23;
    --border-card: rgba(56, 189, 248, 0.18);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-white: #ffffff;
}

html {
    background-color: #0d0e12;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    color: var(--text-primary);
    background: radial-gradient(circle, #1a1c23, #0d0e12) no-repeat scroll center center / cover;
}

body.main-page {
    align-items: center;
    overflow: hidden;
    position: relative;
}

body.main-page::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 200, 255, 0.05) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 540px;
}

.back {
    display: inline-block;
    margin-bottom: 15px;
    color: var(--accent);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    padding-left: 12px;
    border-left: 4px solid var(--accent);
    font-size: 1.75rem;
    font-weight: 700;
}

.projects,
.sandbox-list {
    display: grid;
    gap: 14px;
}

.project,
.sandbox-item {
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    transition: background 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
}

.project:active,
.sandbox-item:active {
    transform: scale(0.99);
}

.project-title,
.sandbox-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.project-title a,
.sandbox-title a {
    color: var(--text-white);
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.25s ease;
}

.sandbox-item .sandbox-title a {
    font-size: 1rem;
    font-weight: 500;
}

.project-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 10px;
}

.project-meta,
.meta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sandbox-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}

.sandbox-item .sandbox-title {
    margin-bottom: 0;
}

.sandbox-item .meta-group {
    flex-shrink: 0;
}

.sandbox-item.closed {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.3);
}

.sandbox-item.closed .sandbox-title a {
    pointer-events: none;
    cursor: not-allowed;
}

.sandbox-item.closed .meta-group .tag {
    opacity: 0.6;
}

.tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 5px;
    text-transform: uppercase;
    display: inline-block;
}

.tag.version { color: #38bdf8; background: rgba(56, 189, 248, 0.1); }
.tag.status { color: #94a3b8; background: rgba(148, 163, 184, 0.15); }
.tag.vanilla { color: #f7df1e; background: rgba(247, 223, 30, 0.1); }
.tag.javascript { color: #f7df1e; background: rgba(247, 223, 30, 0.1); }
.tag.deno { color: #ffffff; background: rgba(255, 255, 255, 0.15); }
.tag.other { color: #9ca3af; background: rgba(255, 255, 255, 0.12); }
.tag.deprecated { color: #ef4444; background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.25); }
.tag.apache { color: #cf72d1; background: rgba(114, 46, 115, 0.2); border: 1px solid rgba(114, 46, 115, 0.3); }
.tag.proprietary { color: #ef4444; background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.2); }
.tag.cc0 { color: #10b981; background: rgba(16, 185, 129, 0.15); }
.tag.unlicense { color: #6b7280; background: rgba(107, 114, 128, 0.15); }
.tag.mit { color: #b91c1c; background: rgba(185, 28, 28, 0.15); }
.tag.starbasic { color: #22c55e; background: rgba(34, 197, 94, 0.15); }

.profile-card {
    background: rgba(21, 23, 29, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 35px 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.avatar {
    width: 85px;
    height: 85px;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.05);
    border: 2px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.1);
}

.avatar-image {
    width: 60%;
    height: 60%;
    margin-top: -10%;
    object-fit: contain;
    display: block;
}

.name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}

.bio {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.email-link {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(56, 189, 248, 0.25);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.email-link:hover {
    color: var(--accent-hover);
    border-bottom-color: rgba(56, 189, 248, 0.5);
}

.logo {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 40px;
    color: var(--text-white);
    text-align: center;
}

.logo span {
    color: var(--accent);
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(8px);
}

.menu-item:hover {
    background: rgba(56, 189, 248, 0.03);
    border-color: rgba(56, 189, 248, 0.12);
    transform: translateY(-1px);
}

.menu-item:active {
    transform: scale(0.98);
}

.menu-item::after {
    content: '\2192';
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, color 0.3s ease;
}

.menu-item:hover::after {
    transform: translateX(3px);
    color: rgba(56, 189, 248, 0.4);
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
}

.menu-item:hover .menu-link {
    color: var(--text-white);
}

.apple-emoji {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    flex-shrink: 0;
    display: inline-block;
}

.separator {
    margin: 6px 0;
    height: 1px;
    width: 100%;
    max-width: 400px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
}

.frame-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-card, #15171d);
    border: 1px solid var(--border-card, rgba(56, 189, 248, 0.18));
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.frame-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(56, 189, 248, 0.05);
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
    backdrop-filter: blur(8px);
}

.frame-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
}

.frame-logo span {
    color: #38bdf8;
}

.frame-back {
    color: #38bdf8;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.frame-back:hover {
    color: #7dd3fc;
}

.frame-content {
    padding: 0;
    min-height: 400px;
    background: transparent;
}

.frame-content iframe {
    width: 100%;
    height: 600px;
    border: none;
    background: transparent;
    display: block;
}

@media (hover: hover) {
    .project:hover,
    .sandbox-item:hover {
        background: var(--bg-card-hover);
        border-color: var(--accent);
        transform: translateY(-1px);
    }

    .project:hover .project-title a,
    .sandbox-item:hover .sandbox-title a {
        color: var(--accent);
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.8rem;
    }

    h1 {
        font-size: 1.4rem;
        gap: 8px;
    }

    .project,
    .sandbox-item {
        padding: 14px;
    }

    .project-title a,
    .sandbox-title a {
        font-size: 1rem;
    }

    .sandbox-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .menu-item {
        padding: 14px 18px;
    }

    .menu-link {
        font-size: 0.95rem;
        gap: 8px;
    }

    .apple-emoji {
        width: 1em;
        height: 1em;
    }

    .profile-card {
        padding: 25px 15px;
    }

    .name {
        font-size: 1.4rem;
    }

    .bio {
        font-size: 0.95rem;
    }

    .frame-content iframe {
        height: 400px;
    }
}