

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

.tech-tag {
    height: auto !important;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.tech-tag:hover {
    margin-top: 0 !important;
    transform: translateY(-2px);
}

@media (max-width: 900px) {
    body {
        padding: 1.5rem 1.2rem;
        max-width: 100%;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .project-card {
        flex: 1 1 calc(50% - 0.5rem);
    }
}

@media (max-width: 640px) {
    body {
        padding: 1rem 0.8rem;
        font-size: 0.95rem;
    }

    .main-header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.6rem;
        margin-bottom: 1rem;
    }

    .crazy-switch {
        font-size: 0.82rem;
        gap: 0.4rem;
    }

    .switch {
        width: 38px;
        height: 20px;
    }

    .slider:before {
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
    }

    input:checked + .slider:before {
        transform: translateX(18px);
    }

    h1 {
        font-size: 1.4rem;
        word-break: break-word;
        line-height: 1.3;
        margin: 0;
    }

    h2 {
        font-size: 1.25rem;
        margin-top: 1.5rem;
    }

    .terminal {
        padding: 0.8rem;
        font-size: 0.88rem;
        overflow-x: auto;
    }

    .projects-container {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
    }

    .category-nav {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .nav-tabs-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        width: 100%;
    }

    .filter-dropdown-menu {
        left: 0;
        right: auto;
        min-width: 200px;
    }

    .project-card {
        flex: 1 1 100%;
        width: 100%;
        padding: 0.9rem;
    }

    .project-card h3 {
        font-size: 1.1rem;
    }

    .project-card p {
        font-size: 0.85rem;
    }

    
    .project-detail {
        padding: 0;
        width: 100%;
    }

    .project-header h1 {
        font-size: 1.7rem;
        line-height: 1.3;
    }

    .project-meta {
        flex-direction: column;
        gap: 0.4rem;
        align-items: center;
    }

    .project-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .tech-tags {
        gap: 0.4rem;
    }

    .tech-tag {
        font-size: 0.82rem;
        padding: 0.35rem 0.75rem;
    }

    .project-links {
        flex-direction: column;
        width: 100%;
    }

    .project-link {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
    }
}
