:root{
  --bg:#050505;
  --panel:#171717;
  --panel-2:#111;
  --border:#303030;
  --border-soft:#242424;
  --text:#f3f3f3;
  --muted:#8b8b8b;
  --accent:#d63b53;
  --accent-2:#ff5d73;
  --left-width:184px;
  --right-width:292px;
  --topbar-height:64px;
}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text)}
body{
  overflow-x:hidden;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-size:14px;
  line-height:1.45;
}
body.admin-bar .topbar{top:32px}
body.admin-bar .left-sidebar,
body.admin-bar .right-sidebar{top:calc(var(--topbar-height) + 32px);height:calc(100vh - var(--topbar-height) - 32px)}
a{color:inherit;text-decoration:none}
button,input,textarea,select{font:inherit}
img{max-width:100%;height:auto}

.app-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:var(--left-width) minmax(0,1fr) var(--right-width);
  grid-template-rows:var(--topbar-height) 1fr;
  background:var(--bg);
}

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  grid-column:1 / -1;
  height:var(--topbar-height);
  display:flex;
  align-items:center;
  gap:20px;
  padding:0 18px;
  background:#030303;
  border-bottom:1px solid var(--border);
}

.topbar-left{display:flex;align-items:center;gap:18px;min-width:max-content}
.icon-btn{border:0;background:transparent;color:#fff;cursor:pointer;padding:8px}
.burger{width:34px;height:34px;display:flex;flex-direction:column;justify-content:center;gap:5px}
.burger span{display:block;height:2px;width:24px;background:#f5f5f5;border-radius:999px}

.brand{display:flex;align-items:center;gap:7px;font-weight:900;letter-spacing:-1px;white-space:nowrap;min-width:0}
.brand-main{font-size:28px;line-height:1;color:#fff;overflow:hidden;text-overflow:ellipsis}
.brand-badge{
  display:inline-flex;
  align-items:center;
  height:33px;
  padding:0 9px;
  transform:rotate(-2deg);
  border-radius:4px;
  background:linear-gradient(180deg,var(--accent-2),var(--accent));
  color:#fff;
  font-weight:900;
  font-style:italic;
  font-size:25px;
  letter-spacing:-1.5px;
  box-shadow:inset 0 -2px 0 rgba(0,0,0,.22);
}
.brand-logo-img img{max-height:42px;width:auto;display:block}

.top-links{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:30px;
  white-space:nowrap;
  font-size:14px;
  font-weight:800;
}
.top-links .menu,
.top-links ul{display:flex;align-items:center;gap:30px;list-style:none;margin:0;padding:0}
.top-links a{color:#fff}
.top-links i{color:var(--accent-2);margin-right:6px;font-size:12px}

.search{
  display:flex;
  align-items:center;
  min-width:315px;
  height:43px;
  border:1px solid #2e2e2e;
  background:#0e0e0e;
  margin-left:5px;
}
.search input{
  width:100%;
  height:100%;
  border:0;
  outline:0;
  background:transparent;
  color:#eee;
  padding:0 13px;
}
.search input::placeholder{color:#777}
.search button{
  width:48px;
  height:100%;
  border:0;
  border-left:1px solid #2e2e2e;
  background:#121212;
  color:#bfbfbf;
  font-size:28px;
  line-height:1;
  cursor:pointer;
}

.auth-actions{display:flex;align-items:center;gap:8px;white-space:nowrap;margin-left:0}
.auth-actions a{
  display:inline-flex;
  height:40px;
  align-items:center;
  justify-content:center;
  padding:0 14px;
  border-radius:3px;
  border:1px solid #313131;
  font-size:13px;
  font-weight:900;
}
.auth-actions .signup{background:var(--accent);border-color:var(--accent-2);color:#fff}
.auth-actions .login{background:#121212}

.sidebar{
  background:var(--panel);
  border-right:1px solid var(--border);
  overflow:auto;
  scrollbar-width:thin;
  scrollbar-color:#555 #171717;
}
.left-sidebar{
  grid-column:1;
  grid-row:2;
  position:sticky;
  top:var(--topbar-height);
  height:calc(100vh - var(--topbar-height));
  padding:16px 14px;
}
.right-sidebar{
  grid-column:3;
  grid-row:2;
  position:sticky;
  top:var(--topbar-height);
  height:calc(100vh - var(--topbar-height));
  padding:16px 14px;
  border-left:1px solid var(--border);
  border-right:0;
  background:#141414;
}
.side-section{margin-bottom:22px}
.side-title{
  margin:0 0 9px;
  color:#8e8e8e;
  font-size:12px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.side-link,
.left-menu-list a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:32px;
  color:#dfdfdf;
  font-size:14px;
  font-weight:650;
  border-radius:6px;
  padding:0 8px;
}
.left-menu-list{list-style:none;margin:0;padding:0}
.left-menu-list li{margin:0}
.side-link i,
.left-menu-list a::before{
  width:18px;
  min-width:18px;
  text-align:center;
  color:#cfcfcf;
  font-size:15px;
}
.left-menu-list a::before{
  content:"\f15b";
  font-family:"Font Awesome 6 Free";
  font-weight:900;
}
.side-link:hover,
.side-link.active,
.left-menu-list a:hover{color:#fff}

.tag-list{display:flex;flex-wrap:wrap;gap:6px}
.tag-list a{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 9px;
  border:1px solid #3b3b3b;
  background:#171717;
  border-radius:4px;
  color:#e8e8e8;
  font-size:13px;
  font-weight:700;
  line-height:1.15;
}
.tag-list a:hover{border-color:#5a5a5a;background:#202020}
.tag-list .browse-all{
  background:linear-gradient(180deg,var(--accent-2),var(--accent));
  border-color:var(--accent-2);
  color:#fff;
}

.content{
  grid-column:2;
  grid-row:2;
  min-width:0;
  padding:16px 16px 0;
  background:#070707;
}

.category-strip{
  display:flex;
  align-items:center;
  gap:4px;
  overflow-x:auto;
  padding-bottom:14px;
  scrollbar-width:thin;
}
.category-strip .menu,
.category-strip ul{display:flex;align-items:center;gap:4px;list-style:none;margin:0;padding:0}
.category-strip a{
  display:inline-flex;
  align-items:center;
  height:34px;
  flex:0 0 auto;
  padding:0 11px;
  border:1px solid #424242;
  border-radius:4px;
  background:#151515;
  color:#fff;
  font-size:13px;
  font-weight:800;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.category-strip a:hover{background:#1d1d1d;border-color:#5b5b5b}

.gallery-header{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:15px;
  margin:4px 0 16px;
}
.gallery-header h1,
.gallery-header h2{
  margin:0;
  font-size:18px;
  line-height:1.2;
  font-weight:900;
  color:#fff;
}
.sort-tools{display:flex;align-items:center;gap:10px}
.sort-tools button{
  border:0;
  background:transparent;
  color:#d7d7d7;
  cursor:pointer;
  font-weight:700;
  font-size:14px;
}
.sort-tools button:nth-child(n+2){font-size:23px;color:#bfbfbf}

.photo-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-auto-rows:8px;
  grid-auto-flow:dense;
  gap:10px;
  overflow:visible;
  border:0;
  background:transparent;
  min-height:calc(100vh - 168px);
}
.gallery-card{
  display:block;
  width:100%;
  min-width:0;
  margin:0;
  overflow:hidden;
  border-radius:6px;
  background:#111;
}
.gallery-card.ratio-wide{
  grid-column:span 2;
}
.card-thumb{
  position:relative;
  display:block;
  width:100%;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  border-radius:6px;
  background-size:cover !important;
  background-position:center !important;
  box-shadow:0 8px 20px rgba(0,0,0,.16);
}
.card-thumb img{
  display:block;
  width:100%;
  height:auto;
  min-height:0;
  object-fit:contain;
  object-position:center;
  transition:transform .2s ease, filter .2s ease;
}
.fallback-thumb{
  display:block;
  width:100%;
  height:235px;
  min-height:235px;
}
.gallery-card.ratio-wide .fallback-thumb{height:210px}
.gallery-card.ratio-tall .fallback-thumb,
.gallery-card.ratio-portrait .fallback-thumb{height:330px}
.gallery-card.ratio-square .fallback-thumb{height:250px}
.card-thumb::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 20% 18%,rgba(255,255,255,.08),transparent 28%),
    radial-gradient(circle at 88% 82%,rgba(0,0,0,.16),transparent 38%);
  opacity:.42;
  pointer-events:none;
  z-index:1;
}
.card-shade{
  position:absolute;
  inset:0;
  background:linear-gradient(to top,rgba(0,0,0,.78),rgba(0,0,0,0) 55%);
  opacity:0;
  transition:opacity .18s ease;
  z-index:2;
}
.card-title{
  position:absolute;
  left:10px;
  right:10px;
  bottom:10px;
  color:#fff;
  font-size:12px;
  font-weight:800;
  line-height:1.25;
  transform:translateY(6px);
  opacity:0;
  transition:.18s ease;
  z-index:3;
}
.card-thumb:hover img{transform:scale(1.018);filter:brightness(.94)}
.card-thumb:hover .card-shade,
.card-thumb:hover .card-title{opacity:1;transform:translateY(0)}

.pagination-wrap{
  padding:20px 0 34px;
}
.pagination{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.nav-links{display:flex;gap:8px;flex-wrap:wrap}
.page-numbers{
  min-width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 10px;
  border:1px solid #363636;
  border-radius:4px;
  background:#151515;
  color:#fff;
  font-weight:800;
}
.page-numbers.current{
  background:var(--accent);
  border-color:var(--accent-2);
}

.empty-state,
.single-post-panel{
  border:1px solid var(--border);
  background:#111;
  padding:24px;
  border-radius:6px;
}
.empty-state h1,
.empty-state h2{margin-top:0}

.single-content{padding-bottom:34px}
.single-post-panel{max-width:none;width:100%}
.single-header h1{
  margin:0 0 10px;
  font-size:30px;
  line-height:1.1;
}
.single-meta{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  color:#a0a0a0;
  font-size:13px;
  margin-bottom:18px;
}
.single-meta a{color:#ddd}
.single-featured{
  margin:0 0 20px;
  overflow:hidden;
  border-radius:5px;
  border:1px solid #2e2e2e;
  background:#080808;
}
.single-featured img{display:block;width:100%}
.entry-content{color:#e6e6e6;font-size:16px;line-height:1.75}
.entry-content a{color:#fff;text-decoration:underline;text-decoration-color:var(--accent-2)}
.entry-content h2,.entry-content h3{line-height:1.25;color:#fff}
.entry-content blockquote{
  border-left:3px solid var(--accent);
  margin-left:0;
  padding-left:16px;
  color:#ccc;
}
.post-tags{margin-top:20px}
.related-block{margin-top:26px}
.related-grid{min-height:0;grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}

.large-search{
  max-width:520px;
  min-width:0;
  margin:18px 0 0;
}

.widget ul{margin:0;padding-left:18px}
.widget li{margin:0 0 7px}
.widget a{color:#e8e8e8}

@media (max-width:1250px){
  :root{--right-width:250px}
  .top-links{display:none}
  .search{margin-left:auto}
}

@media (max-width:980px){
  body.admin-bar .left-sidebar{top:calc(var(--topbar-height) + 46px)}
  .app-shell{
    grid-template-columns:1fr;
    grid-template-rows:var(--topbar-height) auto 1fr;
  }
  .topbar{gap:10px;padding:0 10px}
  .topbar-left{gap:9px;min-width:0;flex:1 1 auto}
  .brand{min-width:0;max-width:100%}
  .brand-main{font-size:21px}
  .brand-badge{font-size:18px;height:27px;flex:0 0 auto}
  .search{display:none}
  .auth-actions{margin-left:auto;flex:0 0 auto}
  .auth-actions a{height:34px;padding:0 10px;font-size:11px}
  .left-sidebar{
    position:fixed;
    z-index:80;
    left:0;
    top:var(--topbar-height);
    transform:translateX(-105%);
    transition:transform .2s ease;
    width:250px;
  }
  body.sidebar-open .left-sidebar{transform:translateX(0)}
  .right-sidebar{
    position:static;
    grid-column:1;
    grid-row:3;
    height:auto;
    border-left:0;
    border-top:1px solid var(--border);
  }
  .content{grid-column:1;grid-row:2;padding:14px 10px}
  .gallery-header{align-items:flex-start}
  .photo-grid{grid-template-columns:repeat(3,minmax(0,1fr));min-height:0}.gallery-card.ratio-wide{grid-column:span 2}
}

@media (max-width:782px){
  body.admin-bar .topbar{top:46px}
}

@media (max-width:520px){
  .brand-main{font-size:18px;max-width:135px}
  .brand-badge{font-size:16px;height:24px}
  .auth-actions .login{display:none}
  .category-strip a{font-size:12px;height:32px}
  .gallery-header h1{font-size:16px}
  .photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.gallery-card.ratio-wide{grid-column:span 2}
  .single-header h1{font-size:24px}
  .single-post-panel{padding:18px}
}


/* Desktop collapsed left sidebar */
body.sidebar-collapsed{
  --left-width:64px;
}
body.sidebar-collapsed .left-sidebar{
  padding:16px 8px;
}
body.sidebar-collapsed .left-sidebar .side-title{
  display:none;
}
body.sidebar-collapsed .left-sidebar .side-section{
  margin-bottom:12px;
}
body.sidebar-collapsed .side-link{
  justify-content:center;
  padding:0;
  height:38px;
}
body.sidebar-collapsed .side-link .link-text{
  display:none;
}
body.sidebar-collapsed .left-menu-list a{
  justify-content:center;
  font-size:0;
  padding:0;
  height:38px;
}
body.sidebar-collapsed .left-menu-list a::before{
  font-size:16px;
}

/* Cleaner active state */
.side-link:hover,
.side-link.active,
.left-menu-list a:hover{
  color:#fff;
  background:#202020;
}
.side-link:hover i,
.side-link.active i{
  color:#fff;
}

/* Search page fix */
.search-content{
  padding-bottom:34px;
}
.search-hero-panel{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:0 0 18px;
  padding:18px;
  border:1px solid var(--border);
  border-radius:8px;
  background:linear-gradient(180deg,#121212,#0c0c0c);
}
.search-kicker{
  margin:0 0 4px;
  color:var(--accent-2);
  font-size:12px;
  text-transform:uppercase;
  font-weight:900;
  letter-spacing:.08em;
}
.search-hero-panel h1{
  margin:0;
  font-size:22px;
  line-height:1.15;
}
.archive-search-form{
  display:flex;
  align-items:center;
  width:min(460px,100%);
  height:44px;
  border:1px solid #333;
  border-radius:6px;
  overflow:hidden;
  background:#090909;
}
.archive-search-form input{
  min-width:0;
  width:100%;
  height:100%;
  border:0;
  outline:0;
  background:transparent;
  color:#fff;
  padding:0 13px;
}
.archive-search-form button{
  width:50px;
  height:100%;
  border:0;
  border-left:1px solid #333;
  background:#151515;
  color:#fff;
  cursor:pointer;
}
.search-results-heading h2{
  font-size:17px;
}
.search-empty{
  margin-top:14px;
}

/* Larger masonry on very wide screens */


@media (max-width:980px){
  body.sidebar-collapsed{
    --left-width:184px;
  }
  .search-hero-panel{
    align-items:stretch;
    flex-direction:column;
  }
  .archive-search-form{
    width:100%;
  }
}

@media (max-width:520px){
  .photo-grid{
    columns:1;
  }
  .search-hero-panel h1{
    font-size:19px;
  }
}


/* v1.3 header polish */
.brand-crown{display:none !important}
.gallery-header .sort-tools{display:none !important}

@media (max-width:980px){
  .topbar .auth-actions{
    margin-left:auto;
  }
}

@media (max-width:380px){
  .brand-main{max-width:110px}
  .brand-badge{font-size:14px;padding:0 7px}
  .auth-actions a{padding:0 8px}
}


/* v1.4 single page full available width */
.single-content{
  width:100%;
}
.single-content .single-post-panel{
  max-width:none !important;
  width:100%;
}
.single-content .entry-content{
  max-width:none;
}
.single-featured img{
  width:100%;
  height:auto;
}


/* v1.6 desktop topbar alignment restored */
@media (min-width:981px){
  .top-links{
    margin-left:auto !important;
  }
  .search{
    margin-left:5px !important;
  }
  .auth-actions{
    margin-left:0 !important;
  }
}

/* Keep mobile auth pushed right */
@media (max-width:980px){
  .topbar-left{
    flex:1 1 auto;
  }
  .auth-actions{
    margin-left:auto !important;
  }
}





/* v1.8 compact filled masonry grid */
@media (min-width:1600px){
  .photo-grid{
    grid-template-columns:repeat(5,minmax(0,1fr));
  }
}
@media (min-width:981px) and (max-width:1599px){
  .photo-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}
@media (max-width:980px){
  .photo-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media (max-width:640px){
  .photo-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:420px){
  .photo-grid{
    grid-template-columns:1fr;
  }
  .gallery-card.ratio-wide{
    grid-column:span 1;
  }
}
