:root {
  --bg: #0a0a0a;
  --bg-alt: #131313;
  --bg-card: #161616;
  --red: #e6293e;
  --red-bright: #ff3b4e;
  --red-dim: #7a1420;
  --text: #ededed;
  --text-dim: #9a9a9a;
  --text-faint: #5c5c5c;
  --border: #262626;
  --mono: 'ui-monospace', 'SFMono-Regular', Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M4 2 L4 20 L9 15 L12 21 L15 19.5 L12 13.5 L19 13.5 Z' fill='rgb(237,237,237)' stroke='rgb(230,41,62)' stroke-width='1.5' stroke-linejoin='round'/></svg>") 4 2, auto;
}

a, button {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M4 2 L4 20 L9 15 L12 21 L15 19.5 L12 13.5 L19 13.5 Z' fill='rgb(230,41,62)' stroke='rgb(237,237,237)' stroke-width='1.5' stroke-linejoin='round'/></svg>") 4 2, pointer;
}

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

::selection {
  background: var(--red);
  color: #fff;
}

/* Layout */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  line-height: 0;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}

.logo:hover {
  opacity: 1;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--text);
  border-bottom-color: var(--red);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 4px;
  font-size: 1.1rem;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }
  .nav-list {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-list.open {
    max-height: 320px;
  }
  .nav-list li {
    border-top: 1px solid var(--border);
  }
  .nav-list a {
    display: block;
    padding: 14px 24px;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  padding-bottom: 72px;
}

.hero-plain {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.08;
  color: var(--text);
  font-weight: 400;
  margin: 0;
  max-width: 14ch;
  text-align: left;
}

.play-game-link {
  display: inline-block;
  margin-top: 16px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--text-faint);
  text-align: left;
}

.play-game-link:hover {
  color: var(--red-bright);
}

.hero.game-mode {
  cursor: none;
}

.game-score {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 1.05rem;
  color: var(--red-bright);
  display: none;
  pointer-events: none;
}

.game-score.show {
  display: block;
}

.game-hint {
  position: absolute;
  top: 48px;
  right: 24px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  display: none;
  pointer-events: none;
  text-align: right;
}

.game-hint.show {
  display: block;
}

.center-msg {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(5, 5, 5, 0.55);
}

.center-msg.show {
  display: flex;
}

.center-msg-title {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--red-bright);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.center-msg-score {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 18px;
}

.center-msg-hint {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}

.highscore-entry {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.highscore-entry.show {
  display: flex;
}

.highscore-entry label {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--red-bright);
}

.highscore-entry input {
  width: 90px;
  text-align: center;
  font-family: var(--mono);
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  background: var(--bg-card);
  border: 1px solid var(--red);
  color: var(--text);
  border-radius: 4px;
  padding: 8px 4px 8px 10px;
}

.highscore-entry input:focus {
  outline: none;
  border-color: var(--red-bright);
}

.highscore-table {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 18px;
  min-width: 160px;
}

.highscore-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 3px 0;
}

.upgrade-choice {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(5, 5, 5, 0.72);
}

.upgrade-choice.show {
  display: flex;
}

.upgrade-choice-title {
  font-family: var(--mono);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--red-bright);
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.upgrade-cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 20px;
}

.upgrade-card {
  width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--red);
  border-radius: 6px;
  padding: 20px 16px;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.upgrade-card:hover {
  border-color: var(--red-bright);
  transform: translateY(-2px);
}

.upgrade-card-title {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 8px;
}

.upgrade-card-desc {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--text-faint);
  line-height: 1.4;
}

#molecule-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.hero-content .wrap {
  pointer-events: auto;
}


/* Sections / content pages */
.page-header {
  padding: 64px 0 32px;
  border-bottom: 1px solid var(--border);
}

.page-header .kicker {
  font-family: var(--mono);
  color: var(--red);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.page-header h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.page-header .lede {
  color: var(--text-dim);
  max-width: 62ch;
  margin: 0;
}

.section {
  padding: 56px 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

/* Über mich */
.bio-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.bio-photo {
  width: 260px;
  flex: none;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  filter: grayscale(0.15);
}

@media (max-width: 720px) {
  .bio-layout {
    flex-direction: column;
  }
  .bio-photo {
    width: 100%;
    max-width: 320px;
  }
}

.bio {
  max-width: 68ch;
  font-size: 1.05rem;
  color: var(--text-dim);
}

.bio p {
  margin: 0 0 18px;
}

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

.footnote-link {
  display: inline-block;
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-faint);
}

.footnote-link:hover {
  color: var(--text-dim);
  border-bottom-color: var(--text-dim);
}

.subcategory {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.subcategory span {
  color: var(--text-faint);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.8rem;
}

.subcategory-block + .subcategory-block {
  margin-top: 48px;
}

.legal-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.legal-col .lang-label {
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 820px) {
  .legal-columns {
    grid-template-columns: 1fr;
  }
  .legal-col + .legal-col {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
  }
}

.disclaimer {
  border-left: 2px solid var(--red);
  background: var(--bg-card);
  padding: 14px 18px;
  margin: 0 0 18px;
  font-size: 0.85rem;
  color: var(--text-dim);
  border-radius: 0 4px 4px 0;
}

/* Musik table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}

table.tracks {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.tracks th {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

table.tracks td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}

table.tracks tr:last-child td {
  border-bottom: none;
}

table.tracks tr:hover td {
  background: rgba(230, 41, 62, 0.04);
  color: var(--text);
}

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-faint);
}

.dl-link {
  color: var(--red);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.85rem;
  white-space: nowrap;
}

.dl-link:hover {
  color: var(--red-bright);
  text-decoration: underline;
}

.placeholder-note {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* Publications */
.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.pub-item {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
}

.pub-item .pub-year {
  font-family: var(--mono);
  color: var(--red);
  font-size: 0.78rem;
}

.pub-item h3 {
  margin: 6px 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
}

.pub-item h3 a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.pub-item h3 a:hover {
  color: var(--red-bright);
  border-bottom-color: var(--red);
}

.pub-item p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Photography grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.photo-link {
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: grayscale(0.1);
}

.photo-link:hover .photo-thumb {
  transform: scale(1.04);
  filter: grayscale(0);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(5, 5, 5, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  border-color: var(--red);
  color: var(--red-bright);
}

body.lightbox-locked {
  overflow: hidden;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Konami easter egg overlay */
#konami-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
}

#konami-message {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: var(--bg-card);
  border: 1px solid var(--red);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

#konami-message.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Tools / calculators */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.tool-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  padding: 24px;
}

.tool-card h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.tool-card .tool-desc {
  color: var(--text-faint);
  font-size: 0.85rem;
  margin: 0 0 20px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}

.field input {
  width: 100%;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 9px 10px;
  font-family: var(--sans);
  font-size: 0.95rem;
}

.field input:focus {
  outline: none;
  border-color: var(--red);
}

.tool-results {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.92rem;
}

.result-row .result-label {
  color: var(--text-dim);
}

.result-row .result-value {
  font-family: var(--mono);
  color: var(--text);
}

.result-row.primary .result-value {
  color: var(--red-bright);
  font-size: 1.1rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
