﻿/* Base Variables */
:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #666666;
    --accent-color: #2563eb;
    /* Blue */
    --accent-hover: #1d4ed8;
    --border-color: #e5e5e5;
    --card-bg: #ffffff;
    --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --code-font: 'JetBrains Mono', monospace;
    --body-font: 'Inter', sans-serif;
    --modal-overlay: rgba(0, 0, 0, 0.5);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-color: #60a5fa;
    --accent-hover: #93c5fd;
    --border-color: #334155;
    --card-bg: #1e293b;
    --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --modal-overlay: rgba(0, 0, 0, 0.8);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--body-font);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-family: var(--code-font);
    font-size: 1.2rem;
    font-weight: 700;
}

.site-title a {
    color: var(--text-color);
    text-decoration: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-nav ul {
    display: flex;
    gap: 20px;
}

.site-nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.site-nav a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

#theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
}

#theme-toggle:hover {
    background-color: var(--border-color);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 120px 0;
    text-align: center;
    color: #ffffff;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.6)),
        url('assets/asset_images/yokobo_ai_lab_top.png') center/cover no-repeat;
}

.hero-subtitle {
    font-family: var(--code-font);
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 2.7rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.hero-description {
    color: #e5e7eb;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero .btn-primary {
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

/* Common Section Styles */
.section {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
}

.section-title {
    font-family: var(--code-font);
    font-size: 1.5rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
}

.section-title::before {
    content: "#";
    color: var(--accent-color);
    margin-right: 10px;
}

.section-lede {
    color: var(--text-muted);
    margin-top: -10px;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* About Section */
.about-content {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.about-tags {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.about-tags ul {
    margin-top: 10px;
    padding-left: 20px;
}

.about-tags li {
    margin-bottom: 5px;
}

/* Experiments Grid */
.experiments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.experiment-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.experiment-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--accent-color);
}

.card-header {
    margin-bottom: 10px;
}

.card-date {
    font-family: var(--code-font);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 5px 0;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    font-family: var(--code-font);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: var(--border-color);
    color: var(--text-color);
}

.card-summary {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-footer {
    text-align: right;
}

.card-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-color);
}

/* Lab Log */
.lab-log-list {
    border-left: 2px solid var(--border-color);
    padding-left: 20px;
}

.log-item {
    margin-bottom: 20px;
    position: relative;
}

.log-item::before {
    content: "";
    position: absolute;
    left: -27px;
    top: 8px;
    width: 12px;
    height: 12px;
    background-color: var(--bg-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
}

.log-date {
    font-family: var(--code-font);
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 4px;
    display: block;
}

.log-content {
    font-size: 0.95rem;
}

/* Links Section */
.links-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* CDLE Section */
.cdle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.cdle-card {
    display: flex;
    flex-direction: column;
}

.cdle-thumb-link {
    display: block;
}

.cdle-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background-color: var(--border-color);
}

.cdle-desc-placeholder {
    color: var(--text-muted);
}

.link-item {
    display: block;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--card-bg);
    transition: all 0.2s;
}

.link-item:hover {
    border-color: var(--accent-color);
    text-decoration: none;
    background-color: rgba(37, 99, 235, 0.05);
}

.link-label {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
}

.link-desc {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Maintenance Guide */
.maintenance-guide {
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.maintenance-guide summary {
    cursor: pointer;
    font-family: var(--code-font);
}

.maintenance-guide p {
    margin-top: 10px;
    padding: 10px;
    background-color: var(--card-bg);
    border-radius: 6px;
}

/* Footer */
.site-footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-overlay);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: var(--card-bg);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.modal-date {
    font-family: var(--code-font);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modal-title {
    font-size: 1.8rem;
    margin: 10px 0;
}

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

.modal-section h4 {
    font-family: var(--code-font);
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-section p {
    white-space: pre-wrap;
    /* Preserve line breaks in text */
}

.modal-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.modal-link-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: var(--border-color);
    color: var(--text-color);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.modal-link-btn:hover {
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
}

/* Modal Content Styling */
.modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.modal-section h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Markdown Styles within Modal */
.modal-body ul,
.modal-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.modal-body code {
    background-color: var(--bg-card);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
}

.modal-body pre {
    background-color: var(--bg-card);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.modal-body pre code {
    background-color: transparent;
    padding: 0;
    border: none;
    color: var(--text-main);
}

.modal-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-left: 0;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-style: italic;
}

.modal-body img,
.modal-markdown img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

/* Card Image */
.card-image-container {
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.experiment-card:hover .card-image {
    transform: scale(1.05);
}

/* Desktop layout tweaks */
@media (min-width: 1024px) {
    /* 險倅ｺ九Δ繝ｼ繝繝ｫ繧貞ｺ・￡繧・*/
    .modal-content {
        max-width: 1000px;  /* 螂ｽ縺ｿ縺ｧ 900縲・100px 縺上ｉ縺・↓隱ｿ謨ｴ */
    }

    /* 蠢・ｦ√↑繧峨・繝ｼ繧ｸ蜈ｨ菴薙・繧ｳ繝ｳ繝・リ繧ょｰ代＠蠎・￡繧・*/
    .container {
        max-width: 1100px;  /* 繝・ヵ繧ｩ繝ｫ繝医・ 1000px */
    }
}

/* Responsive */
@media (max-width: 768px) {
        .hero {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.6)),
            url('assets/asset_images/yokobo_ai_lab_top_mobile.png') center/cover no-repeat;
    }
.site-nav {
        display: none;
        /* For simplicity in this version, or could be hamburger */
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }

}

.modal-content {
    position: relative;
    background-color: var(--card-bg);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.modal-date {
    font-family: var(--code-font);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modal-title {
    font-size: 1.8rem;
    margin: 10px 0;
}

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

.modal-section h4 {
    font-family: var(--code-font);
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-section p {
    white-space: pre-wrap;
    /* Preserve line breaks in text */
}

.modal-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.modal-link-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: var(--border-color);
    color: var(--text-color);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.modal-link-btn:hover {
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
}

/* Modal Content Styling */
.modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.modal-section h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Markdown Styles within Modal */
.modal-body ul,
.modal-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.modal-body code {
    background-color: var(--bg-card);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
}

.modal-body pre {
    background-color: var(--bg-card);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.modal-body pre code {
    background-color: transparent;
    padding: 0;
    border: none;
    color: var(--text-main);
}

.modal-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-left: 0;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Card Image */
.card-image-container {
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.experiment-card:hover .card-image {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
        .hero {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.6)),
            url('assets/asset_images/yokobo_ai_lab_top_mobile.png') center/cover no-repeat;
    }
.site-nav {
        display: none;
        /* For simplicity in this version, or could be hamburger */
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-content {
        padding: 25px;
        width: 95%;
        margin: 1rem auto;
        max-height: 90vh;
    }
}

/* Logo Styles */
.site-title a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo {
    height: 40px;
    width: auto;
    border-radius: 4px;
}

@media (max-width: 480px) {
    .site-title-text {
        display: none;
    }
}


/* PC縺ｧ縺ｮ陦ｨ遉ｺ蟷・ｒ蠎・￡繧・*/
@media (min-width: 1024px) {
    .modal-content { max-width: 1000px; }
}


