/*
Theme Name: Ben Coleman Sounds
Theme URI: https://www.bencolemansounds.com/
Author: OpenAI / Ben Coleman
Description: Minimal artist portfolio theme for Ben Coleman Sounds. Works and Curatorial share a structured Project system; Blog uses native WordPress Posts.
Version: 0.1.3
Requires at least: 6.0
Text Domain: ben-coleman
*/

:root{--text:#111;--muted:#777;--line:#ddd;--pad:28px;--gap:24px;--max:1500px}
*{box-sizing:border-box}
html{font-size:16px}
body{margin:0;color:var(--text);background:#fff;font-family:Futura,"Futura PT","Century Gothic",Arial,sans-serif;font-weight:400;line-height:1.5}
a{color:inherit;text-decoration:none}
a:hover{opacity:.62}
.site-header{display:flex;justify-content:space-between;align-items:flex-start;padding:22px var(--pad) 34px;gap:24px}
.site-name{font-weight:700;font-size:20px;letter-spacing:.03em;white-space:nowrap}
.site-nav{display:flex;gap:22px;justify-content:flex-end;flex-wrap:wrap;font-size:17px;font-weight:700;text-transform:lowercase}
.site-main{padding:0 var(--pad) 64px}
.page-title{font-size:30px;line-height:1.1;font-weight:700;margin:8px 0 30px;text-transform:lowercase}
.project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:34px var(--gap);max-width:var(--max);margin:0 auto}
.card-image{display:block;aspect-ratio:4/3;overflow:hidden;background:#eee}
.card-image img{width:100%;height:100%;object-fit:cover;display:block}
.card-meta{display:flex;align-items:flex-start;gap:16px;padding-top:10px;font-size:17px;line-height:1.2;font-weight:700}
.card-title{flex:1;text-align:left}
.card-year{flex:0 0 auto;text-align:right;white-space:nowrap}
.project-header{max-width:1100px;margin:0 auto 36px}
.project-title{font-size:38px;line-height:1.06;margin:0;font-weight:700}
.project-year{margin-top:8px;color:var(--muted);font-size:15px;line-height:1.2}
.project-content{max-width:900px;margin:0 auto}
.project-content p{font-size:17px;line-height:1.65}
.project-content h2,.project-content h3{font-weight:700}
.project-media{margin:34px auto;max-width:1200px}
.project-media iframe,.project-media video{width:100%;max-width:100%;display:block}
.project-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:42px auto;max-width:1200px}
.gallery-item{display:block;aspect-ratio:4/3;overflow:hidden;background:#eee;cursor:zoom-in}
.gallery-item img{width:100%;height:100%;object-fit:cover;display:block}
.project-buttons{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:14px;margin:36px auto;max-width:1000px}
.project-button{display:inline-block;border:1px solid var(--text);padding:10px 17px;font-size:15px;font-weight:700;text-align:center;background:#fff}
.lightbox{position:fixed;inset:0;background:rgba(0,0,0,.9);display:none;align-items:center;justify-content:center;z-index:9999;padding:34px}
.lightbox.is-open{display:flex}
.lightbox img{max-width:92vw;max-height:88vh;width:auto;height:auto;object-fit:contain}
.lightbox-close,.lightbox-prev,.lightbox-next{position:absolute;background:none;border:0;color:#fff;font-size:34px;line-height:1;cursor:pointer;padding:10px}
.lightbox-close{top:12px;right:18px}.lightbox-prev{left:12px;top:50%;transform:translateY(-50%)}.lightbox-next{right:12px;top:50%;transform:translateY(-50%)}
.blog-list{max-width:900px;margin:0 auto}.blog-item{padding:0 0 36px;margin:0 0 36px;border-bottom:1px solid var(--line)}.blog-item h2{font-size:28px;line-height:1.2;margin:0 0 6px}.blog-date{color:var(--muted);font-size:14px}.blog-excerpt{font-size:17px}
.home-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;max-width:1500px;margin:10vh auto 0}.home-card{display:block}.home-image{aspect-ratio:4/3;overflow:hidden;background:#eee}.home-image img{width:100%;height:100%;object-fit:cover;display:block}.home-label{text-transform:lowercase;font-size:18px;font-weight:700;padding-top:10px}
.site-footer{padding:20px var(--pad) 40px;color:var(--muted);font-size:13px}
@media (max-width:900px){.project-grid,.home-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.site-header{padding-bottom:26px}.site-nav{gap:16px;font-size:16px}}
@media (max-width:620px){:root{--pad:16px;--gap:16px}.site-header{display:block;padding-top:16px}.site-nav{justify-content:flex-start;margin-top:18px;gap:13px}.site-main{padding-bottom:40px}.project-grid,.home-grid,.project-gallery{grid-template-columns:1fr}.page-title{font-size:27px;margin-bottom:24px}.project-title{font-size:31px}.card-meta{font-size:16px}.project-content p{font-size:16px}.lightbox{padding:14px}.lightbox-prev,.lightbox-next{font-size:28px}}

/* Project page refinements */
.project-content > p:last-child:empty{display:none}
.project-content img{max-width:100%;height:auto;display:block}
.project-content iframe{display:block;margin:34px auto;max-width:100%}
.project-media{display:flex;justify-content:center;align-items:center;margin:34px auto;max-width:1200px}
.project-media iframe{display:block;margin:0 auto;width:min(100%,1200px)}
.project-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:42px auto;max-width:1200px}
.gallery-item{display:block;aspect-ratio:4/3;overflow:hidden;background:#eee;cursor:zoom-in}
.gallery-item img{width:100%;height:100%;object-fit:cover;display:block}
.project-buttons{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:14px;margin:36px auto;max-width:1000px}
.project-credits{max-width:900px;margin:48px auto 0;color:var(--muted);font-size:13px;line-height:1.5;text-align:center}
.project-credits p{margin:3px 0}
@media (max-width:620px){.project-gallery{grid-template-columns:1fr}.project-credits{margin-top:40px}}
body.lightbox-open{overflow:hidden}

.page-buttons{margin-top:2.5rem;}
.page-credit{margin-top:3rem;color:#777;font-size:.82rem;}

/* External links presented as centered buttons on Listen and Bands pages */
.page-content .site-button { display:inline-block; margin:18px auto; padding:10px 18px; border:1px solid #222; text-decoration:none; }
.page-content p:has(.site-button), .page-content .site-button { text-align:center; }
.page-content iframe { display:block; margin-left:auto !important; margin-right:auto !important; }
.page-content iframe { max-width:100%; }

/* Preserve native WordPress Columns block layout inside project content. */
.project-content .wp-block-columns{display:flex;flex-wrap:wrap;align-items:flex-start;gap:2em;margin-left:auto;margin-right:auto;}
.project-content .wp-block-column{flex:1 1 0;min-width:0;}
.project-content .wp-block-columns.is-layout-flex{display:flex;}
@media (max-width:620px){.project-content .wp-block-columns{display:block}.project-content .wp-block-column{width:100%;margin-bottom:1.5em;}}


/* Native WordPress Gallery blocks: preserve the editor gallery layout on project pages. */
.project-content .wp-block-gallery{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:42px auto;max-width:1200px;padding:0;box-sizing:border-box;}
.project-content .wp-block-gallery.has-nested-images figure.wp-block-image{width:auto !important;max-width:none !important;margin:0 !important;display:block;}
.project-content .wp-block-gallery.has-nested-images figure.wp-block-image img{width:100%;height:auto;display:block;}
.project-content .wp-block-gallery.has-nested-images figure.wp-block-image figcaption{margin:0;padding:8px 0 0;text-align:left;}
@media (max-width:620px){.project-content .wp-block-gallery{grid-template-columns:1fr;gap:16px;}}

/* Native WordPress block layout support */
.project-content .wp-block-columns{display:flex;flex-wrap:nowrap;gap:2em;box-sizing:border-box;align-items:flex-start;margin:1.5em 0}
.project-content .wp-block-column{flex:1 1 0%;min-width:0;box-sizing:border-box}
.project-content .wp-block-column > *:first-child{margin-top:0}
.project-content .wp-block-column > *:last-child{margin-bottom:0}
.project-content .wp-block-columns.has-background{padding:1.25em 2.375em}
@media (max-width:781px){.project-content .wp-block-columns{flex-wrap:wrap}.project-content .wp-block-column{flex-basis:100%!important}}

/* Native WordPress Buttons layout */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 0.5em; }
.wp-block-buttons.is-content-justification-center { justify-content: center; }

/* Native WordPress Image blocks on regular pages */
.page-content .wp-block-image.aligncenter{margin-left:auto !important;margin-right:auto !important;}
.page-content .wp-block-image.aligncenter img{margin-left:auto;margin-right:auto;}
.page-content .wp-block-image{max-width:100%;}
