:root {
    --c-bg: #F7F5F2;

    --c-surface: #FCFBF9;

    --c-text: #4C463D;

    --c-text-muted: #8A8176;

    --c-accent: #005F73;

    --c-accent-darker: #004B5A;

    --c-accent-light: rgba(0, 95, 115, 0.1);

    --c-border: #E5E0DA;

    --c-row-hover: #F1EDE9;

    --c-panel-bg: rgba(250, 249, 247, 0.85);

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);

    --gradient-start: #F7F5F2;

    --gradient-end: #EFEAE4;

}

[data-theme="dark"] {
    --c-bg: #211F1D;

    --c-surface: #2A2724;
    --c-text: #EFEAE4;

    --c-text-muted: #9A9187;
    --c-accent: #E59572;

    --c-accent-darker: #D48C6E;
    --c-accent-light: rgba(229, 149, 114, 0.15);
    --c-border: #3c3833;
    --c-row-hover: #34302c;
    --c-panel-bg: rgba(42, 39, 36, 0.85);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.3);

    --gradient-start: #2A2724;

    --gradient-end: #211F1D;

}


@keyframes gradient-animation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


body {
    font-family: 'Noto Sans JP', sans-serif;
    margin: 0;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-size: 200% 200%;
    animation: gradient-animation 15s ease infinite;
    color: var(--c-text);
    line-height: 1.7;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1400px;
    margin: auto;
    padding: 30px;
}


.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.header-title {
    display: flex;
    align-items: baseline;
    gap: 1em;
    flex-wrap: wrap;
}

.header-title h1 {
    margin: 0;
    font-size: 1.3rem;
    font-family: 'Hepta Slab', 'Source Serif Pro', 'Noto Serif JP', serif;
    font-weight: 400;
    letter-spacing: 0.03em;
}

.header-title h1 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.header-title h1 a:hover {
    color: var(--c-accent);
}

.tagline {
    margin: 0;
    padding-left: 1em;
    border-left: 1px solid var(--c-border);
    font-size: 0.85rem;
    color: var(--c-text-muted);
    font-weight: 400;
    white-space: nowrap;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--c-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    text-decoration: none;
}


.social-links a:hover {
    color: var(--c-accent);
}

.social-links svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.theme-switch {
    background: none;
    border: 1px solid var(--c-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-muted);
    transition: all 0.3s ease;
}

.theme-switch:hover {
    color: var(--c-accent);
    border-color: var(--c-accent);
    transform: rotate(15deg);
}

.theme-switch svg {
    width: 20px;
    height: 20px;
}

.theme-switch .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-switch .icon-sun {
    display: block;
}

[data-theme="dark"] .theme-switch .icon-moon {
    display: none;
}


.main-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 30px;
}

.content-area {
    grid-column: 1 / 2;
}

.sidebar {
    grid-column: 2 / 3;
}

.search-container {
    position: relative;
    margin-bottom: 20px;
}

#search-box {
    width: 100%;
    padding: 14px 45px 14px 20px;
    background-color: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 30px;
    color: var(--c-text);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#search-box:focus {
    outline: none;
    border-color: var(--c-accent);
    box-shadow: 0 0 0 4px var(--c-accent-light);
}

#clear-search {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--c-text-muted);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 5px;
    display: none;
    transition: color 0.2s;
}

#clear-search:hover {
    color: var(--c-text);
}

.sidebar .filter-group {
    background-color: var(--c-surface);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.sidebar .filter-group h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: var(--c-text);
    border-bottom: 1px solid var(--c-border);
    padding-bottom: 10px;
}

.sidebar .filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
}

.sidebar .filter-list::-webkit-scrollbar {
    width: 5px;
}

.sidebar .filter-list::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar .filter-list::-webkit-scrollbar-thumb {
    background-color: #adb5bd;
    border-radius: 4px;
}

.sidebar .filter-list li a {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    text-decoration: none;
    color: var(--c-text-muted);
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
    font-size: 0.9rem;
}

.sidebar .filter-list li a:hover {
    background-color: var(--c-row-hover);
    color: var(--c-text);
}

.sidebar .filter-list li a.active {
    background-color: var(--c-accent-light);
    color: var(--c-accent);
    font-weight: 700;
}

.sidebar .filter-list li a .count {
    font-size: 0.8rem;
    color: var(--c-text-muted);
}

.sidebar .filter-list li a.active .count {
    color: var(--c-accent);
}


