/*
 * abiOM Theme: tooltricks (Glass Blue)
 * Dunkles Theme mit Glassmorphism, blauen Gradient-Glows
 * Mobile-first, keine Sidebar
 */

/* === FONTS (lokal gehostet) === */
@font-face {
  font-family: 'Inter';
  src: url('/themes/tooltricks/fonts/inter-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/themes/tooltricks/fonts/inter-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/themes/tooltricks/fonts/inter-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/themes/tooltricks/fonts/inter-800.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/themes/tooltricks/fonts/inter-900.woff2') format('woff2');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* === CUSTOM PROPERTIES === */
:root {
  --blue: #3b82f6;
  --blue-dim: rgba(59,130,246,.08);
  --blue-glow: rgba(59,130,246,.15);
  --indigo: #6366f1;
  --bg: #0c1929;
  --bg2: #0f1d30;
  --bg3: #132238;
  --surface: rgba(255,255,255,.04);
  --surface-hover: rgba(255,255,255,.08);
  --bg-alt: rgba(255,255,255,.04);
  --border: rgba(255,255,255,.07);
  --border-hover: rgba(59,130,246,.35);
  --text: #e6edf3;
  --text-muted: #8899aa;
  --text-subtle: #5a6a7a;
  --radius: 16px;
  --radius-sm: 12px;
  --max-width: 700px;
  --gap: 14px;
  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Courier New', monospace;
  --glow: 0 0 24px rgba(59,130,246,.15);
  --glow-hover: 0 0 40px rgba(59,130,246,.2), 0 20px 50px rgba(59,130,246,.1);
  --color-primary: #3b82f6;
}

/* === BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* === ANIMATED BACKGROUND === */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none; z-index: 0;
}

/* === WRAPPER === */
#wrapper { position: relative; z-index: 1; }

/* === HEADER === */
#site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(12,25,41,.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
}

/* Branding */
.site-branding-link {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.site-logo {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  box-shadow: 0 0 20px rgba(59,130,246,.3);
  transition: all .3s;
}
.site-branding-link:hover .site-logo { transform: rotate(-8deg) scale(1.1); box-shadow: 0 0 30px rgba(59,130,246,.45); }
.site-branding-text { display: flex; flex-direction: column; line-height: 1.2; }
.site-name { font-size: 1.05rem; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.site-name span, .site-name b { color: var(--blue); }
.site-tagline { font-size: .65rem; color: var(--text-subtle); font-family: var(--font-mono); letter-spacing: .05em; }

/* Nav */
#main-nav ul { display: flex; gap: 4px; list-style: none; }
#main-nav a {
  padding: 6px 12px; font-size: .75rem; font-weight: 600;
  color: var(--text-muted); border-radius: 8px; transition: all .25s;
}
#main-nav a:hover, #main-nav a[aria-current="page"] {
  background: var(--blue-dim); color: var(--blue); text-decoration: none;
}

/* Burger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Breadcrumb */
.breadcrumb-nav { max-width: var(--max-width); margin: 0 auto; padding: 10px 20px; font-size: .72rem; }
.breadcrumb { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; }
.breadcrumb-item { color: var(--text-subtle); }
.breadcrumb-item a { color: var(--text-muted); }
.breadcrumb-item a:hover { color: var(--blue); }
.breadcrumb-item + .breadcrumb-item::before { content: '›'; margin-right: 6px; color: var(--text-subtle); }

/* === CONTENT WRAPPER === */
#content-wrapper { max-width: var(--max-width); margin: 0 auto; padding: 0 20px 40px; }
#content-wrapper.has-sidebar { display: block; } /* No sidebar grid */
#sidebar { display: none; } /* Always hidden */

/* === ARTICLE === */
.post-single { padding-bottom: 20px; }

.article-header { margin-bottom: 24px; }
.article-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: .68rem; font-weight: 700;
  color: var(--blue); text-transform: uppercase; letter-spacing: .1em;
  background: var(--blue-dim); padding: 5px 12px; border-radius: 6px;
  margin-bottom: 14px;
}
.article-title {
  font-size: 1.85rem; font-weight: 900; line-height: 1.12;
  letter-spacing: -.03em; margin-bottom: 10px;
}
.article-meta {
  display: flex; gap: 14px;
  font-size: .72rem; font-family: var(--font-mono); color: var(--text-subtle);
}

