/* ============================================================
   henrikrasch.de — modern dark portfolio
   ============================================================ */

:root {
  --bg: #07090f;
  --bg-soft: #0c0f18;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e8ecf4;
  --text-dim: #97a0b5;
  --accent: #5eead4;
  --accent-2: #818cf8;
  --gradient: linear-gradient(120deg, #5eead4, #818cf8 60%, #e879f9);
  --radius: 18px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(94, 234, 212, 0.3); }

.accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- background layers ---------- */

#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.aurora {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 35% at 20% 25%, rgba(94, 234, 212, 0.10), transparent 70%),
    radial-gradient(35% 35% at 80% 20%, rgba(129, 140, 248, 0.12), transparent 70%),
    radial-gradient(45% 40% at 60% 85%, rgba(232, 121, 249, 0.07), transparent 70%);
  animation: aurora-drift 24s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.08); }
}

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

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1.25rem, 5vw, 4rem);
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(7, 9, 15, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav__logo {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.nav__links {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
}

.nav__links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav__links a:hover { color: var(--text); }

.lang-toggle {
  display: flex;
  gap: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: border-color 0.2s;
}

.lang-toggle:hover { border-color: var(--accent); }
.lang-toggle__opt.is-active { color: var(--accent); font-weight: 600; }
.lang-toggle__sep { opacity: 0.4; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 clamp(1.5rem, 8vw, 8rem);
}

.hero__kicker {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.hero__title {
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.hero__sub {
  margin-top: 1.4rem;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 500;
  color: var(--text-dim);
}

.typed { font-weight: 700; margin-left: 0.45rem; }

.typed-cursor {
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
  font-weight: 400;
}

@keyframes blink { 50% { opacity: 0; } }

.hero__lead {
  margin-top: 1.4rem;
  max-width: 38rem;
  color: var(--text-dim);
  font-size: 1.05rem;
}

.hero__cta { margin-top: 2.4rem; display: flex; gap: 1rem; flex-wrap: wrap; }

.hero__scroll {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 44px;
  border: 2px solid var(--border);
  border-radius: 14px;
  display: flex;
  justify-content: center;
}

.hero__scroll-dot {
  width: 4px;
  height: 8px;
  margin-top: 8px;
  border-radius: 4px;
  background: var(--accent);
  animation: scroll-dot 1.8s ease-in-out infinite;
}

@keyframes scroll-dot {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(16px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn--primary {
  background: var(--gradient);
  color: #06070b;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(94, 234, 212, 0.28);
}

.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.btn--ghost:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.btn--lg { padding: 1rem 2.2rem; font-size: 1.05rem; }

/* ---------- sections ---------- */

.section {
  position: relative;
  z-index: 1;
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 8rem) clamp(1.5rem, 5vw, 3rem);
}

.section__title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 2.4rem;
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
}

.section__num {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--accent);
}

.section__intro { color: var(--text-dim); margin-bottom: 2rem; max-width: 40rem; }

/* ---------- about ---------- */

.about__text {
  max-width: 44rem;
  color: var(--text-dim);
  font-size: 1.08rem;
}

.about__text + .about__text { margin-top: 1.2rem; }

.about__stats {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.stat__value, .stat__plus {
  font-size: 2.4rem;
  font-weight: 800;
  font-family: var(--mono);
}

.stat__label {
  display: block;
  margin-top: 0.4rem;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ---------- expertise cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  transition: border-color 0.25s, background 0.25s;
  will-change: transform;
}

.card:hover {
  border-color: rgba(94, 234, 212, 0.45);
  background: var(--surface-hover);
}

.card__icon { font-size: 1.9rem; margin-bottom: 1rem; }

.card h3 { font-size: 1.12rem; margin-bottom: 0.6rem; letter-spacing: -0.01em; }

.card p { color: var(--text-dim); font-size: 0.96rem; }

/* ---------- tags / stack ---------- */

.tags { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.tag {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
  cursor: default;
}

.tag:hover {
  color: var(--accent);
  border-color: rgba(94, 234, 212, 0.5);
  transform: translateY(-2px);
}

.edu {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.8rem;
  max-width: 32rem;
}

.edu__icon { font-size: 1.8rem; }
.edu h3 { font-size: 1rem; margin-bottom: 0.15rem; }
.edu p { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- contact ---------- */

.section--contact { text-align: center; }
.section--contact .section__title { justify-content: center; }

.contact__lead {
  color: var(--text-dim);
  max-width: 36rem;
  margin: 0 auto 2.4rem;
  font-size: 1.08rem;
}

.contact__actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

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

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.5rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.88rem;
}

.footer__note { margin-top: 0.3rem; opacity: 0.7; font-size: 0.8rem; }

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

@media (max-width: 640px) {
  .nav__links { display: none; }
  .hero { padding-top: 5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aurora, .hero__scroll-dot, .typed-cursor { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
