/* Basic Styles */
:root {
    --primary-color: #59B9C6;
    --text-color: #333;
    --bg-overlay: rgba(255, 255, 255, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-image: url('asset/paper.png');
    background-attachment: fixed;
    background-size: cover;
    overflow-x: hidden;
}

/* Background Texture Overlay to make it feel premium */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 20%, rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
    z-index: -1;
}

/* Layout */
.main-container {
    width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
    position: relative;
}

main {
    padding: 0;
}

/* Hero Section - Strict Vertical Flow to avoid overlapping */
.hero-section {
    padding: 80px 0;
    text-align: center;
    background: transparent;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    /* Space between Title01, Text, and top-illust */
}

.hero-logo,
.hero-cat-illust {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
}

.hero-description {
    font-size: 1.1rem;
    color: #444;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* TOC Styles */
.hero-toc {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    margin-top: 40px;
}

.hero-toc .toc-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    margin-bottom: 0;
    color: #333;
}

.hero-toc .index-mark {
    width: 24px;
    height: auto;
}

.hero-toc ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.hero-toc li {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-toc li img {
    width: 20px;
    height: auto;
}

.hero-toc a {
    text-decoration: none;
    color: #333;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.hero-toc a:hover {
    color: var(--primary-color);
}

/* Generic Image rule - remove max-width globally to ensure original size */
img {
    max-width: none;
}

/* Specific constraints for grid items to keep layout integrity */
.grid-item img {
    max-width: 100%;
}

/* Footprints Decorations - Outside the 1280px container */
.cat-tracks-bg {
    position: fixed;
    /* "マージンを取らずに配置" */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.track {
    position: absolute;
    width: auto;
    height: auto;
    /* Scale from 80% at 1024px to 100% at 1280px */
    transform: scale(clamp(0.8, 0.8 + 0.2 * (100vw - 1024px) / 256, 1));
}

/* Positions matching requested layout */
.track-right-1 {
    top: 50px;
    right: 50px;
}

.track-right-2 {
    top: 150px;
    right: 250px;
}

.track-left-1 {
    top: 450px;
    left: 50px;
}

/* Section Common Fixes */
.section {
    padding: 100px 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Main Heading (Text) */
.main-heading {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
    letter-spacing: 0.1em;
    font-weight: normal;
}

.main-heading .sub-ja {
    display: block;
    font-size: 1.2rem;
    color: #888;
    margin-top: 5px;
}

/* Image Heading (Assets) */
.image-heading {
    text-align: center;
    margin-bottom: 40px;
}

.image-heading img {
    max-width: 100%;
    height: auto;
}

.sub-section {
    margin-bottom: 80px;
}

.portfolio-category-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    margin-top: 40px;
    text-align: left;
}

.portfolio-notes {
    text-align: center;
    margin-bottom: 40px;
    margin-top: -20px;
    /* pull up closer to the grid if needed, or keep 0 */
}

.portfolio-notes p {
    font-size: 1rem;
    color: #444;
}

/* Grids */
.grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.grid-item {
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid-item:hover {
    transform: scale(1.05);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.15);
}

/* New Designer Profile Styles */
.designer-profile-new {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.portrait-new {
    width: 250px;
    height: auto;
}

.profile-text-new {
    text-align: left;
}

.designer-name-new {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.profile-text-new .ja-text {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #333;
    font-weight: bold;
}

.profile-text-new .en-text {
    font-size: 0.8rem;
    line-height: 1.6;
    color: #333;
    font-weight: bold;
}

/* Works Showcase Series */
.work-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.work-showcase img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.work-showcase img:hover {
    transform: scale(1.02);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
}


/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.modal-content img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    margin: auto;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: scale(1.05);
}



/* Media Queries Adjustment */
@media screen and (max-width: 1280px) {
    .main-container {
        width: 100%;
        padding: 0 20px;
    }
}

/* Non-PC / Mobile optimizations */
@media screen and (max-width: 1024px) {
    .cat-tracks-bg {
        display: none;
    }

    .designer-profile-new {
        flex-direction: column;
    }

    .grid,
    .work-showcase {
        flex-wrap: wrap;
    }
}

@media screen and (max-width: 768px) {
    .portfolio-title-box {
        flex-direction: column;
        padding: 15px 30px;
        width: 90%;
    }

    .back-to-top {
        transform: scale(0.5);
        transform-origin: bottom right;
    }

    .back-to-top:hover {
        transform: scale(0.55);
    }
}