/* ============================================
   Lööre Junge - style.css
   Light/Dark theme, responsive, parallax
   ============================================ */

/* --- Geist Font Family --- */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(https://cdn.jsdelivr.net/fontsource/fonts/geist:vf@latest/latin-wght-normal.woff2) format('woff2-variations');
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(https://cdn.jsdelivr.net/fontsource/fonts/geist-mono:vf@latest/latin-wght-normal.woff2) format('woff2-variations');
}

/* --- CSS Custom Properties (Light Theme Default) --- */
:root {
  --bg: #ffffff;
  --bg-secondary: #f7f7f7;
  --bg-tertiary: #efefef;
  --text: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --border: #e0e0e0;
  --accent: #c0392b;
  --accent-hover: #a93226;
  --accent-light: rgba(192, 57, 43, 0.08);
  --shadow: rgba(0, 0, 0, 0.06);
  --shadow-lg: rgba(0, 0, 0, 0.1);
  --overlay: rgba(0, 0, 0, 0.55);
  --nav-bg: rgba(255, 255, 255, 0.92);
  --card-bg: #ffffff;
  --input-bg: #ffffff;
  --success: #27ae60;
  --danger: #e74c3c;
  --warning: #f39c12;
}

/* --- Dark Theme --- */
[data-theme="dark"] {
  --bg: #1e1e2e;
  --bg-secondary: #252536;
  --bg-tertiary: #2d2d3f;
  --text: #e8e8e8;
  --text-secondary: #aaaaaa;
  --text-muted: #777777;
  --border: #383850;
  --accent: #e74c3c;
  --accent-hover: #c0392b;
  --accent-light: rgba(231, 76, 60, 0.1);
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-lg: rgba(0, 0, 0, 0.5);
  --overlay: rgba(0, 0, 0, 0.7);
  --nav-bg: rgba(30, 30, 46, 0.92);
  --card-bg: #252536;
  --input-bg: #2d2d3f;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1e1e2e;
    --bg-secondary: #252536;
    --bg-tertiary: #2d2d3f;
    --text: #e8e8e8;
    --text-secondary: #aaaaaa;
    --text-muted: #777777;
    --border: #383850;
    --accent: #e74c3c;
    --accent-hover: #c0392b;
    --accent-light: rgba(231, 76, 60, 0.1);
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.5);
    --overlay: rgba(0, 0, 0, 0.7);
    --nav-bg: rgba(30, 30, 46, 0.92);
    --card-bg: #252536;
    --input-bg: #2d2d3f;
  }
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

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

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: 720px;
}

.section {
  padding: 5rem 0;
}

