/* ============================================
   JOCHEN HORNUNG v2 — Du bist das Wasser.
   ============================================ */

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

/* === Variablen — Default: J-Sphere === */
:root {
  --bg: #0a0a1e;
  --bg-surface: #1e3232;
  --bg-card: #152828;
  --text: #b8cccc;
  --text-bright: #fae6e6;
  --text-muted: #5a8888;
  --accent: #25a2a2;
  --accent-glow: #3ac8c8;
  --accent-hot: #ed7070;
  --warm: #edd457;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-w: 720px;
  --transition: 0.3s ease;
}

/* === Theme: Gym — Beton · Holz · Magenta === */
[data-theme="gym"] {
  --bg: #0b0b0b;
  --bg-surface: #1a1a1a;
  --bg-card: #222222;
  --text: #9da0a0;
  --text-bright: #d1bba5;
  --text-muted: #666655;
  --accent: #a57937;
  --accent-glow: #d1a563;
  --accent-hot: #a0486a;
  --warm: #d1a563;
}

/* === Theme: Graffiti — Urban · Laut · Berlin === */
[data-theme="graffiti"] {
  --bg: #0b0b37;
  --bg-surface: #0b0b63;
  --bg-card: #12124a;
  --text: #8888c0;
  --text-bright: #fdfde7;
  --text-muted: #4a4a88;
  --accent: #0a0ae6;
  --accent-glow: #4a4aff;
  --accent-hot: #fd0b21;
  --warm: #fafa0a;
}

/* === Basis === */
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* === Typografie === */
h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--text-bright);
  line-height: 1.2;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin-top: 2.5rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.1rem; margin-top: 2rem; margin-bottom: 0.5rem; color: var(--accent); }

p { margin-bottom: 1em; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-glow); }

blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.8rem 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-muted);
}

hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--text-muted), transparent);
  margin: 3rem 0;
}

/* === Header === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: linear-gradient(to bottom, var(--bg), transparent);
  transition: background var(--transition);
}

.site-name {
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.site-name:hover { color: var(--text-bright); }

.site-nav {
  display: flex;
  gap: 2rem;
}

.site-nav a {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}
.site-nav a:hover { color: var(--text-bright); }
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}
.site-nav a:hover::after { width: 100%; }

/* === Theme Switcher === */
.theme-switcher {
  display: flex;
  gap: 10px;
  align-items: center;
}

.theme-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  padding: 0;
  outline: none;
}
.theme-dot:hover { transform: scale(1.2); }

.theme-dot--jsphere {
  background: linear-gradient(135deg, #0a0a1e, #25a2a2, #ed7070);
}
.theme-dot--gym {
  background: linear-gradient(135deg, #0b0b0b, #a57937, #a0486a);
}
.theme-dot--graffiti {
  background: linear-gradient(135deg, #0b0b37, #0a0ae6, #fd0b21, #fafa0a);
}

.theme-dot.active {
  border-color: var(--text-bright);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text-muted);
  transform: scale(1.1);
}

@media (max-width: 640px) {
  .theme-switcher { gap: 8px; }
  .theme-dot { width: 15px; height: 15px; }
}

/* Burger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-muted);
  transition: all var(--transition);
}

@media (max-width: 640px) {
  .menu-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(5, 10, 18, 0.96);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
  }
  .site-nav a { font-size: 1.2rem; }
  .menu-open .site-nav { opacity: 1; pointer-events: all; }
  .menu-open .menu-toggle span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
  .menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .menu-open .menu-toggle span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }
}

/* === Main === */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}

/* === HERO (Homepage) === */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  max-width: none;
}

.hero-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-bg canvas {
  width: 100%;
  height: 100%;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 200;
  letter-spacing: 0.08em;
  color: var(--text-bright);
  margin-bottom: 0.3em;
  opacity: 0;
  animation: fadeUp 1.5s ease 0.3s forwards;
}

.hero-sub {
  font-family: var(--serif);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 1.5s ease 0.8s forwards;
}

.hero-mantra {
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  animation: fadeUp 1.5s ease 1.3s forwards;
}

.hero-nav {
  margin-top: 4rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 1.5s ease 1.8s forwards;
}

