/* clearmybrain – nerd / hacker dark */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Share+Tech+Mono&display=swap');

:root {
  --bg: #0a0a0a;
  --bg-soft: #111111;
  --text: #c8c8c8;
  --text-bright: #e8e8e8;
  --text-muted: #6b6b6b;
  --border: #1f1f1f;
  --border-subtle: #181818;
  --hack: #00ff41;          /* classic hacker green */
  --hack-dim: #00b32d;
  --hack-glow: rgba(0, 255, 65, 0.35);
  --max: 720px;
  --font: 'Fira Code', 'Share Tech Mono', ui-monospace, monospace;
  --font-ui: 'Share Tech Mono', 'Fira Code', monospace;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========== HOME – full wallpaper ========== */
body.home {
  background-color: #000;
  background-image: url('../images/bg-brainfog.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  height: 100vh;
  overflow: hidden;
}

/* sehr leichte Vignette – Wallpaper maximal sichtbar */
body.home::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    rgba(0,0,0,0.2) 100%
  );
  z-index: -1;
  pointer-events: none;
}

body.home {
  image-rendering: -webkit-optimize-contrast;
}

body.home main,
body.home footer {
  display: none !important;
}

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0, 255, 65, 0.15);
  background: rgba(5, 5, 5, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body.home .site-header {
  background: rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid rgba(0, 255, 65, 0.22);
}

.header-inner {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.logo {
  display: block;
  text-decoration: none;
  border: none !important;
  line-height: 1;
}

.logo-text {
  font-family: 'Share Tech Mono', 'Fira Code', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: #00ff41;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.45);
  white-space: nowrap;
}

.logo:hover .logo-text {
  text-shadow: 0 0 16px rgba(0, 255, 65, 0.75);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.15rem;
  width: 100%;
  font-family: 'Share Tech Mono', 'Fira Code', monospace;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(0, 255, 65, 0.1);
}

.nav a {
  font-size: 0.8rem;
  font-weight: 500;
  color: #00b32d;
  text-decoration: none;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color 0.15s ease, text-shadow 0.15s ease;
  position: relative;
  padding: 0.25rem 0.1rem;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: #00ff41;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.45);
}

.nav a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #00ff41;
  box-shadow: 0 0 6px #00ff41;
}

/* ========== MAIN ========== */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.25rem 1.35rem 5rem;
}

/* ========== BLOG LIST ========== */
.posts {
  display: flex;
  flex-direction: column;
}

.post-item {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.post-item:first-child {
  border-top: 1px solid var(--border-subtle);
}

.post-meta {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--hack-dim);
  margin-bottom: 0.45rem;
  letter-spacing: 0.04em;
}

.post-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: -0.01em;
  line-height: 1.35;
  text-decoration: none;
  display: inline;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.post-item:hover .post-title {
  color: var(--hack);
  text-shadow: 0 0 8px var(--hack-glow);
}

.post-excerpt {
  margin-top: 0.45rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.empty-state {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-muted);
  font-family: var(--font-ui);
  letter-spacing: 0.05em;
}

/* ========== SINGLE POST ========== */
.back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--hack-dim);
  text-decoration: none;
  margin-bottom: 2rem;
  letter-spacing: 0.04em;
  transition: color 0.15s ease;
}

.back:hover {
  color: var(--hack);
}

.post-header {
  margin-bottom: 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.post-header .post-meta {
  margin-bottom: 0.7rem;
}

.post-header h1 {
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-bright);
}

.post-body {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text);
}

.post-body p {
  margin-bottom: 1.3rem;
}

.post-body h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2.1rem 0 0.8rem;
  color: var(--hack);
  letter-spacing: -0.01em;
}

.post-body a {
  color: var(--hack);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--hack-dim);
}

.post-body a:hover {
  text-decoration-color: var(--hack);
  text-shadow: 0 0 6px var(--hack-glow);
}