.section--alt {
  background-color: var(--bg-secondary);
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.nav__logo img {
  height: 2.2rem;
  width: auto;
}

[data-theme="dark"] .nav__logo img {
  filter: brightness(0) invert(1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav__logo img {
    filter: brightness(0) invert(1);
  }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--accent);
}

.nav__logout {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0;
  font-family: inherit;
  transition: color 0.15s ease;
}

.nav__logout:hover {
  color: var(--accent);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* CSS-only hamburger menu */
.nav__toggle {
  display: none;
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.2rem;
  height: 2.2rem;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0.3rem;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .nav__hamburger {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    height: calc(100vh - 4rem);
    flex-direction: column;
    background: var(--bg);
    padding: 2rem;
    gap: 0;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 99;
  }

  .nav__links li {
    width: 100%;
  }

  .nav__links a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav__toggle:checked ~ .nav__links {
    transform: translateX(0);
  }

  .nav__toggle:checked ~ .nav__hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__toggle:checked ~ .nav__hamburger span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle:checked ~ .nav__hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image: url('../images/main.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--overlay);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  padding: 2rem;
}

.hero__logo {
  width: clamp(120px, 20vw, 200px);
  height: auto;
  margin: 0 auto 1.5rem;
  filter: brightness(0) invert(1);
}

.hero__tagline {
  font-size: clamp(1.2rem, 1rem + 1.5vw, 1.8rem);
  font-weight: 300;
  font-style: italic;
  opacity: 0.95;
  color: #ffffff;
}

.hero__title {
  font-size: clamp(2.5rem, 2rem + 3vw, 4rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #ffffff;
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
    min-height: 60vh;
  }
}

/* --- Cards --- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 20px var(--shadow);
  border-color: var(--accent);
}

.card__image {
  width: 100%;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.card__date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.card__title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card__title a {
  color: var(--text);
}

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

.card__excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* --- Section Header --- */
.section__header {
  margin-bottom: 2.5rem;
}

.section__header h2 {
  margin-bottom: 0.5rem;
}

.section__header p {
  color: var(--text-secondary);
}

.section__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
  font-size: 0.95rem;
  margin-top: 0.75rem;
}

/* --- Motto Timeline --- */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline__item:last-child {
  margin-bottom: 0;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -1.85rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline__year {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline__name {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0.25rem 0;
}

.timeline__desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.timeline__image {
  width: 100%;
  max-width: 500px;
  border-radius: 0.5rem;
  margin: 0.75rem 0;
  border: 1px solid var(--border);
}

/* --- Blog Parallax Sections --- */
.blog-section {
  position: relative;
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.blog-section:last-child {
  border-bottom: none;
}

.blog-section--parallax {
  background-color: var(--bg-secondary);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

.blog-section__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Post Page --- */
.post-header {
  position: relative;
  min-height: 40vh;
  display: flex;
  align-items: flex-end;
  background-color: var(--bg-secondary);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.post-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, var(--overlay));
}

.post-header__content {
  position: relative;
  z-index: 2;
  padding: 3rem 1.5rem;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  color: #ffffff;
}

.post-header__date {
  font-size: 0.9rem;
  opacity: 0.8;
}

.post-header__title {
  font-size: clamp(1.8rem, 1.5rem + 2vw, 2.5rem);
  color: #ffffff;
  margin-top: 0.25rem;
}

.post-content {
  padding: 3rem 0;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.4rem;
}

.post-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.35rem;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-radius: 0 0.25rem 0.25rem 0;
}

.post-content blockquote p {
  margin-bottom: 0;
}

.post-content code {
  font-family: 'Geist Mono', monospace;
  font-size: 0.9em;
  background: var(--bg-tertiary);
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
}

.post-content pre {
  background: var(--bg-tertiary);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content img {
  border-radius: 0.5rem;
  margin: 1rem 0;
}

@media (max-width: 768px) {
  .post-header {
    background-attachment: scroll;
  }
}

/* --- Activities Page --- */
.activity {
  margin-bottom: 3rem;
}

.activity:last-child {
  margin-bottom: 0;
}

.activity h2 {
  margin: 1rem 0 0.5rem;
  font-size: 1.4rem;
}

.activity p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.activity__image {
  width: 100%;
  max-width: 600px;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

/* --- Contact Page --- */
.contact-info {
  font-size: 1.1rem;
}

.contact-info a {
  font-weight: 600;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer__links a {
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.footer__links a:hover {
  color: var(--text);
}

/* --- Legal Pages (Impressum, Datenschutz) --- */
.legal h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.legal strong {
  color: var(--text);
}

/* --- Admin Styles --- */
.admin-login {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-form {
  width: 100%;
  max-width: 400px;
  padding: 2.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.login-form h1 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

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

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--input-bg);
  color: var(--text);
  transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* File Input */
.file-input {
  border: 2px dashed var(--border) !important;
  padding: 1.2rem !important;
  text-align: center;
  cursor: pointer;
  background: var(--bg-secondary) !important;
  transition: border-color 0.15s ease;
}

.file-input:hover {
  border-color: var(--accent) !important;
}

/* Image Preview */
.image-preview {
  margin-top: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.image-preview img {
  max-width: 200px;
  border-radius: 0.25rem;
  border: 1px solid var(--border);
}

.image-preview label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--danger);
  cursor: pointer;
}

/* Markdown Help */
.markdown-help {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
}

.markdown-help code {
  font-family: 'Geist Mono', monospace;
  background: var(--bg-tertiary);
  padding: 0.2em 0.5em;
  border-radius: 0.25rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  gap: 0.4rem;
}

.btn--primary {
  background: var(--accent);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

.btn--secondary {
  background: var(--bg-tertiary);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  background: var(--border);
}

.btn--danger {
  background: var(--danger);
  color: #ffffff;
}

.btn--danger:hover {
  background: #c0392b;
}

.btn--small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.btn--full {
  width: 100%;
}

/* Admin Dashboard */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  font-size: 0.95rem;
}

.admin-table tr:hover td {
  background: var(--accent-light);
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
}

/* --- Alert Messages --- */
.alert {
  padding: 0.85rem 1.2rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.alert--success {
  background: rgba(39, 174, 96, 0.1);
  color: var(--success);
  border: 1px solid rgba(39, 174, 96, 0.2);
}

.alert--error {
  background: rgba(231, 76, 60, 0.1);
  color: var(--danger);
  border: 1px solid rgba(231, 76, 60, 0.2);
}

/* --- Page Header --- */
.page-header {
  padding: 4rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* --- Responsive Table --- */
@media (max-width: 640px) {
  .admin-table thead {
    display: none;
  }

  .admin-table tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem;
  }

  .admin-table td {
    display: block;
    border: none;
    padding: 0.3rem 0;
    font-size: 0.9rem;
  }

  .admin-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
  }
}

/* --- Print --- */
@media print {
  .nav, .footer, .theme-toggle, .nav__hamburger {
    display: none !important;
  }
  body {
    color: #000;
    background: #fff;
  }
}