.data-table {
    background-color: var(--c-surface);
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table-header {
    display: flex;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    background-color: transparent;
    border-bottom: 1px solid var(--c-border);
    color: var(--c-text-muted);
}

.table-header .th {
    padding: 15px 20px;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.table-header .th:hover {
    color: var(--c-accent);
}

.table-header .th.active {
    color: var(--c-accent);
}

.table-header .th .sort-indicator {
    margin-left: 8px;
}

.col-date {
    flex: 0 0 160px;
}

.col-category {
    flex: 0 0 180px;
}

.col-title {
    flex: 1 1 0;
}

.col-tags {
    flex: 0 0 300px;
    display: block;
}

.table-body {
    max-height: calc(100vh - 400px);
    overflow-y: auto;
}

.table-body::-webkit-scrollbar {
    width: 8px;
}

.table-body::-webkit-scrollbar-track {
    background: transparent;
}

.table-body::-webkit-scrollbar-thumb {
    background-color: #adb5bd;
    border-radius: 4px;
}

.table-row {
    display: flex;
    border-bottom: 1px solid var(--c-border);
    transition: background-color 0.2s, transform 0.2s;
    opacity: 0;
}

.table-row.visible {
    animation: fadeInUp 0.5s ease-out forwards;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover {
    background-color: var(--c-row-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.table-row .td {
    padding: 15px 20px;
    white-space: normal;
    word-break: break-word;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
}

.table-row .td.col-tags {
    flex-wrap: wrap;
}

.table-row .td.col-date {
    font-family: 'Roboto Mono', monospace;
    color: var(--c-text-muted);
}

.update-icon {
    margin-left: 8px;
    color: var(--c-accent);
    font-style: normal;
    font-size: 1.1em;
}

.clickable-category {
    cursor: pointer;
    transition: color 0.2s;
}

.clickable-category:hover {
    color: var(--c-accent);
    text-decoration: underline;
}

.tag {
    display: inline-block;
    background-color: var(--c-accent-light);
    color: var(--c-accent);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 5px;
    margin-bottom: 5px;
}

.clickable-tag {
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.clickable-tag:hover {
    background-color: var(--c-accent);
    color: var(--c-surface);
}


.modal-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.modal-panel.visible {
    opacity: 1;
    visibility: visible;
}

.panel-content {
    background-color: var(--c-panel-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 30px 40px;
    width: min(90vw, 700px);
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-panel.visible .panel-content {
    transform: scale(1) translateY(0);
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--c-text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
}

.close-button:hover {
    color: var(--c-text);
    transform: rotate(90deg);
}


.panel-content h2 {
    color: var(--c-text);
    border-left: 4px solid var(--c-accent);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.panel-content .meta {
    font-size: 0.8rem;
    color: var(--c-text-muted);
    margin-bottom: 20px;
}

.panel-content .summary {
    line-height: 1.8;
}

.panel-content .tags {
    margin-top: 20px;
}

.panel-content .tags .tag {
    margin: 5px 5px 0 0;
}

.panel-content a.read-more {
    display: inline-block;
    background-color: var(--c-accent);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.2s;
    margin-top: 20px;
}

.panel-content a.read-more:hover {
    background-color: var(--c-accent-darker);
    transform: translateY(-2px);
}



.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.profile-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--c-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-icon svg {
    width: 40px;
    height: 40px;
    fill: var(--c-accent);
}

.profile-title h2 {
    margin: 0 0 5px 0;
    border-left: none;
    padding-left: 0;
    font-size: 1.8rem;
}

.profile-title p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--c-text-muted);
}

.profile-section {
    margin-bottom: 25px;
}

.profile-section h3 {
    font-size: 1rem;
    color: var(--c-text);
    border-bottom: 1px solid var(--c-border);
    padding-bottom: 8px;
    margin-bottom: 0px;
}

.profile-section p {
    font-size: 0.95rem;
    margin: 0;
}

.skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skills-list li {
    background-color: var(--c-row-hover);
    color: var(--c-text);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid var(--c-border);
}







.links-header {
    text-align: center;
    margin-bottom: 25px;
}

.links-header h2 {
    margin: 0 0 5px 0;
    border-left: none;
    padding-left: 0;
    font-size: 1.8rem;
}

.links-header p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--c-text-muted);
}

.links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.links-list li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    text-decoration: none;
    background-color: var(--c-surface);
    border-radius: 8px;
    border: 1px solid var(--c-border);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.links-list li a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-accent);
}

.links-list .link-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.links-list .link-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--c-text-muted);
    transition: fill 0.2s;
}

.links-list li a:hover .link-icon svg {
    fill: var(--c-accent);
}

.links-list .link-text {
    display: flex;
    flex-direction: column;
}

.links-list .link-text strong {
    color: var(--c-text);
    font-size: 1rem;
    transition: color 0.2s;
}

.links-list li a:hover .link-text strong {
    color: var(--c-accent);
}

.links-list .link-text span {
    color: var(--c-text-muted);
    font-size: 0.85rem;
}



.footer {
    text-align: center;
    padding: 10px 0 10px 0;
    margin-top: 40px;
    font-size: 0.75rem;
    color: var(--c-text-muted);
}


@media (max-width: 1350px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }
}

@media (max-width: 1024px) {
    .col-tags {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .tagline {
        padding-left: 0;
        border-left: none;
    }

    .sidebar {
        flex-direction: column;
    }

    .col-category {
        flex: 0 0 120px;
    }

    .col-date {
        flex: 0 0 130px;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 15px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .header-title h1 {
        font-size: 1.8rem;
    }

    .table-header {
        display: none;
    }

    .data-table {
        border: none;
        background-color: transparent;
        overflow: visible;
        box-shadow: none;
    }

    .table-body {
        max-height: none;
        overflow-y: visible;
    }

    .table-row {
        flex-direction: column;
        align-items: flex-start;
        background-color: var(--c-surface);
        border: 1px solid var(--c-border);
        border-radius: 12px;
        margin-bottom: 15px;
        padding: 20px;
        box-shadow: var(--shadow-sm);
    }

    .table-row:last-child {
        margin-bottom: 0;
    }

    .table-row .td {
        flex: 1 1 auto;
        width: 100%;
        padding: 0;
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
        cursor: default;
    }

    .td.col-title {
        order: 1;
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--c-text);
        padding-bottom: 8px;
    }

    .td.col-category {
        order: 2;
        font-size: 0.85rem;
        padding-top: 2px;
        padding-bottom: 2px;
    }

    .td.col-date {
        order: 3;
        font-size: 0.85rem;
        color: var(--c-text-muted);
        padding-top: 2px;
        padding-bottom: 15px;
    }

    .td.col-tags {
        order: 4;
        display: block !important;
        padding-top: 10px;
        border-top: 1px solid var(--c-border);
    }

    .tag {
        margin-top: 5px;
        margin-bottom: 5px;
    }
}