.post-body img {
  max-width: 100%;
  height: auto;
  margin: 1.6rem 0;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: block;
}

/* ========== ABOUT ========== */
.about-body {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text);
}

.about-body p {
  margin-bottom: 1.3rem;
}

.about-body strong {
  color: var(--hack);
  font-weight: 600;
}

/* ========== FOOTER ========== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1.35rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-ui);
  letter-spacing: 0.06em;
}

/* ========== LOGIN / ADMIN ========== */
.auth-card {
  max-width: 380px;
  margin: 4rem auto 0;
}

.auth-card h1 {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--hack);
  margin-bottom: 1.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--hack-dim);
  margin-bottom: 0.35rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  color: var(--text-bright);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group textarea {
  min-height: 200px;
  resize: vertical;
  line-height: 1.6;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--hack-dim);
  box-shadow: 0 0 0 1px var(--hack-dim), 0 0 12px var(--hack-glow);
}

.form-group input[type="file"] {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-ui);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.35rem;
  background: transparent;
  color: var(--hack);
  border: 1px solid var(--hack);
  border-radius: 3px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  background: var(--hack);
  color: #000;
  box-shadow: 0 0 16px var(--hack-glow);
}

.btn-full {
  width: 100%;
}

.alert {
  padding: 0.7rem 1rem;
  border-radius: 3px;
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
  font-family: var(--font-ui);
}

.alert-ok {
  background: rgba(0, 255, 65, 0.08);
  color: var(--hack);
  border: 1px solid rgba(0, 255, 65, 0.25);
}

.alert-err {
  background: rgba(255, 70, 70, 0.1);
  color: #ff6b6b;
  border: 1px solid rgba(255, 70, 70, 0.25);
}

.admin-list {
  margin-top: 3rem;
}

.admin-list h2 {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--hack-dim);
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--border-subtle);
  gap: 1rem;
}

.admin-item a {
  color: var(--text-bright);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.admin-item a:hover {
  color: var(--hack);
}

.admin-item .meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-family: var(--font-ui);
}

.admin-item .del {
  font-size: 0.8rem;
  color: #ff6b6b;
  text-decoration: none;
  opacity: 0.75;
  font-family: var(--font-ui);
}

.admin-item .del:hover {
  opacity: 1;
}

.page-title {
  font-family: var(--font-ui);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--hack);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

/* ========== RESPONSIVE ========== */

/* ========== GALLERY / PICTURES ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  margin: 0;
  background: #0d0d0d;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gallery-item:hover {
  border-color: rgba(0, 255, 65, 0.35);
  box-shadow: 0 0 16px rgba(0, 255, 65, 0.12);
}

.gallery-item a {
  display: block;
  line-height: 0;
}

.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.gallery-item figcaption {
  padding: 0.65rem 0.75rem 0.2rem;
  font-size: 0.85rem;
  color: var(--text-bright);
  line-height: 1.4;
}

.gallery-item .gallery-meta {
  padding: 0.25rem 0.75rem 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--hack-dim);
  letter-spacing: 0.04em;
}


}



  .logo-text {
    font-size: 0.9rem;
    letter-spacing: 0.04em;
  }

  .nav {
    gap: 0.9rem;
  }

  .nav a {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }

  main {
    padding: 2.25rem 1.1rem 4rem;
  }

  .post-header h1 {
    font-size: 1.3rem;
  }
}


/* ========== BOOKS ========== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.book-card {
  background: #0d0d0d;
  border: 1px solid var(--border-subtle, #181818);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.book-card:hover {
  border-color: rgba(0, 255, 65, 0.35);
  box-shadow: 0 0 16px rgba(0, 255, 65, 0.1);
}

.book-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-cover-placeholder {
  font-family: var(--font-ui, monospace);
  font-size: 0.75rem;
  color: #444;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-info {
  padding: 0.85rem 0.9rem 1rem;
}

.book-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright, #e8e8e8);
  margin: 0 0 0.35rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.book-author {
  font-size: 0.8rem;
  color: #00b32d;
  margin: 0 0 0.5rem;
  font-family: var(--font-ui, monospace);
}

.book-notes {
  font-size: 0.82rem;
  color: var(--text-muted, #6b6b6b);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.book-date {
  font-size: 0.7rem;
  color: #555;
  margin: 0;
  font-family: var(--font-ui, monospace);
  letter-spacing: 0.04em;
}

.admin-hr {
  border: none;
  border-top: 1px solid var(--border-subtle, #181818);
  margin: 3rem 0;
}

@media (max-width: 480px) {
  .books-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .book-info {
    padding: 0.65rem;
  }
  .book-title {
    font-size: 0.82rem;
  }
}


/* ========== MOVIES ========== */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.15rem;
}

