:root {
    color-scheme: dark;
    --bg: #0a0a0b;
    --surface: rgba(20, 20, 22, 0.94);
    --surface-hover: #1c1c1f;
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    --accent: #2dd4bf;
    --border: #27272a;
}

body {
    font-family: "Fira Code", monospace;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

.app-container {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    align-items: start;
}

.home {
    position: relative;
    z-index: 1;
    width: min(100%, 1080px);
    margin: 0 auto;
    padding: clamp(3rem, 8vh, 6rem) clamp(1.25rem, 5vw, 3rem);
    padding-top: clamp(5rem, 13vh, 9rem);
}

.intro {
    margin-bottom: 4rem;
    text-align: center;
    -webkit-user-select: none;
    user-select: none;
}

h1 {
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.06em;
}

.subtitle {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.8;
}

.projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    max-width: 780px;
    margin: 0 auto;
}

.projects-grid > li {
    flex: 0 1 calc((100% - 3.75rem) / 4);
    max-width: 180px;
    min-width: 0;
}

.project-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 112px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.project-icon {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.arrow {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: color 180ms ease, transform 180ms ease;
}

.project-name {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
}

.project-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
    .project-link:hover {
        border-color: var(--accent);
        background: var(--surface-hover);
        transform: translateY(-3px);
    }

    .project-link:hover .arrow {
        color: var(--accent);
        transform: translate(2px, -2px);
    }
}

.project-link:active {
    border-color: var(--accent);
    background: var(--surface-hover);
}

@media (max-width: 720px) {
    .projects-grid > li {
        flex-basis: calc((100% - 1.25rem) / 2);
    }

    .intro {
        margin-bottom: 3rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    .project-link,
    .arrow {
        transition: none;
        transform: none !important;
    }
}
