:root {
    --border-radius: 8px;
}

.main {
    margin: 30px auto;
    text-align: center;
}

.box {
    width: 100%;
    max-width: 250px;
    text-align: center;
    max-height: 150px;
    margin: 0px;
    padding: 20px 3px;
}

.grid-box {
    display: grid;

    grid-template-columns: 1fr 1fr 1fr;
    width: 100%;
    max-width: 755px;
    margin: auto;
    gap: 0px;
}

body {
    background-color: rgb(164, 163, 163);
    padding: 0px 30px;
    margin-bottom: 150px;
}

.box:hover {
    background-color: rgb(66, 66, 66);
}

@media (max-width: 400px) {
    .box {
        font-size: 4px;
    }

    h3 {
        font-size: 9px;
        margin: 0px 2px;
    }

    img {
        max-width: 100px;
        aspect-ratio: 1/1;
    }

    .project-detail {
        font-size: 10px;
    }

    .project-title {
        font-size: 12px;
    }
}

.faq-box {
    background-color: #18181b;
    border-radius: var(--border-radius);
    color: white;
}

.project-card {
    display: flex;
    width: 100%;
    max-width: 500px;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

img {
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1/1;
}

.detail {
    text-align: center;
    flex: 1;
    padding: 6px;
}

.project-box {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 50px 0px;
}

.img-div {
    flex: 1;
}

.project-view-box {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: min(100%, 1120px);
    margin: 0 auto;
}

.project-nav-list {
    flex: 0 0 220px;
    align-self: stretch;
    height: auto;
    min-height: 0;
    background-color: #18181b;
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius);
    padding: 8px;
    box-sizing: border-box;

    a {
        font-size: 18px;
        text-decoration: none;
        border-radius: 6px;
        margin: 0;
        padding: 12px 14px;
        color: #f4f4f5;
        cursor: pointer;
        transition: background-color 150ms ease, color 150ms ease;
    }

    a:hover {
        background-color: #3f3f46;
    }

    a.active {
        background-color: #facc15;
        color: #18181b;
    }
}

.project-viewer {
    flex: 1 1 700px;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    padding: 24px;

    video {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: contain;
        border-radius: var(--border-radius);
    }

    h2 {
        margin-top: 0;
        margin-bottom: 18px;
    }
}

.description-div {
    display: flex;
    flex-direction: column;
    padding: 18px 4px 0;
    border-radius: var(--border-radius);
    gap: 12px;

    .Description {
        flex: 1;
        padding: 0 4px;
        border-radius: var(--border-radius);

        h4 {
            margin: 0 0 8px;
        }

        p {
            margin: 0;
            line-height: 1.55;
        }
    }

    .feature-stack-div {
        display: flex;
        flex-direction: row;
        gap: 24px;

        .features {
            flex: 1;
            padding: 0 4px;
            border-radius: var(--border-radius);
        }

        .tech-stack {
            flex: 1;
            padding: 0 4px;
            border-radius: var(--border-radius);
        }

        h4 {
            margin: 0 0 8px;
        }
    }
}

.features,
.tech-stack {
    overflow-y: auto;
    box-sizing: border-box;
}

.features ul,
.tech-stack ul {
    padding-left: 20px; /* reduce default browser padding */
    margin: 0;
}

nav {
    display: flex;
    padding: 8px;
    a {
        margin: 4px 8px;
    }
}

.connect-section {
    width: min(100%, 900px);
    margin: 70px auto 35px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 16px;
    border: 2px solid #18181b;
    border-radius: 999px;
    color: #18181b;
    font-weight: 700;
    text-decoration: none;
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
    animation: social-pop 500ms ease both;
}

.social-link:nth-child(2) { animation-delay: 70ms; }
.social-link:nth-child(3) { animation-delay: 140ms; }
.social-link:nth-child(4) { animation-delay: 210ms; }
.social-link:nth-child(5) { animation-delay: 280ms; }

.social-link svg {
    display: block;
    flex: 0 0 21px;
    width: 21px;
    height: 21px;
    fill: currentColor;
    overflow: visible;
    transition: transform 180ms ease;
}

.social-link:hover,
.social-link:focus-visible {
    background-color: #18181b;
    color: #facc15;
    transform: translateY(-5px) rotate(-2deg);
}

.social-link:hover svg,
.social-link:focus-visible svg {
    transform: rotate(8deg) scale(1.12);
}

.social-link:focus-visible {
    outline: 3px solid #facc15;
    outline-offset: 3px;
}

@keyframes social-pop {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .social-link,
    .social-link svg {
        animation: none;
        transition: none;
    }
}

hr {
    width: 100%;
    margin: 0;
}

@media (max-width: 700px) {
    body {
        padding: 0 14px;
    }

    .project-view-box {
        flex-direction: column;
    }

    .project-nav-list {
        flex: none;
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
    }

    .project-nav-list a {
        flex: 0 0 auto;
        font-size: 15px;
        white-space: nowrap;
    }

    .project-viewer {
        padding: 16px;
    }

    .feature-stack-div {
        flex-direction: column !important;
        gap: 16px !important;
    }
}

.project {
    padding: 9px;
}