.movie-card {
  background: #0d0d0d;
  border: 1px solid var(--border-subtle, #181818);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.movie-card:hover {
  border-color: rgba(0, 255, 65, 0.35);
  box-shadow: 0 0 14px rgba(0, 255, 65, 0.1);
}

.movie-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.movie-poster-placeholder {
  font-family: var(--font-ui, monospace);
  font-size: 0.7rem;
  color: #444;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.movie-info {
  padding: 0.7rem 0.75rem 0.85rem;
}

.movie-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-bright, #e8e8e8);
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.movie-year {
  font-size: 0.75rem;
  color: #00b32d;
  margin: 0 0 0.35rem;
  font-family: var(--font-ui, monospace);
}

.movie-notes {
  font-size: 0.78rem;
  color: var(--text-muted, #6b6b6b);
  margin: 0 0 0.4rem;
  line-height: 1.45;
}

.movie-date {
  font-size: 0.68rem;
  color: #555;
  margin: 0;
  font-family: var(--font-ui, monospace);
}

/* ========== PROJECTS ========== */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.project-card {
  display: flex;
  gap: 1.15rem;
  background: #0d0d0d;
  border: 1px solid var(--border-subtle, #181818);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  border-color: rgba(0, 255, 65, 0.35);
  box-shadow: 0 0 14px rgba(0, 255, 65, 0.1);
}

.project-image {
  flex-shrink: 0;
  width: 140px;
  min-height: 100px;
  background: #111;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-body {
  flex: 1;
  padding: 1rem 1.1rem 1.1rem 0;
  min-width: 0;
}

.project-card:not(:has(.project-image)) .project-body {
  padding-left: 1.1rem;
}

.project-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.85rem;
  margin-bottom: 0.4rem;
}

.project-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-bright, #e8e8e8);
  margin: 0;
  line-height: 1.3;
}

.project-title a {
  color: inherit;
  text-decoration: none;
}

.project-title a:hover {
  color: #00ff41;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
}

.project-status {
  font-family: var(--font-ui, monospace);
  font-size: 0.68rem;
  color: #00b32d;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(0, 255, 65, 0.25);
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted, #6b6b6b);
  margin: 0 0 0.5rem;
  line-height: 1.55;
}

.project-date {
  font-size: 0.7rem;
  color: #555;
  margin: 0;
  font-family: var(--font-ui, monospace);
}

@media (max-width: 560px) {
  .movies-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .project-card {
    flex-direction: column;
  }
  .project-image {
    width: 100%;
    height: 160px;
  }
  .project-body {
    padding: 0.85rem 1rem 1rem !important;
  }
}

/* ========== MOBILE ========== */
@media (max-width: 480px) {
  .header-inner {
    padding: 0.75rem 0.85rem;
    gap: 0.5rem;
  }

  .logo-text {
    font-size: 1.05rem;
    letter-spacing: 0.05em;
  }

  .nav {
    gap: 0.35rem 0.75rem;
  }

  .nav a {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
  }

  main {
    padding: 1.5rem 0.9rem 2.5rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .gallery-item img {
    height: 120px;
  }
}
