:root {
    --color-red: #E6392D;
    --color-blue-dark: #1F307C;
    --color-blue-light: #72C7D6;
    --color-yellow: #F7E98A;
    --color-pink: #F5A9B4;
    --color-white: #FFFFFF;

    --line-width: 2px;
}

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

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background-color: var(--color-white);
    color: var(--color-blue-dark);
    line-height: 1.6;
}

/* Modrian Grid Background */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: var(--line-width);
    background-color: var(--color-red);
    opacity: 0.06;
    /* Subdued for readability on the site */
}

.grid-bg div {
    background-color: var(--color-white);
}

.grid-bg .c-blue {
    background-color: var(--color-blue-light);
}

.grid-bg .c-yellow {
    background-color: var(--color-yellow);
}

.grid-bg .c-pink {
    background-color: var(--color-pink);
}

/* Typography */
h1,
h2,
h3 {
    font-weight: bold;
    letter-spacing: 0.05em;
}

.title-swimmy {
    font-size: clamp(4rem, 15vw, 12rem);
    color: var(--color-blue-dark);
    text-transform: uppercase;
    line-height: 1;
    position: relative;
    display: inline-block;
    margin-bottom: 0.2em;
}

/* Red shadow effect from the flyer */
.title-swimmy::after {
    content: 'Swimmy';
    position: absolute;
    top: 0.08em;
    left: 0.08em;
    color: var(--color-red);
    z-index: -1;
}

/* Layout */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 80px;
    padding: 0;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.header-img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(31, 48, 124, 0.15);
    /* For better scaling of raster images */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality;
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    margin-bottom: 10px;
}

.date-info {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 20px;
    color: var(--color-red);
}

/* Sections */
section {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px rgba(31, 48, 124, 0.08);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

section::before {
    display: none;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 24px;
    color: var(--color-blue-dark);
    display: inline-block;
    padding-bottom: 8px;
    position: relative;
    border: none;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 4px;
    background-color: var(--color-red);
    border-radius: 2px;
}

/* Concept Text */
.concept-text {
    text-align: justify;
    font-size: 1.1rem;
}

/* Exhibition View Gallery */
.gallery-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 15px;
    margin-top: 20px;
    /* smooth scrolling on iOS */
    -webkit-overflow-scrolling: touch;
    /* hide scrollbar for modern browsers but allow scroll */
    scrollbar-width: thin;
    scrollbar-color: var(--color-blue-light) transparent;
}

.gallery-container::-webkit-scrollbar {
    height: 8px;
}

.gallery-container::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-container::-webkit-scrollbar-thumb {
    background-color: var(--color-blue-light);
    border-radius: 4px;
}

.gallery-container img {
    height: 300px;
    width: auto;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-container img:hover {
    transform: scale(1.02) translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-caption {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
    text-align: right;
}

/* Artist List */
.artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.artist-card {
    display: block;
    text-decoration: none;
    color: var(--color-blue-dark);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(31, 48, 124, 0.05);
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: bold;
}

.artist-card:hover {
    background: var(--color-white);
    color: var(--color-blue-dark);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(31, 48, 124, 0.12);
    border-color: var(--color-blue-light);
}

/* Artist Detail Page */
.artist-header {
    margin-bottom: 40px;
}

.artist-name {
    font-size: 3rem;
    margin-bottom: 10px;
}

.artist-profile {
    font-size: 1.1rem;
    line-height: 1.8;
    white-space: pre-wrap;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.work-card {
    border: var(--line-width) solid var(--color-blue-dark);
    background-color: var(--color-white);
    overflow: hidden;
    transition: transform 0.2s ease;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 6px 6px 0 var(--color-yellow);
}

.work-img-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-bottom: var(--line-width) solid var(--color-blue-dark);
}

.work-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-info {
    padding: 15px;
}

.work-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.work-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-red);
    margin-bottom: 15px;
}

.btn-buy {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    background-color: var(--color-blue-dark);
    color: var(--color-white);
    padding: 10px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-buy:hover {
    background-color: var(--color-red);
}

.back-link {
    display: inline-block;
    margin-top: 40px;
    text-decoration: none;
    color: var(--color-blue-dark);
    font-weight: bold;
    border-bottom: 2px solid var(--color-blue-dark);
    padding-bottom: 2px;
}

.back-link:hover {
    color: var(--color-red);
    border-color: var(--color-red);
}

/* Social links and work details */
.social-links a {
    display: inline-block;
    margin-right: 15px;
    color: var(--color-blue-dark);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid var(--color-blue-light);
}

.social-links a:hover {
    color: var(--color-red);
    border-color: var(--color-red);
}

.work-details {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.sold-out {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #cccccc;
    color: #ffffff;
    padding: 10px;
    font-weight: bold;
}

/* Sold Out Badge over image */
.sold-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 15px 25px;
    border-radius: 8px;
    letter-spacing: 2px;
    text-align: center;
    z-index: 10;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    header {
        padding: 30px 15px;
    }

    section {
        padding: 25px 15px;
    }

    .artist-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
}