/* Article body */
.article-body {
  font-size: .94rem; line-height: 1.78; color: #b0bec5;
}
.article-body p { margin-bottom: 16px; }
.article-body p strong { color: var(--text); }
.article-body h2 {
  font-size: 1.2rem; font-weight: 800; color: var(--text);
  margin: 32px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.article-body h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin: 22px 0 8px; }
.article-body h4 { font-size: .92rem; font-weight: 700; color: var(--text-muted); margin: 18px 0 6px; }
.article-body ul, .article-body ol { margin: 0 0 16px 18px; color: var(--text-muted); font-size: .9rem; line-height: 1.7; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--blue); }
.article-body a:hover { text-decoration: underline; }
.article-body blockquote {
  border-left: 3px solid var(--blue); padding: 12px 16px; margin: 16px 0;
  background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted); font-style: italic;
}
.article-body code { background: var(--surface); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: .85em; }

/* Hero image */
.hero-img { width: 100%; border-radius: var(--radius); margin: 20px 0 28px; }

/* === CALLOUT / INFO BOX === */
.callout, .summary-box {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--blue); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px; margin: 20px 0; font-size: .88rem; color: var(--text-muted); line-height: 1.6;
}
.callout strong, .summary-box strong { color: var(--text); }

/* Warning box */
.warning {
  background: rgba(239,68,68,.06); border: 1px solid rgba(239,68,68,.15);
  border-left: 3px solid #ef4444; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px; margin: 20px 0; font-size: .88rem; color: var(--text-muted); line-height: 1.6;
}
.warning strong { color: #fca5a5; }

/* === NUMBERED STEPS === */
.steps { counter-reset: step; list-style: none; margin: 0 0 20px; padding: 0; }
.steps li {
  counter-increment: step; position: relative;
  padding: 14px 14px 14px 52px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: .88rem; color: var(--text-muted);
  transition: all .3s;
}
.steps li:hover { border-color: var(--border-hover); transform: translateX(4px); box-shadow: 0 4px 15px rgba(59,130,246,.06); }
.steps li::before {
  content: counter(step); position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; background: linear-gradient(135deg, var(--blue), var(--indigo));
  color: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800;
}

/* === TABLES === */
.table-scroll { overflow-x: auto; margin: 24px 0; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.table-scroll table { width: 100%; border-collapse: collapse; }
.table-scroll th { background: linear-gradient(135deg, var(--blue), #4f46e5); color: #fff; padding: 10px 16px; font-size: .8rem; font-weight: 600; text-align: left; }
.table-scroll td { padding: 10px 16px; font-size: .85rem; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.table-scroll tr:hover td { background: rgba(59,130,246,.03); }

/* === IMAGE WRAP / LIGHTBOX === */
.img-wrap { margin: 24px 0; }
.img-wrap img { width: 100%; border-radius: var(--radius-sm); cursor: zoom-in; }
.img-link { display: block; text-decoration: none; }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; z-index: 9999; cursor: zoom-out; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 4px; }
.lb-close { position: absolute; top: 16px; right: 24px; font-size: 2rem; color: #fff; cursor: pointer; }

/* === FAQ === */
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin: 10px 0; overflow: hidden; transition: all .3s;
}
.faq-item:hover { border-color: var(--border-hover); box-shadow: 0 4px 15px rgba(59,130,246,.06); }
.faq-question {
  padding: 14px 18px; font-weight: 700; font-size: .9rem; color: var(--text);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
.faq-question::after { content: '+'; font-size: 1.1rem; color: var(--blue); font-weight: 800; }
.faq-answer { padding: 0 18px 14px; font-size: .85rem; color: var(--text-muted); line-height: 1.6; }

/* === TAGS === */
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.tag {
  padding: 5px 12px; border-radius: 8px; font-size: .7rem; font-weight: 600;
  background: var(--blue-dim); border: 1px solid rgba(59,130,246,.12); color: var(--blue);
}

/* === SHARE BUTTONS === */
.share-bar { display: flex; gap: 8px; margin: 24px 0; }
.share-btn {
  padding: 8px 16px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-size: .75rem; font-weight: 600;
  cursor: pointer; transition: all .25s; text-decoration: none;
}
.share-btn:hover { background: var(--blue-dim); border-color: rgba(59,130,246,.2); color: var(--blue); text-decoration: none; }

/* === AUTHOR BOX === */
.author-box {
  display: flex; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; margin: 28px 0;
}
.author-box-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.author-box-info { flex: 1; }
.author-box-name { font-size: .88rem; font-weight: 700; color: var(--text); }
.author-box-bio { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.author-box-links { display: flex; gap: 10px; margin-top: 4px; }
.author-box-links a { font-size: .7rem; color: var(--blue); }

/* === SOURCE === */
.source-box {
  margin: 28px 0; padding: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: .78rem; color: var(--text-subtle);
}
.source-box a { color: var(--blue); }

/* === RELATED === */
.related-block { margin: 36px 0 0; padding-top: 24px; border-top: 1px solid var(--border); }
.related-heading {
  font-family: var(--font-mono); font-size: .68rem; color: var(--blue);
  letter-spacing: .1em; margin-bottom: 14px; opacity: .7;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.related-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; text-decoration: none; color: inherit;
  transition: all .35s; cursor: pointer; position: relative;
}
.related-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  opacity: 0; transition: opacity .3s;
}
.related-card:hover {
  border-color: var(--border-hover); transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59,130,246,.08);
}
.related-card:hover::before { opacity: 1; }
.related-card-title { font-size: .85rem; font-weight: 700; margin-bottom: 4px; transition: color .3s; }
.related-card:hover .related-card-title { color: var(--blue); }
.related-card-desc { font-size: .72rem; color: var(--text-subtle); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* === HOMEPAGE === */
/* Hero */
.home-hero { max-width: var(--max-width); margin: 0 auto; padding: 52px 20px 12px; }
.home-hero-kicker { font-family: var(--font-mono); font-size: .72rem; color: var(--blue); letter-spacing: .1em; margin-bottom: 16px; opacity: .7; }
.home-hero-title { font-size: 2.4rem; font-weight: 900; line-height: 1.1; letter-spacing: -.04em; }
.home-hero-title em { font-style: normal; background: linear-gradient(90deg, var(--blue), #818cf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.home-hero-sub { color: var(--text-muted); font-size: .92rem; margin-top: 14px; line-height: 1.65; max-width: 500px; }

/* Search */
.search-box { max-width: var(--max-width); margin: 22px auto 6px; padding: 0; display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: all .3s; }
.search-box:focus-within { border-color: var(--border-hover); box-shadow: var(--glow); }
#search-input { flex: 1; border: none; background: transparent; padding: 13px 16px; font-size: .88rem; font-family: var(--font-body); color: var(--text); outline: none; }
#search-input::placeholder { color: var(--text-subtle); }
#search-btn { background: var(--blue); border: none; color: #fff; padding: 0 18px; font-size: .95rem; cursor: pointer; transition: all .2s; }
#search-btn:hover { background: var(--indigo); }

/* Category chips */
.home-cats { max-width: var(--max-width); margin: 0 auto; padding: 14px 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.home-cats::-webkit-scrollbar { display: none; }
.home-cat {
  padding: 6px 14px; border-radius: 8px; font-size: .72rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); white-space: nowrap; cursor: pointer; transition: all .25s;
}
.home-cat:hover, .home-cat.on { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 0 16px rgba(59,130,246,.2); }

/* Section label */
.section-label { max-width: var(--max-width); margin: 0 auto; padding: 30px 0 14px; display: flex; align-items: center; gap: 10px; }
.section-label span { font-family: var(--font-mono); font-size: .68rem; color: var(--blue); letter-spacing: .1em; opacity: .7; }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Post cards (feed) */
.post-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: var(--gap);
  cursor: pointer; transition: all .4s cubic-bezier(.175,.885,.32,1.275);
  position: relative; text-decoration: none; color: inherit;
}
.post-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue) 30%, var(--blue) 70%, transparent);
  opacity: 0; transition: opacity .3s;
}
.post-card:hover { border-color: var(--border-hover); transform: translateY(-3px); box-shadow: var(--glow-hover); text-decoration: none; }
.post-card:hover::before { opacity: 1; }
.post-card__icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
  background: var(--blue-dim); border: 1px solid rgba(59,130,246,.12);
  transition: all .4s; box-shadow: 0 0 12px rgba(59,130,246,.08);
}
.post-card:hover .post-card__icon { transform: scale(1.12) rotate(-5deg); box-shadow: 0 0 20px rgba(59,130,246,.15); }
.post-card__body { flex: 1; min-width: 0; }
.post-card__cat { font-family: var(--font-mono); font-size: .62rem; color: var(--blue); letter-spacing: .1em; margin-bottom: 4px; display: block; }
.post-card__title { font-size: .95rem; font-weight: 700; line-height: 1.3; margin-bottom: 5px; transition: color .3s; display: block; color: var(--text); }
.post-card:hover .post-card__title { color: var(--blue); }
.post-card__excerpt { font-size: .8rem; color: var(--text-muted); line-height: 1.5; display: block; }
.post-card__meta { margin-top: 8px; font-size: .65rem; font-family: var(--font-mono); color: var(--text-subtle); display: block; }
.post-card__arrow { color: var(--text-subtle); font-size: .9rem; flex-shrink: 0; align-self: center; transition: all .3s; }
.post-card:hover .post-card__arrow { color: var(--blue); transform: translateX(5px); }

/* Featured card (big) */
.featured-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: var(--gap);
  cursor: pointer; transition: all .4s cubic-bezier(.175,.885,.32,1.275);
  position: relative; text-decoration: none; color: inherit; display: block;
}
.featured-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue) 30%, var(--blue) 70%, transparent);
  opacity: 0; transition: opacity .3s;
}
.featured-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--glow-hover); text-decoration: none; }
.featured-card:hover::before { opacity: 1; }
.featured-img-wrap {
  height: 220px; background: linear-gradient(135deg, rgba(59,130,246,.06), rgba(99,102,241,.04));
  display: flex; align-items: center; justify-content: center; font-size: 4rem;
  transition: all .4s;
}
.featured-card:hover .featured-img-wrap { background: linear-gradient(135deg, rgba(59,130,246,.1), rgba(99,102,241,.07)); }
.featured-body { padding: 20px 22px; }
.featured-body .kicker { font-family: var(--font-mono); font-size: .65rem; color: var(--blue); letter-spacing: .1em; margin-bottom: 8px; }
.featured-body h3 { font-size: 1.15rem; font-weight: 800; line-height: 1.25; margin-bottom: 8px; transition: color .3s; }
.featured-card:hover h3 { color: var(--blue); }
.featured-body p { font-size: .85rem; color: var(--text-muted); line-height: 1.55; }
.featured-body .meta { display: flex; gap: 12px; margin-top: 10px; font-size: .68rem; font-family: var(--font-mono); color: var(--text-subtle); }

