/* =========================================
   1. System & Variables
   ========================================= */
:root {
    /* Main Accent: Teal */
    --color-primary: #0d9488;
    --color-primary-hover: #115e59;
    --color-primary-fade: rgba(13, 148, 136, 0.08);

    /* Grayscale & Backgrounds */
    --color-bg: #f8fafc;        /* Main Background */
    --color-card-bg: #ffffff;   /* Card Background */
    --color-text-main: #0f172a; /* Darkest Slate */
    --color-text-body: #475569; /* Medium Slate */
    --color-text-muted: #94a3b8; /* Light Slate */

    /* Borders & Dividers */
    --color-border: #e2e8f0;

    /* Spacing & Layout */
    --container-max: 1100px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-card-idle:
        0 0 0 1px rgba(0,0,0,0.03),
        0 2px 8px rgba(0,0,0,0.04);

    --shadow-card-hover:
        0 0 0 1px rgba(13, 148, 136, 0.4),
        0 12px 24px -6px rgba(13, 148, 136, 0.15),
        0 4px 8px -2px rgba(0, 0, 0, 0.02);
}

/* Base Setup */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

/* Utilities */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =========================================
   2. Header & Breadcrumb
   ========================================= */
.header {
    padding: 3rem 0 4rem;
    text-align: center;
}

.header__title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 800;
    color: var(--color-text-main);
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.header__subtitle {
    font-size: 1rem;
    color: var(--color-text-body);
    opacity: 0.8;
}

.breadcrumb {
    padding-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.breadcrumb__list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb__item {
    display: flex;
    align-items: center;
}

.breadcrumb__link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s ease;
}

.breadcrumb__link:hover {
    color: var(--color-primary);
}

.breadcrumb__link .icon--home {
    width: 16px;
    height: 16px;
    /* Optical adjustment to align with text */
    margin-bottom: 2px;
}

.breadcrumb__separator {
    display: flex;
    align-items: center;
    color: var(--color-border);
}

.breadcrumb__separator .icon {
    width: 14px;
    height: 14px;
}

.breadcrumb__current {
    font-weight: 500;
    color: var(--color-text-body);
}

/* =========================================
   3. Main Grid Layout
   ========================================= */
.main {
    flex: 1;
    padding-bottom: 6rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* =========================================
   4. Card Component
   ========================================= */
.card {
    background: var(--color-card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card-idle);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.card__body {
    margin-bottom: 2rem;
}

.card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-main);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

/* Tags */
.card__tags {
    display: flex;
    gap: 0.5rem;
}

.tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 99px;
    background-color: var(--color-bg);
    color: var(--color-text-body);
    border: 1px solid var(--color-border);
    white-space: nowrap;
}

.card__desc {
    font-size: 0.9375rem;
    color: var(--color-text-body);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 0.5rem;
}

/* Card Footer & Actions */
.card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn .icon {
    width: 16px;
    height: 16px;
}

.btn--primary {
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 4px rgba(13, 148, 136, 0.2);
}
.btn--primary:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 0 4px 6px rgba(13, 148, 136, 0.3);
}

.btn--outline {
    background-color: transparent;
    color: var(--color-text-main);
    box-shadow: inset 0 0 0 1px var(--color-border);
}
.btn--outline:hover {
    box-shadow: inset 0 0 0 1px var(--color-text-muted);
    background-color: var(--color-bg);
}

/* Icon Link */
.link-icon {
    color: var(--color-text-muted);
    transition: color 0.2s;
    padding: 0.5rem;
    display: flex;
    align-items: center;
}
.link-icon:hover {
    color: var(--color-primary);
}
.link-icon .icon {
    width: 20px;
    height: 20px;
}

/* =========================================
   5. Footer
   ========================================= */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer__nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer__nav a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.divider {
    opacity: 0.3;
}

/* =========================================
   6. Mobile Tweaks
   ========================================= */
@media (max-width: 600px) {
    .grid {
        gap: 1.5rem;
    }
    .header {
        padding: 3rem 0;
        text-align: left;
    }
    .card {
        padding: 1.5rem;
    }
    .card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
