:root{
  --page-max: 1200px;
  --glass-a: rgba(34, 40, 48, 0.76);
  --glass-b: rgba(17, 20, 26, 0.60);
  --bar-a: rgba(40, 46, 54, 0.70);
  --bar-b: rgba(20, 24, 30, 0.58);
  --stroke: rgba(255,255,255,0.13);
  --text: rgba(246, 247, 250, 0.92);
  --muted: rgba(246, 247, 250, 0.72);
  --radius: 12px;
  --shadow: 0 18px 60px rgba(0,0,0,0.38);
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.26);
  --accent: #3AA2FF;
  --accent-soft: rgba(58, 162, 255, 0.25);
}

*,
*::before,
*::after{ box-sizing: border-box; }

html, body{ height: 100%; }

body{
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
  line-height: 1.55;
  background-color: #11141a;
  background-image: url("../img/bg.avif");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100%;
}

body::before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 18% 10%, rgba(0,0,0,0.10), transparent 55%),
    radial-gradient(900px 600px at 80% 18%, rgba(0,0,0,0.12), transparent 52%),
    linear-gradient(180deg, rgba(0,0,0,0.16), rgba(0,0,0,0.30));
  z-index: 0;
}

#page{
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

a{ color: rgba(255,255,255,0.92); text-decoration: none; }
a:hover{ color: #fff; }

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

.site-wrap{
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 22px 18px 26px;
}

.site-header{
  padding: 18px 0 14px;
  text-align: center;
}

.site-logo{
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@keyframes fk-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.site-logo img{
  max-width: min(520px, 92vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.35));
  animation: fk-bounce 3.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce){
  .site-logo img{ animation: none; }
}

.glass-bar{
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-soft);
  background:
    radial-gradient(900px 240px at 30% 10%, rgba(255, 190, 120, 0.10), transparent 55%),
    radial-gradient(700px 220px at 85% 0%, rgba(255,255,255,0.06), transparent 55%),
    linear-gradient(135deg, var(--bar-a), var(--bar-b));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.content-box{
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  background:
    radial-gradient(900px 420px at 22% 0%, rgba(255, 190, 120, 0.10), transparent 60%),
    radial-gradient(700px 380px at 90% 18%, rgba(255,255,255,0.07), transparent 55%),
    linear-gradient(135deg, var(--glass-a), var(--glass-b));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: clamp(18px, 3vw, 30px);
  min-height: 320px;
}

.site-nav{
  padding: 10px 14px;
  margin: 10px 0 18px;
}

.site-nav .nav,
.footer-nav .nav{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.site-nav a{
  position: relative;
  display: inline-block;
  padding: 8px 2px;
  color: rgba(246,247,250,0.90);
  transition: color .12s ease;
}

.site-nav a:hover{ color: var(--accent); }

.site-nav .nav-current a{
  color: rgba(246,247,250,0.98);
}

.site-nav .nav-current a::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 18px var(--accent-soft);
  border-radius: 2px;
}

.entry-title{
  margin: 0 0 14px;
  line-height: 1.2;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.entry-content p,
.gh-content p{ color: var(--text); }

.muted{ color: var(--muted); }

.site-footer{
  margin-top: 18px;
  padding: 12px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.footer-nav{
  margin-top: 8px;
}

.footer-nav .nav{ gap: 12px; }
.footer-nav a{ color: var(--muted); font-size: 13px; }
.footer-nav a:hover{ color: #fff; }

.social-list{ display: flex; flex-direction: column; }

.social-row{
  display: grid;
  grid-template-columns: 36px 1fr 24px;
  align-items: center;
  gap: 14px;
  padding: 16px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  color: var(--text);
}

.social-row:last-child{ border-bottom: none; }
.social-row:hover{ color: #fff; }
.social-icon{ display: flex; align-items: center; justify-content: center; }
.social-text{ display: flex; flex-direction: column; line-height: 1.25; }
.social-text strong{ font-weight: 600; font-size: 1.05rem; }
.social-arrow{ text-align: right; opacity: 0.7; font-size: 1.1rem; }

.intro{ margin: 8px 0 22px; }
.archive-header{ margin-bottom: 18px; }

.author-avatar{
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
}

.post-feed{
  display: grid;
  gap: 0;
}

.post-card{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.post-card:first-child{ border-top: none; padding-top: 0; }

.post-card-image img{
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
}

.post-card-title{
  margin: 0 0 6px;
  font-size: 1.15rem;
  line-height: 1.3;
}

.post-card-body p{ margin: 0 0 8px; }

.post-full-image{ margin: 0 0 22px; }
.post-full-image img{
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}
.post-full-image figcaption{
  margin-top: 8px;
  text-align: center;
  font-size: 0.9rem;
}

.post-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.tag-pill{
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.pagination{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.private-form{
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.private-form input{
  flex: 1;
  min-width: 180px;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,0.25);
  color: #fff;
  border-radius: 8px;
  padding: 10px 12px;
}

.private-form button{
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
}

.form-error{ color: #ff8a8a; }

/* Required Koenig width classes */
.kg-width-wide{
  position: relative;
  width: 85vw;
  min-width: 100%;
  max-width: 960px;
  margin-left: 50%;
  transform: translateX(-50%);
}

.kg-width-full{
  position: relative;
  width: 100vw;
  max-width: none;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.kg-width-wide img,
.kg-width-full img{
  width: 100%;
  height: auto;
}

.kg-image{ max-width: 100%; height: auto; }
.kg-card{ margin: 1.6em 0; }

.kg-image-card figcaption,
.kg-embed-card figcaption,
.kg-gallery-card figcaption{
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 0.6em;
}

.kg-gallery-container{ display: flex; flex-direction: column; gap: 8px; }
.kg-gallery-row{ display: flex; gap: 8px; }
.kg-gallery-image img{ width: 100%; height: 100%; object-fit: cover; }

.kg-bookmark-card .kg-bookmark-container{
  display: flex;
  min-height: 140px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  background: rgba(0,0,0,0.18);
}

.kg-bookmark-content{ padding: 16px; flex: 1; }
.kg-bookmark-title{ font-weight: 600; }
.kg-bookmark-description{ color: var(--muted); font-size: 0.92rem; margin-top: 6px; }
.kg-bookmark-metadata{ margin-top: 10px; font-size: 0.85rem; color: var(--muted); }
.kg-bookmark-thumbnail{ max-width: 180px; }
.kg-bookmark-thumbnail img{ width: 180px; height: 100%; object-fit: cover; }

.kg-blockquote-alt{
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  color: var(--muted);
}

.kg-button-card,
.kg-button-card-align-center{ text-align: center; }

.kg-btn,
.kg-button-card a.kg-btn{
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
}

.kg-callout-card{
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--stroke);
}

.kg-toggle-card,
.kg-product-card-container,
.kg-audio-card,
.kg-file-card,
.kg-video-card{
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(0,0,0,0.18);
}

.kg-toggle-card,
.kg-product-card-container{ padding: 12px 16px; }

.gh-content h2,
.gh-content h3{ color: #fff; }
.gh-content a{ color: var(--accent); }
.gh-content img{ max-width: 100%; height: auto; border-radius: 8px; }
.gh-content figure{ margin: 1.2em 0; }

@media (max-width: 640px){
  .post-card{ grid-template-columns: 1fr; }
  .post-card-image img{ height: 160px; }
  .site-nav .nav{ gap: 12px; }
}

@media (max-width: 520px){
  body{ background-attachment: scroll; }
}
