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

:root {
    --bg: #111111;
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.72);
    --quiet: rgba(255, 255, 255, 0.52);
    --line: rgba(255, 255, 255, 0.18);
    --panel: rgba(17, 17, 17, 0.78);
    --blue: #9bbcff;
    --blue-strong: #7fa8ff;
}

html,
body {
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    height: 100vh;
    overflow: hidden;
    width: 100vw;
}

button,
a {
    font: inherit;
}

button {
    color: inherit;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
}

.landing {
    min-height: 100vh;
    position: relative;
}

#canvas-container {
    inset: 0;
    position: absolute;
    z-index: 1;
}

.landing-content {
    max-width: 620px;
    padding: 24px 32px;
    pointer-events: none;
    position: relative;
    z-index: 10;
}

.landing-content h1 {
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.2;
    margin-bottom: 16px;
}

.landing-content h1 span {
    animation: fadeInUp 0.8s ease forwards;
    display: block;
    opacity: 0;
    transform: translateY(20px);
}

.landing-content h1 span:nth-child(1) {
    animation-delay: 0.2s;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
}

.landing-content h1 span:nth-child(2),
.landing-content h1 span:nth-child(3) {
    animation-delay: 0.4s;
    font-size: clamp(1.875rem, 4.25vw, 3.4rem);
}

.landing-content h1 span:nth-child(3) {
    animation-delay: 0.6s;
}

.landing-content p {
    animation: fadeInUp 0.8s ease 0.8s forwards;
    color: var(--muted);
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    font-weight: 400;
    line-height: 1.6;
    max-width: 420px;
    opacity: 0;
    transform: translateY(20px);
}

.bottom-nav {
    align-items: center;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    left: 0;
    padding: 16px 24px;
    pointer-events: none;
    position: absolute;
    right: 0;
    z-index: 20;
}

.bottom-nav-left,
.bottom-nav-right {
    align-items: center;
    display: flex;
    gap: 14px;
}

.bottom-nav-right {
    gap: 20px;
}

.nav-icon-box {
    align-items: center;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    display: flex;
    font-size: 10px;
    font-weight: 700;
    height: 24px;
    justify-content: center;
    letter-spacing: 0;
    width: 24px;
}

.nav-link,
.text-action {
    background: none;
    border: 0;
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    pointer-events: auto;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.nav-link {
    font-size: 0.9rem;
}

.nav-link:hover,
.text-action:hover {
    color: #ffffff;
}

.project-preview {
    background: var(--panel);
    border: 1px solid rgba(155, 188, 255, 0.32);
    border-radius: 6px;
    box-shadow: 0 0 34px rgba(127, 168, 255, 0.15);
    color: var(--text);
    left: 50%;
    max-width: min(300px, calc(100vw - 32px));
    padding: 16px;
    pointer-events: auto;
    position: fixed;
    top: 50%;
    transform: translate3d(-50%, -50%, 0);
    z-index: 30;
}

.project-preview h2,
.project-panel h2 {
    font-size: 1.3rem;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 7px 0 10px;
}

.project-preview p,
.project-panel p {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.eyebrow {
    color: var(--blue);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.text-action {
    display: inline-flex;
    font-size: 0.86rem;
    margin-top: 14px;
}

.panel-shell {
    align-items: stretch;
    display: grid;
    inset: 0;
    justify-content: end;
    padding: 20px;
    pointer-events: none;
    position: fixed;
    z-index: 50;
}

.panel-backdrop {
    background: rgba(0, 0, 0, 0.16);
    inset: 0;
    pointer-events: auto;
    position: fixed;
}

.project-panel {
    --panel-close-space: 42px;
    align-self: center;
    background: rgba(17, 17, 17, 0.88);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
    max-height: calc(100vh - 40px);
    max-width: min(420px, calc(100vw - 40px));
    overflow: auto;
    padding: 24px;
    pointer-events: auto;
    position: relative;
    width: 420px;
}

.project-index-panel {
    width: 500px;
}

.panel-summary {
    color: var(--text);
    margin-bottom: 14px;
}

.panel-close {
    backdrop-filter: blur(12px);
    background: rgba(17, 17, 17, 0.74);
    float: right;
    margin: -8px -8px 8px 12px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.project-panel > .eyebrow,
.project-panel > h2 {
    padding-right: var(--panel-close-space);
}

.icon-button {
    align-items: center;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    font-size: 1.25rem;
    height: 32px;
    justify-content: center;
    line-height: 1;
    width: 32px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin-top: 18px;
}

.tag-list li {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--quiet);
    font-size: 0.75rem;
    padding: 4px 8px;
}

.panel-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.panel-links a {
    color: var(--text);
    font-size: 0.86rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.project-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.project-list button {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    padding: 12px;
    text-align: left;
}

.project-list strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.project-list span {
    color: var(--muted);
    display: block;
    font-size: 0.82rem;
    line-height: 1.45;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 700px) {
    .landing-content {
        padding: 20px;
    }

    .bottom-nav {
        align-items: flex-start;
        gap: 12px;
        padding: 12px 16px;
    }

    .bottom-nav-left,
    .bottom-nav-right {
        align-items: flex-start;
        gap: 10px;
    }

    .bottom-nav-right {
        flex-direction: column;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .panel-shell {
        align-items: end;
        justify-content: stretch;
        padding: 0;
    }

    .project-panel,
    .project-index-panel {
        border-radius: 8px 8px 0 0;
        max-height: 78vh;
        max-width: none;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}