.hero-nav a {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.6rem 1.2rem;
  border: 1px solid rgba(58, 124, 165, 0.2);
  border-radius: 2px;
  transition: all var(--transition);
}
.hero-nav a:hover {
  color: var(--text-bright);
  border-color: var(--accent);
  background: rgba(58, 124, 165, 0.08);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Scroll-Down-Hint === */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeUp 1.5s ease 2.5s forwards;
}
.scroll-hint span {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  margin: 0 auto;
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* === Sections (Homepage below fold) === */
.section {
  padding: 5rem 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.section p {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text);
}

.section-cta {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  border-bottom: 1px solid rgba(58, 124, 165, 0.3);
  padding-bottom: 2px;
  transition: all var(--transition);
}
.section-cta:hover {
  color: var(--accent-glow);
  border-color: var(--accent-glow);
}

/* Drei Gesichter */
.faces {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.face {
  padding: 2rem 1.5rem;
  border: 1px solid rgba(58, 124, 165, 0.1);
  border-radius: 4px;
  background: var(--bg-surface);
  transition: all var(--transition);
}
.face:hover {
  border-color: var(--accent);
  background: var(--bg-card);
}

.face-name {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.face--dark .face-name {
  color: var(--accent-hot);
}
.face--dark {
  border-color: rgba(237, 112, 112, 0.15);
}
.face--dark:hover {
  border-color: var(--accent-hot);
}

.face p {
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .faces { grid-template-columns: 1fr; }
}

/* === Page Content === */
.page-content {
  animation: fadeUp 0.8s ease forwards;
}

.back-link {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.page-subtitle {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.page-title {
  font-weight: 200;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(58, 124, 165, 0.15);
}

.page-content p,
.page-content li {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.8;
}

.page-content ul, .page-content ol {
  margin: 1em 0;
  padding-left: 1.5em;
}

.page-content li {
  margin-bottom: 0.4em;
}

.page-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1.5rem 0;
}

/* === Texte-Index === */
.text-list {
  list-style: none;
}

.text-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(58, 124, 165, 0.08);
}

.text-item a {
  text-decoration: none;
  display: block;
}

.text-item-title {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-bright);
  transition: color var(--transition);
  margin-bottom: 0.3rem;
}
.text-item a:hover .text-item-title { color: var(--accent-glow); }

.text-item-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.text-item-excerpt {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.text-tabs {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(58, 124, 165, 0.1);
  padding-bottom: 0.8rem;
}

.text-tab {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0;
  position: relative;
  transition: color var(--transition);
}
.text-tab:hover, .text-tab.active { color: var(--text-bright); }
.text-tab.active::after {
  content: '';
  position: absolute;
  bottom: -0.85rem;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
}

/* === Text-Artikel === */
.text-article {
  animation: fadeUp 0.8s ease forwards;
}

.text-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.text-header time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.text-type {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(58, 124, 165, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}

.text-excerpt {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
}

.text-title {
  font-weight: 200;
  margin-bottom: 2.5rem;
}

.text-body {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--text);
}
.text-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.text-body p {
  margin-bottom: 0.5em;
}

.text-hero {
  margin: 2.5rem 0;
}
.text-hero img {
  width: 100%;
  border-radius: 4px;
}

.sources {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(58, 124, 165, 0.1);
}
.sources summary {
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  letter-spacing: 0.05em;
}
.sources[open] summary { margin-bottom: 1rem; }
.sources p, .sources strong, .sources em {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* === Werkzeuge-Grid === */
.tools-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.tool-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--bg-surface);
  border: 1px solid rgba(58, 124, 165, 0.08);
  border-radius: 4px;
  transition: all var(--transition);
}
.tool-card:hover {
  border-color: var(--accent);
  background: var(--bg-card);
}

.tool-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.tool-name {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
}

.tool-desc {
  font-family: var(--serif);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.tool-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.tool-links a {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  border-bottom: 1px solid rgba(58, 124, 165, 0.2);
  padding-bottom: 1px;
}
.tool-links a:hover { border-color: var(--accent-glow); }

.tool-status {
  font-size: 0.75rem;
  color: var(--warm);
  letter-spacing: 0.1em;
}

@media (max-width: 500px) {
  .tool-card { grid-template-columns: 1fr; }
  .tool-icon { width: 48px; height: 48px; }
}

/* === Innenwelt (About) === */
.portrait {
  float: right;
  width: 200px;
  margin: 0 0 1.5rem 2rem;
  border-radius: 4px;
}

@media (max-width: 500px) {
  .portrait {
    float: none;
    width: 100%;
    max-width: 280px;
    margin: 0 auto 1.5rem;
    display: block;
  }
}

/* === Footer === */
.site-footer {
  padding: 4rem 2rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(58, 124, 165, 0.06);
}

.footer-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.site-footer nav {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.site-footer nav a {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.copyright {
  font-size: 0.75rem;
  color: rgba(90, 101, 120, 0.5);
}

/* === Homepage body === */
body.home-page .site-header {
  background: transparent;
}
body.home-page main {
  max-width: none;
  padding: 0;
}
body.home-page .site-footer {
  border-top: none;
}

/* === Responsive === */
@media (max-width: 640px) {
  main { padding: 5rem 1.2rem 3rem; }
  .hero-nav { gap: 1rem; }
  .hero-nav a { font-size: 0.75rem; padding: 0.5rem 0.8rem; }
}

/* === Utility === */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
