/* ============================================================
   chrismally.de — Bold Minimal One-Page, 3D Feld-Landschaft
   ============================================================ */

/* Self-hosted variable fonts (SIL Open Font License) */
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/unbounded-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
}

:root {
  --text: #1d2430;
  --text-soft: rgba(29, 36, 48, 0.72);
  --panel-bg: rgba(255, 255, 255, 0.8);
  --panel-border: rgba(255, 255, 255, 0.75);
  --accent: #b05f2a;
  --chip-bg: rgba(255, 255, 255, 0.55);
  --shadow: 0 20px 60px rgba(30, 40, 60, 0.14);
  --transition-theme: 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark {
  --text: #eef1fa;
  --text-soft: rgba(238, 241, 250, 0.72);
  --panel-bg: rgba(11, 15, 34, 0.76);
  --panel-border: rgba(255, 255, 255, 0.1);
  --accent: #d9a05b;
  --chip-bg: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* Alles findet in 100vw × 100vh statt */
}

body {
  font-family: "Space Grotesk", -apple-system, sans-serif;
  color: var(--text);
  transition: color var(--transition-theme);
  /* Shown while the 3D scene loads, and as a fallback without WebGL */
  background: linear-gradient(180deg, #4d9fe3 0%, #d9ecf6 46%, #8fbf5a 100%) fixed;
}

body.dark {
  background: linear-gradient(180deg, #02040c 0%, #141d45 55%, #0d1a12 100%) fixed;
}

/* ---------- 3D Canvas ---------- */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}

/* Soft cinematic vignette over the 3D scene */
.vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 80% at 50% 48%, transparent 58%, rgba(6, 12, 8, 0.36) 100%);
}

/* ---------- Header: time-of-day switch (Auto · Day · Night) ---------- */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  padding: 24px 28px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Optional live location (off by default) */
.geo-toggle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  /* slightly darkened glass: stays readable in front of a bright sky or the sun */
  background: rgba(16, 26, 20, 0.26);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s, color 0.3s, opacity 0.3s;
}

.geo-toggle svg { width: 20px; height: 20px; }
.geo-toggle:hover { background: rgba(255, 255, 255, 0.24); }

.geo-toggle[aria-pressed="true"] {
  background: #fff;
  color: #2a3524;
}

.geo-toggle.is-busy { opacity: 0.55; cursor: progress; }

.mode-switch {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 100px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(16, 26, 20, 0.26);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mode-switch button {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 0.3s, color 0.3s;
}

.mode-switch button[data-mode="auto"] { padding: 0 14px; }
.mode-switch button svg { width: 19px; height: 19px; }
.mode-switch button:hover { background: rgba(255, 255, 255, 0.22); }

.mode-switch button[aria-pressed="true"] {
  background: #fff;
  color: #2a3524;
}

/* ---------- Hero (Start-Ansicht) ---------- */
.hero {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  color: #fff;
  transition: opacity 0.5s, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dezenter Schatten hinter dem Text — hält die Schrift über den detailreichen Feldern lesbar */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 58% 46% at 50% 52%, rgba(12, 22, 10, 0.34), transparent 72%);
}

body.cv-open .hero {
  opacity: 0;
  transform: translateY(-40px) scale(0.98);
  pointer-events: none;
}

.hero-name {
  font-family: "Unbounded", sans-serif;
  font-weight: 900;
  font-size: clamp(3rem, 11vw, 8.5rem);
  line-height: 0.96;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 6px 50px rgba(20, 30, 20, 0.35);
  animation: fade-up 1.2s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-headline {
  font-size: clamp(0.8rem, 1.8vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 20px rgba(20, 30, 20, 0.4);
  animation: fade-up 1.2s 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* CTA + Socials */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 44px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fade-up 1.2s 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 34px;
  border-radius: 100px;
  border: 2px solid #fff;
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.12);
  transition: all 0.35s;
}

.cta svg {
  width: 19px;
  height: 19px;
  transition: transform 0.35s;
}

.cta:hover {
  background: #fff;
  color: #2a3524;
  transform: translateY(-3px) scale(1.03);
}

.cta:hover svg { transform: translateX(6px); }

.social {
  display: flex;
  gap: 10px;
}

.social a {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  transition: all 0.3s;
}

.social a:hover {
  transform: translateY(-4px);
  background: #fff;
  color: #2a3524;
  border-color: #fff;
}

.social svg { width: 20px; height: 20px; }

.hero-tagline {
  position: absolute;
  bottom: 58px;
  left: 0;
  right: 0;
  margin: 0;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 20px rgba(20, 30, 20, 0.4);
  animation: fade-up 1.2s 0.95s both;
}

.copyright {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.55);
  animation: fade-up 1.2s 1.1s both;
}

/* ---------- CV-Ansicht („neue Seite“) ---------- */
.cv-view {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transform: translateY(6vh);
  visibility: hidden;
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0s linear 0.55s;
}

body.cv-open .cv-view {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.15s,
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.15s,
              visibility 0s;
}

.cv-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 96px 20px 60px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: 100px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  transition: all 0.3s;
}

.back:hover { background: #fff; color: #2a3524; }
.back svg { width: 17px; height: 17px; transition: transform 0.3s; }
.back:hover svg { transform: translateX(-4px); }

/* ---------- Panels ---------- */
.panel {
  margin: 0 0 22px;
  padding: 44px 46px;
  border-radius: 30px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transition: background var(--transition-theme), border-color var(--transition-theme);
}

.panel h2 {
  font-family: "Unbounded", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 28px;
  transition: color var(--transition-theme);
}

/* ---------- Über mich ---------- */
.about-text {
  font-size: 1.18rem;
  font-weight: 400;
  line-height: 1.75;
  margin: 0 0 28px;
}

.competencies {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.competencies li {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 9px 18px;
  border-radius: 100px;
  background: var(--chip-bg);
  border: 1px solid var(--panel-border);
  transition: background var(--transition-theme), border-color var(--transition-theme);
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 26px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline > li {
  position: relative;
  padding-bottom: 34px;
}

.timeline > li:last-child { padding-bottom: 0; }

.timeline > li::before {
  content: "";
  position: absolute;
  left: -26.5px;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--panel-bg);
  transition: background var(--transition-theme);
}

.timeline .role {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.timeline .meta {
  font-size: 0.86rem;
  color: var(--text-soft);
  margin: 4px 0 10px;
  letter-spacing: 0.04em;
}

.timeline .meta .period { color: var(--accent); font-weight: 700; transition: color var(--transition-theme); }

.timeline ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.93rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-soft);
}

.education {
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--panel-border);
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text-soft);
}

.education strong { color: var(--text); font-weight: 700; }

.cv-linkedin-note {
  margin: 26px 0 0;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.cv-linkedin-note a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.cv-linkedin-note a:hover { text-decoration: underline; }

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--chip-bg);
  border: 1px solid var(--panel-border);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.3s, background var(--transition-theme), border-color var(--transition-theme);
}

.contact-card:hover { transform: translateY(-3px); }

.contact-card svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--accent);
  transition: color var(--transition-theme);
}

.contact-card .label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  display: block;
}

.contact-card .value {
  font-size: 0.93rem;
  font-weight: 500;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .panel {
    padding: 34px 26px;
    border-radius: 24px;
  }
  .cv-inner { padding: 88px 14px 40px; }
  .site-header { padding: 16px 18px; }
  .hero-tagline { bottom: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-name, .hero-headline, .hero-actions, .hero-tagline, .copyright { animation: none; }
  .hero, .cv-view { transition: none; }
}
