:root {
    /* Color Palette - Trust & Technology */
    --bg-body: #ffffff;
    --bg-light: #f8fafc;
    /* Very light slate for section backgrounds */
    --bg-white: #ffffff;

    --primary-color: #2563eb;
    /* Strong Royal Blue */
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    /* Slate Grey for secondary text */
    --text-main: #0f172a;
    /* Dark Slate for headings */
    --text-body: #334155;

    --accent-light: #dbellf;
    --border-subtle: #e2e8f0;

    --hero-bg: #3C516D;
    --category-bg: #5a6f8a;

    /* Spacing */
    --container-width: 1024px;
    --section-spacing: 6rem;
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-light: #1e293b;
    --bg-white: #1e293b;

    --primary-color: #60a5fa;
    --primary-dark: #3b82f6;
    --secondary-color: #94a3b8;
    --text-main: #f1f5f9;
    --text-body: #cbd5e1;

    --border-subtle: #334155;

    --hero-bg: #1e293b;
    --category-bg: #334155;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-body);
    line-height: 1.75;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.2s;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1,
h2,
h3 {
    color: var(--text-main);
    line-height: 1.3;
}

.section-label {
    display: block;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Header / Hero */
.hero {
    padding: 6rem 0 4rem;
    text-align: center;
    background: var(--hero-bg);
    color: white;
    position: relative;
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.theme-icon {
    font-size: 1.25rem;
    display: block;
    line-height: 1;
}

/* Category Navigation */
.category-nav {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .category-nav {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.category-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-white);
    border: 2px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-main);
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}

.category-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .category-btn:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

.category-icon {
    font-size: 1.25rem;
}

/* Category Section Headers */
.category-section {
    background: var(--category-bg);
    padding: 1.5rem 0;
    margin-top: 0;
}

.category-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
    letter-spacing: -0.02em;
}

.product-visual img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    /* border-radius: 12px; Removed as requested */
    /* transition: transform 0.3s ease; Removed to avoid conflict with zoom class */
    border: 2px solid #cbd5e1;
    /* Thicker, clearly visible border (Slate-300) */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* Stronger 'lifted' shadow */
}

.hero-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    background-color: white;
    /* Ensure logo stands out */
    padding: 2px;
    /* Small border effect */
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: white;
    /* Override default heading color */
}

.hero p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    /* Slight opacity for secondary text */
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Feature Sections (Product Highlight) */
.product-showcase {
    background-color: var(--bg-white);
    padding: var(--section-spacing) 0;
    border-bottom: 1px solid var(--border-subtle);
}

.product-showcase:last-of-type {
    border-bottom: none;
}

.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.product-visual {
    background: var(--bg-light);
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    position: relative;
}

[data-theme="dark"] .product-visual img {
    border-color: var(--border-subtle);
}

.no-image-placeholder {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    letter-spacing: 0.1em;
    opacity: 0.5;
    user-select: none;
}

.product-info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-desc {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.background-story {
    background-color: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.background-story h4 {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.background-story p {
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.6;
    margin: 0;
}

.story-divider {
    border: 0;
    border-top: 1px solid var(--border-subtle);
    margin: 1rem 0;
    opacity: 0.5;
}


.feature-list {
    list-style: none;
    margin-bottom: 2rem;
}

.feature-list li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
}

.feature-list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
}

.btn-outline {
    border: 1px solid var(--border-subtle);
    color: var(--text-body);
    background: var(--bg-white);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-vector {
    background-color: #00A63F;
    /* Vector Green */
    color: white;
}

.btn-vector:hover {
    background-color: #008f35;
    color: white;
}

.btn-msstore {
    background-color: #0078d4;
    /* Microsoft Blue */
    color: white;
}

.btn-msstore:hover {
    background-color: #005a9e;
    color: white;
}

.btn-github {
    background-color: #24292e;
    /* GitHub Dark Grey */
    color: white;
}

.btn-github:hover {
    background-color: #444d56;
    color: white;
}

.download-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* About / Developer Section */
.developer-section {
    background-color: var(--bg-light);
    padding: var(--section-spacing) 0;
}

.dev-profile {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    max-width: 800px;
    margin: 0 auto;
}

.dev-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.dev-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.dev-role {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
}

.tech-stack {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tech-badge {
    background: var(--bg-light);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Badge container for shields.io badges */
.badge-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.badge-container img {
    height: 20px;
    border-radius: 3px;
}

/* Contact */
.contact-cta {
    text-align: center;
    padding: 6rem 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.875rem;
    border-top: 1px solid var(--border-subtle);
    color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .product-visual {
        order: -1;
    }

    .dev-profile {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .category-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .category-btn {
        justify-content: center;
    }

    .category-title {
        font-size: 1.5rem;
    }
}

/* Zoomable Image Styles */
.zoomable-image {
    cursor: zoom-in;
    transition: 0.3s;
}

.zoomable-image:hover {
    opacity: 0.9;
}

/* Modal Styles */
.image-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1000;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: hidden;
    /* Disable scroll in modal itself */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.9);
    /* Black w/ opacity */
    backdrop-filter: blur(8px);
    display: none;
    /* Initially none, logic will handle this */
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.modal-content {
    margin: 0;
    max-width: 95%;
    max-height: 80vh;
    object-fit: contain;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    animation-name: zoom;
    animation-duration: 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
    /* Prevent image from shrinking too much */
}

#caption {
    margin: 20px 0 0 0;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 0;
    min-height: 20px;
    font-size: 1.1rem;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Zoom Animation */
@keyframes zoom {
    from {
        transform: scale(0.8);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

/* Responsive Modal */
@media only screen and (max-width: 700px) {
    .modal-content {
        width: 95%;
    }
}