:root{
  --surface:#fffdfa;
  --shadow:0 20px 60px rgba(28,36,33,.10);
  color-scheme:light;
}

html[data-theme="dark"]{
  --paper:#161b1a;
  --surface:#202725;
  --ink:#f1eee8;
  --muted:#aeb6ae;
  --line:#38423e;
  --accent:#f08063;
  --accent-soft:#50362f;
  --green:#526d5a;
  --white:#f8f5ef;
  --shadow:0 24px 70px rgba(0,0,0,.34);
  color-scheme:dark;
}

html{background:var(--paper)}
body{transition:background-color .25s ease,color .25s ease}
.site-header{
  position:sticky;
  top:0;
  z-index:8;
  background:color-mix(in srgb,var(--paper) 90%,transparent);
  backdrop-filter:blur(14px);
}
.header-actions{align-items:center}
.icon-button:hover{transform:translateY(-1px)}
.home-intro{padding-top:92px;padding-bottom:108px}
.featured-frame{box-shadow:var(--shadow)}
.featured-frame img{transition:transform .6s ease,filter .3s ease}
.featured-frame:hover img{transform:scale(1.025)}
.mini-post{min-height:196px;transition:transform .2s ease,border-color .2s ease}
.mini-post:hover{transform:translateY(-4px);border-color:var(--accent)}
.post-item{transition:background-color .2s ease,padding-inline .2s ease}
.post-item:hover{background:var(--surface);padding-inline:16px;margin-inline:-16px}
.post-thumb{box-shadow:0 8px 24px rgba(28,36,33,.12)}
.tag-chip,.icon-button,.admin-form input,.admin-form textarea{transition:border-color .2s ease,background-color .2s ease,color .2s ease}
.tag-chip:focus-visible,.icon-button:focus-visible,.button:focus-visible,.text-link:focus-visible,.main-nav a:focus-visible,.admin-form input:focus-visible,.admin-form textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.search-field:focus-within{border-color:var(--accent)}
.post-modal-panel{box-shadow:var(--shadow)}
.file-item{transition:background-color .2s ease,padding-inline .2s ease}
.file-item:hover{background:var(--surface);padding-inline:12px;margin-inline:-12px}
.library-note{max-width:1180px}
.admin-form input,.admin-form textarea{background:var(--surface)}
.admin-item{transition:background-color .2s ease,padding-inline .2s ease}
.admin-item:hover{background:var(--surface);padding-inline:12px;margin-inline:-12px}
html[data-theme="dark"] .featured-frame img,
html[data-theme="dark"] .post-thumb{filter:saturate(.72) brightness(.82)}
html[data-theme="dark"] .image-caption{background:rgba(12,16,15,.88)}
html[data-theme="dark"] .site-header{box-shadow:0 1px 0 rgba(255,255,255,.02)}
html[data-theme="dark"] .post-thumb{box-shadow:0 10px 28px rgba(0,0,0,.28)}

@media(max-width:760px){
  .site-header{background:color-mix(in srgb,var(--paper) 94%,transparent)}
  .main-nav{box-shadow:var(--shadow);border:1px solid var(--line)}
  .theme-toggle{display:grid}
  .home-intro{padding-top:62px;padding-bottom:76px}
  .featured-frame{box-shadow:none}
  .mini-post{min-height:0}
  .post-item:hover,.file-item:hover,.admin-item:hover{padding-inline:0;margin-inline:0;background:transparent}
  .post-thumb{box-shadow:none}
  .post-modal-panel{box-shadow:none}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}
}
