* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Inter, Arial, sans-serif;
}

body {
    background: #fafafa;
    color: #222;
}

a {
    color: inherit;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 10%;
    border-bottom: 1px solid #e5e5e5;
    background: white;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    color: #222;
}

nav a {
    margin-left: 28px;
    color: #555;
    text-decoration: none;
}

nav a:hover {
    color: black;
}

nav a.active {
    color: black;
    font-weight: 600;
}

.hero {
    max-width: 900px;
    margin: 100px auto;
    text-align: center;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3.3rem;
    margin-bottom: 20px;
}

.hero p {
    color: #666;
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 40px;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

button, .btn {
    padding: 14px 28px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.primary {
    background: #111;
    color: white;
}

.secondary {
    background: white;
    border: 1px solid #ddd;
    color: #222;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 80px auto;
    flex-wrap: wrap;
}

.card {
    background: white;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 25px;
    width: 230px;
    text-align: center;
}

.card h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.features {
    max-width: 1100px;
    margin: 100px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
    gap: 20px;
    padding: 0 20px;
}

.feature {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 28px;
}

.feature h3 {
    margin-bottom: 12px;
}

footer {
    margin-top: 120px;
    border-top: 1px solid #e5e5e5;
    padding: 30px;
    text-align: center;
    color: #888;
}

/* ---------------------------------------------- */
/* Shared page header (non-homepage pages)          */
/* ---------------------------------------------- */

.page-header {
    max-width: 1100px;
    margin: 60px auto 0;
    padding: 0 20px;
}

.page-header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

/* ---------------------------------------------- */
/* Toolbar: search / filter / sort                 */
/* ---------------------------------------------- */

.toolbar {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.toolbar input[type="text"],
.toolbar select {
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 0.95rem;
    background: white;
    color: #222;
}

.toolbar input[type="text"] {
    flex: 1;
    min-width: 220px;
}

.tag-filters {
    max-width: 1100px;
    margin: 0 auto 20px;
    padding: 0 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag-chip {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: white;
    color: #555;
    font-size: 0.85rem;
    cursor: pointer;
}

.tag-chip:hover {
    border-color: #999;
}

.tag-chip.active {
    background: #111;
    color: white;
    border-color: #111;
}

/* ---------------------------------------------- */
/* Item grid + item card (models & datasets)        */
/* ---------------------------------------------- */

.item-grid {
    max-width: 1100px;
    margin: 0 auto 100px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    gap: 20px;
}

.item-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.item-card h3 {
    margin-bottom: 6px;
    font-size: 1.15rem;
}

.item-card .item-author {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.item-card .item-description {
    color: #555;
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 16px;
    flex-grow: 1;
}

.item-meta {
    display: flex;
    gap: 16px;
    color: #888;
    font-size: 0.82rem;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.item-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.item-tag {
    background: #f2f2f2;
    color: #555;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
}

.item-card .item-buttons {
    display: flex;
    gap: 10px;
}

.item-card .item-buttons .btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.9rem;
}

.empty-state {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 20px;
    text-align: center;
    color: #888;
}

/* ---------------------------------------------- */
/* Detail pages                                     */
/* ---------------------------------------------- */

.detail {
    max-width: 800px;
    margin: 60px auto 100px;
    padding: 0 20px;
}

.detail-header {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
}

.detail-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.detail-header .detail-author {
    color: #888;
    margin-bottom: 18px;
}

.detail-header .detail-description {
    color: #555;
    line-height: 1.7;
    margin-bottom: 22px;
}

.detail-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.detail-stats div {
    text-align: left;
}

.detail-stats h2 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.detail-stats p {
    color: #888;
    font-size: 0.85rem;
}

.detail-section {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 20px;
}

.detail-section h3 {
    margin-bottom: 10px;
}

.detail-section p {
    color: #888;
    line-height: 1.6;
    font-size: 0.92rem;
}

.breadcrumb {
    max-width: 800px;
    margin: 30px auto 0;
    padding: 0 20px;
    color: #888;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #555;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: black;
}

@media (max-width: 600px) {
    header {
        padding: 18px 6%;
        flex-direction: column;
        gap: 12px;
    }

    nav a {
        margin: 0 12px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }
}