/* CTA */
.cta-section {
  max-width: var(--max-width); margin: 36px auto 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 24px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--indigo), transparent);
}
.cta-section h2 { font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; }
.cta-section p { font-size: .82rem; color: var(--text-muted); margin-bottom: 16px; }

/* === FOOTER === */
#site-footer {
  max-width: var(--max-width); margin: 0 auto;
  padding: 36px 20px 28px; border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .72rem; color: var(--text-subtle);
}
.footer-nav { display: flex; gap: 14px; }
.footer-nav a { color: var(--text-muted); font-size: .72rem; }
.footer-nav a:hover { color: var(--blue); }
.footer-affiliate { display: none; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  #main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(12,25,41,.95); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border); z-index: 100;
  }
  #main-nav.open { display: block; }
  #main-nav ul { flex-direction: column; gap: 0; }
  #main-nav li { border-bottom: 1px solid var(--border); }
  #main-nav a { display: block; padding: .85rem 1.2rem; font-size: .9rem; }

  .header-inner { padding: 12px 16px; }
  .home-hero { padding: 32px 16px 8px; }
  .home-hero-title { font-size: 1.8rem; }
  .article-title { font-size: 1.4rem; }
  #content-wrapper { padding: 0 16px 30px; }
  .related-grid { grid-template-columns: 1fr; }
  .author-box { flex-direction: column; text-align: center; }
  .share-bar { flex-wrap: wrap; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}

/* === PRINT === */
@media print {
  #site-header, #site-footer, .breadcrumb-nav, .share-bar, .author-box, .related-block, .cta-section { display: none; }
  body { background: #fff; color: #000; }
  .article-body { color: #333; }
}
