/* ═══════════════════════════════════════════
   ALESSANDRO HACKER
   ═══════════════════════════════════════════ */

:root {
  --bg:    #000000;
  --ink:   #ffffff;
  --mono:  'IBM Plex Mono', monospace;
  --serif: 'Instrument Serif', serif;
  --ease:  cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body { height: 100%; }

body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--ink);
  cursor: none;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}

body.is-loaded { opacity: 1; }

/* ─── Grain: sichtbar verstärkt ─── */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 100;
  opacity: 0.10;           /* deutlich sichtbarer */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grain-shift 0.15s steps(2) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-3px,2px); }
  50%  { transform: translate(2px,-3px); }
  75%  { transform: translate(-1px,3px); }
  100% { transform: translate(3px,-1px); }
}

/* ─── Cursor ─── */
#cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  transition: width 0.25s var(--ease), height 0.25s var(--ease);
  /* Cursor auf Mobile verstecken — kein Touch-Cursor nötig */
}

#cursor.is-hover {
  width: 36px;
  height: 36px;
}

@media (hover: none) {
  /* Auf Touch-Geräten keinen custom Cursor */
  #cursor { display: none; }
  body { cursor: auto; }
}

/* ─── Stage: Split-Layout ─── */
.stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

/* ─── Hintergrund-Layer ─── */
.bg-layer {
  position: fixed;
  inset: 0;
  background: #000000;
  opacity: 0;
  z-index: 0; /* hinter allem */
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}

.bg-layer.is-active {
  opacity: 1; /* sehr subtil — nur ein Hauch */
}

/* Stage und Left über dem Layer */
.stage { position: relative; z-index: 1; }

/* ─── Linke Spalte ─── */
.left {
  padding: 5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  animation: fade-in 0.9s 0.1s var(--ease) both;
}

.id-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tagline {
  font-size: 0.58rem;
  color: var(--ink);
  letter-spacing: 0.04em;
  line-height: 1.8;
  margin-top: 0.1rem;
}

/* Name: sehr klein, Serif */
.name {
  font-family: var(--serif);
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.2;
}

.role {
  font-size: 0.58rem;
  color: var(--ink);         /* voll schwarz */
  letter-spacing: 0.06em;
  line-height: 1.8;
  margin-top: 0.2rem;
}

.contact {
  font-size: 0.58rem;
  color: var(--ink);         /* voll schwarz */
  text-decoration: none;
  line-height: 1.8;
  display: inline-block;
  position: relative;
}

/* Unterstrich-Animation bei Hover */
.contact::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width 0.3s var(--ease);
}

.contact:hover::after { width: 50px; }

/* ─── Disziplinen ─── */
.disciplines {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.slot-item {
  font-size: 0.58rem;
  color: var(--ink);         /* voll schwarz */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 2.2;
  cursor: none;
  animation: fade-in 0.5s calc(0.3s + var(--i) * 0.06s) var(--ease) both;
}

.slot-word { display: inline-block; }

/* Monospace damit Buchstaben beim Rollieren nicht springen */
.slot-char {
  display: inline-block;
  font-family: var(--mono);
}

/* ─── Rechte Spalte: Bild zentriert ─── */
.right {
  display: flex;
  align-items:center;
  justify-content: right;
  height: 100vh;
  animation: fade-in 1s 0.4s var(--ease) both;
  margin-right: 50px;
}

.image-wrap {
  width: 280px;
  height: 420px;
  position: relative;
  flex-shrink: 0;
}

.hero-image {
  width: 280px;
  height: 420px;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.6s var(--ease);
}

/* Hover: minimale Reaktion, kein Glitch */
.image-wrap:hover .hero-image {
  filter: grayscale(60%);
}

/* ─── Uhrzeit ─── */
.clock {
  position: fixed;
  bottom: 1.2rem;
  right: 4rem;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  color: var(--ink);         /* voll schwarz */
  z-index: 51;
  font-variant-numeric: tabular-nums;
}

/* ─── Footer ─── */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  padding: 1.2rem 4rem;
  z-index: 50;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.55rem;
  color: var(--ink);         /* voll schwarz */
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: opacity 0.2s;
}

.footer-links a:hover { opacity: 0.5; }

/* ─── Legal Pages ─── */
.legal-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 8rem 2rem 6rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.legal-page .back {
  font-size: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.2s;
}

.legal-page .back:hover { opacity: 0.5; }

.legal-page h1 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
}

.legal-page h2 {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

.legal-page section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.legal-page p {
  font-size: 0.6rem;
  line-height: 1;
  opacity: 0.6;
}

/* ─── Animationen ─── */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ════════════════════════════════════════════
   RESPONSIVE — MOBILE
   ════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* Auf Mobile: untereinander statt nebeneinander */
  .stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    min-height: 100vh;
    align-items: start;
  }

  .left {
    padding: 5rem 2rem 2rem;
    gap: 2.5rem;
    /* Text zuerst */
    order: 1;
  }

  .right {
    height: auto;
    padding: 0 2rem 6rem;
    justify-content: flex-start; /* linksbündig auf Mobile */
    order: 2;
  }

  .image-wrap {
    width: 160px;   /* kleiner auf Mobile */
    height: 240px;
  }

  .hero-image {
    width: 160px;
    height: 240px;
  }

  /* Uhrzeit und Footer auf Mobile näher zusammen */
  .clock {
    right: 2rem;
    bottom: 1rem;
  }

  .site-footer {
    padding: 0.8rem 2rem;
  }

  /* Name auf Mobile etwas größer lesbar */
  .name {
    font-size: 1rem;
  }
}

@media (max-width: 400px) {
  .left {
    padding: 4.5rem 1.5rem 2rem;
  }

  .right {
    padding: 0 1.5rem 5rem;
  }

  .footer-links {
    gap: 1rem;
  }
}