/* jonaskrug.de — techy dark theme: music × technology */

:root {
  --bg: #0a0e14;
  --bg-raised: #101724;
  --bg-card: #131c2b;
  --line: #1f2c40;
  --text: #d7e0ee;
  --text-dim: #8fa1b8;
  --accent: #22d3ee;      /* cyan  — technik */
  --accent-2: #a78bfa;    /* viola — musik  */
  --gradient: linear-gradient(100deg, var(--accent), var(--accent-2));
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "Fira Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --maxw: 46rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  /* subtle blueprint grid */
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
}

::selection { background: rgba(34, 211, 238, 0.35); }

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(10, 14, 20, 0.82);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.brand-prompt { color: var(--accent); }
.brand-accent { color: var(--accent-2); }
.brand:hover .brand-prompt::after { content: "_"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--accent); background: rgba(34, 211, 238, 0.08); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::before { content: "> "; }

/* ---------- hero (home) ---------- */

.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

/* Foto als Hintergrund, dunkel gegradet in den Site-Farben */
.hero-bg {
  position: absolute;
  inset: 0;
  background: url("/media/jonas-hero-web.jpg") 70% 30% / cover no-repeat;
  filter: grayscale(30%) saturate(0.8) brightness(0.5) contrast(1.05);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10, 14, 20, 0.35), rgba(10, 14, 20, 0.25) 60%, var(--bg)),
    linear-gradient(100deg, rgba(10, 14, 20, 0.92) 25%, rgba(10, 14, 20, 0.45) 60%, rgba(34, 211, 238, 0.10)),
    linear-gradient(rgba(167, 139, 250, 0.10), rgba(34, 211, 238, 0.08));
}

#waveform {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}

.hero-inner {
  position: relative;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 3rem 1.25rem;
  text-align: left;
}

.hero-kicker {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  margin: 0 0 0.75rem;
}

.hero-title {
  font-size: clamp(2.75rem, 8vw, 4.75rem);
  line-height: 1.05;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 1.25rem 0 0;
  font-family: var(--mono);
  color: var(--text-dim);
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
}

.sep { color: var(--accent); margin: 0 0.6em; }

.hero-scroll {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-dim);
  animation: drift 2.2s ease-in-out infinite;
}
@keyframes drift { 50% { transform: translate(-50%, 6px); } }

/* ---------- page head (subpages) ---------- */

.page-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4rem 1.25rem 0;
}
.page-head h1 {
  font-size: clamp(2.1rem, 6vw, 3rem);
  margin: 0;
  letter-spacing: -0.02em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-head .hero-kicker { margin-bottom: 0.4rem; }
.page-sub { color: var(--text-dim); font-family: var(--mono); margin: 0.75rem 0 0; }

/* ---------- content ---------- */

.content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}

.content h1, .content h2, .content h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 2.2em 0 0.6em;
}
.content > h1:first-child, .content > h2:first-child { margin-top: 0.5em; }

.content h2 {
  font-size: 1.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}
.content h2::before, .content h1::before {
  content: "# ";
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 600;
}
.content h3 { font-size: 1.2rem; color: var(--accent-2); }

.content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(34, 211, 238, 0.35);
  transition: border-color 0.15s, color 0.15s;
  overflow-wrap: anywhere;
}
.content a:hover { color: #7de8f7; border-bottom-color: var(--accent); }

.content ul { padding-left: 1.3rem; }
.content li { margin: 0.35rem 0; }
.content li::marker { color: var(--accent); }

.content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: block;
}

.content blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 3px solid var(--accent-2);
  background: var(--bg-raised);
  border-radius: 0 8px 8px 0;
  color: var(--text-dim);
}

.content code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.1em 0.4em;
}
.content pre {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
}
.content pre code { background: none; border: 0; padding: 0; }

.content hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 3rem 0;
}

.mono { font-family: var(--mono); font-size: 0.9em; }

/* screenshot-links (webdesign) get a hover lift */
.content a:has(> img) {
  border-bottom: 0;
  display: block;
  transition: transform 0.2s;
}
.content a:has(> img):hover { transform: translateY(-3px); }
.content a:has(> img):hover img { border-color: var(--accent); }

/* ---------- home: link cards ---------- */

.page-home .content > ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.9rem;
}
.page-home .content > ul > li { margin: 0; }
.page-home .content > ul > li > a {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
  transition: transform 0.15s, border-color 0.15s;
}
.page-home .content > ul > li > a:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--accent);
}

/* Dienst-Icons, automatisch anhand des Link-Ziels */
.page-home .content > ul > li > a {
  /* Fallback: Pfeil für unbekannte Ziele */
  --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7h-2V6.4l-9.3 9.3-1.4-1.4L17.6 5H14V3zM5 5h5v2H7v10h10v-3h2v5H5V5z'/%3E%3C/svg%3E");
}
.page-home .content > ul > li > a[href^="mailto:"] {
  --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}
.page-home .content > ul > li > a[href*="youtube.com"],
.page-home .content > ul > li > a[href*="youtu.be"] {
  --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.5 6.2a3 3 0 0 0-2.1-2.1C19.5 3.5 12 3.5 12 3.5s-7.5 0-9.4.6A3 3 0 0 0 .5 6.2 31.4 31.4 0 0 0 0 12a31.4 31.4 0 0 0 .5 5.8 3 3 0 0 0 2.1 2.1c1.9.6 9.4.6 9.4.6s7.5 0 9.4-.6a3 3 0 0 0 2.1-2.1A31.4 31.4 0 0 0 24 12a31.4 31.4 0 0 0-.5-5.8zM9.5 15.5v-7l6.5 3.5-6.5 3.5z'/%3E%3C/svg%3E");
}
.page-home .content > ul > li > a[href*="github.com"] {
  --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61-.546-1.387-1.333-1.756-1.333-1.756-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E");
}
.page-home .content > ul > li > a[href*="blog."] {
  --icon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E");
}
.page-home .content > ul > li > a::before {
  content: "";
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  margin-right: 0.65em;
  vertical-align: -0.22em;
  background: var(--accent-2);
  -webkit-mask: var(--icon) no-repeat center / contain;
  mask: var(--icon) no-repeat center / contain;
  transition: background 0.15s;
}
.page-home .content > ul > li > a:hover::before { background: var(--accent); }

/* ---------- video embeds ---------- */

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 1.5rem 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 0 0 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-keys {
  display: flex;
  justify-content: center;
  height: 34px;
  margin-bottom: 1.5rem;
}
.footer-keys .key {
  width: 26px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  transition: background 0.2s;
}
.footer-keys .key.black {
  background: #060a10;
  height: 22px;
  width: 16px;
  margin: 0 -8px;
  z-index: 1;
  border-radius: 0 0 3px 3px;
}
.footer-keys .key:hover { background: var(--gradient); }

.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- responsive ---------- */

@media (max-width: 600px) {
  .nav { flex-direction: column; gap: 0.4rem; padding-bottom: 0.6rem; }
  .hero { min-height: 60vh; }
  /* auf schmalen Screens liegt der Text über dem Motiv → stärker abdunkeln */
  .hero-bg { filter: grayscale(30%) saturate(0.8) brightness(0.4) contrast(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-scroll { animation: none; }
  * { transition: none !important; }
}
