@import url('https://fonts.googleapis.com/css2?family=Clash+Display:wght@400;500;600;700&family=Satoshi:wght@300;400;500;700&family=JetBrains+Mono:wght@300;400;500&display=swap');

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

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9f7;
  --bg-card: #ffffff;
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #888888;
  --accent-primary: #0a3d2f;
  --accent-hover: #0f5a45;
  --accent-light: #1a8c6f;
  --accent-pale: #e6f0eb;
  --border-subtle: rgba(10, 61, 47, 0.08);
  --border-medium: rgba(10, 61, 47, 0.18);
  --shadow-sm: 0 4px 12px rgba(10, 61, 47, 0.06);
  --shadow-md: 0 10px 30px rgba(10, 61, 47, 0.08);
  --shadow-lg: 0 20px 50px rgba(10, 61, 47, 0.12);

  --font-display: 'Clash Display', sans-serif;
  --font-body: 'Satoshi', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --pad: clamp(1.8rem, 6vw, 7rem);
  --nav-h: 76px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.75;
  overflow-x: hidden;
  cursor: none;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.6s ease;
}
.loader {
  width: 48px; height: 48px;
  border: 5px solid var(--accent-pale);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Cursor */
#cursor {
  position: fixed; width: 10px; height: 10px;
  background: var(--accent-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width .4s, height .4s;
}
#cursor-trail {
  position: fixed; width: 38px; height: 38px;
  border: 1.5px solid var(--accent-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  opacity: 0.6;
  transition: all .4s var(--ease);
}
body.hovering #cursor { width: 20px; height: 20px; }
body.hovering #cursor-trail { 
  width: 60px; height: 60px; 
  border-color: var(--accent-light); 
  opacity: 0.9; 
}

/* Navigation */
nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  transition: all .4s;
}
nav.solid {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-primary);
  letter-spacing: .12em;
  text-decoration: none;
  font-weight: 500;
}
.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: .06em;
  position: relative;
  transition: color .3s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent-primary);
  transition: width .4s var(--ease);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-primary) !important;
  border: 1px solid var(--border-medium);
  padding: .4rem 1.1rem;
  border-radius: 6px;
  transition: all .3s;
}
.nav-cta:hover {
  background: var(--accent-primary);
  color: white !important;
  border-color: var(--accent-primary);
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--accent-primary);
  transition: all 0.3s var(--ease);
}

/* Hero */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 6rem) var(--pad) 6rem;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 70px 70px;
  opacity: 0.65;
  animation: gridShift 28s linear infinite;
}
@keyframes gridShift {
  from { background-position: 0 0; }
  to { background-position: 70px 70px; }
}
.hero-glow {
  position: absolute;
  width: 900px; height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-pale) 0%, transparent 70%);
  top: -250px; right: -250px;
  pointer-events: none;
  animation: float 10s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-40px, 40px) scale(1.04); }
}

.hero-eyebrow, .hero-h1, .hero-desc, .hero-actions {
  opacity: 0;
  animation: up .9s var(--ease) forwards;
}
.hero-eyebrow { animation-delay: .1s; }
.hero-h1 { animation-delay: .25s; }
.hero-desc { animation-delay: .4s; }
.hero-actions { animation-delay: .55s; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-primary);
  letter-spacing: .18em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1.8rem;
}
.hero-eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  animation: blink 2.5s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.35} }

.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(4.2rem, 11vw, 10rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: 2.2rem;
}
.hero-h1 .outline {
  -webkit-text-stroke: 2px var(--text-secondary);
  color: transparent;
}
.hero-h1 .accent { color: var(--accent-primary); }

.hero-desc {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 3rem;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--accent-primary);
  color: white;
  font-family: var(--font-mono);
  font-size: 12.8px;
  font-weight: 500;
  letter-spacing: .07em;
  padding: 1.05rem 2.6rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all .4s var(--ease);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.btn-ghost {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-secondary);
  letter-spacing: .07em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: color .3s;
}
.btn-ghost:hover { color: var(--text-primary); }

/* Sections */
.section {
  padding: clamp(6rem, 10vw, 10rem) var(--pad);
  border-top: 1px solid var(--border-subtle);
  position: relative;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-primary);
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--accent-primary);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 4rem;
}
.section-title em {
  font-style: italic;
  color: var(--accent-primary);
  font-weight: 300;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.on { opacity: 1; transform: none; }

/* Projects - verbessert */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.2rem;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2.8rem 2.2rem;
  transition: all .5s var(--ease);
  height: 100%;
}
.project-card:hover {
  transform: translateY(-12px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg);
}
.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 1.1rem;
  color: var(--text-primary);
}
.project-card p {
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 2rem;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 3rem 2.4rem;
  border-radius: 12px;
  transition: all .5s var(--ease);
}
.service-card:hover {
  transform: translateY(-14px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg);
}
.service-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent-primary);
  letter-spacing: .12em;
  margin-bottom: 1.6rem;
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  margin-bottom: 1rem;
}
.service-card p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.85;
}

/* About */
.about-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 7.5rem;
  align-items: start;
}
.about-text p {
  font-size: 15.5px;
  color: var(--text-secondary);
  margin-bottom: 1.4rem;
  line-height: 1.9;
}
.about-text strong { color: var(--text-primary); font-weight: 500; }
.about-quote {
  margin-top: 2.5rem;
  padding: 1.5rem 1.8rem;
  border-left: 3px solid var(--accent-primary);
  background: var(--accent-pale);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
.facts { display: flex; flex-direction: column; }
.fact {
  display: flex;
  justify-content: space-between;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--border-subtle);
}
.fact:first-child { border-top: 1px solid var(--border-subtle); }
.fact-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  letter-spacing: .07em;
}
.fact-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
}

/* Stack */
.stack-groups { display: flex; flex-direction: column; gap: 3rem; }
.group-name {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-primary);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  font-weight: 500;
}
.group-name::before {
  content:'';
  width:20px;
  height:1px;
  background: var(--accent-light);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}
.tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: .45rem 1rem;
  border-radius: 6px;
  transition: all .35s var(--ease);
}
.tag:hover {
  background: var(--accent-pale);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-4px) scale(1.03);
}

/* Kontakt */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7rem;
  align-items: start;
}
.contact-big {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.8vw, 2.8rem);
  font-weight: 500;
  color: var(--accent-primary);
  text-decoration: none;
  display: inline-block;
  margin: 1.5rem 0 2.5rem;
  position: relative;
  transition: color .3s ease;
}
.contact-big:hover {
  color: var(--accent-hover);
}
.contact-big::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width .4s var(--ease);
}
.contact-big:hover::after {
  width: 100%;
}

.contact-links-col {
  display: flex;
  flex-direction: column;
}
.clink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  transition: padding-left .4s var(--ease);
}
.clink:first-child { border-top: 1px solid var(--border-subtle); }
.clink:hover { padding-left: .8rem; }

.clink-name {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: .07em;
  transition: color .3s;
}
.clink:hover .clink-name { color: var(--text-primary); }

.clink-arr { 
  color: var(--text-muted); 
  font-size: 15px; 
  transition: all .3s; 
}
.clink:hover .clink-arr { 
  color: var(--accent-primary); 
  transform: translate(4px, -4px); 
}

/* Footer */
footer {
  padding: 3rem var(--pad) 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}
.footer-links a {
  margin-left: 1.8rem;
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--accent-primary); }

/* Animations */
@keyframes up {
  from { opacity:0; transform:translateY(40px); }
  to { opacity:1; transform:none; }
}

/* Responsive */
@media (max-width: 900px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 70%;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform .5s var(--ease);
    z-index: 550;
  }
  .nav-links.active { transform: translateX(0); }
  .about-layout, .contact-wrap { 
    grid-template-columns: 1fr; 
    gap: 4rem; 
  }
  #cursor, #cursor-trail { display: none; }
  body { cursor: auto; }
}
/* Hover Overlay */
.project-hover {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-primary);
  opacity: 0;
  transform: translateY(10px);
  transition: all .3s var(--ease);
}

.project-card:hover .project-hover {
  opacity: 1;
  transform: translateY(0);
}

/* Modal */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;

  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  border: 1px solid var(--border-subtle);

  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);

  font-size: 16px;
  color: var(--text-secondary);

  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.modal-close:hover {
  background: var(--accent-primary);
  color: white;
  transform: rotate(90deg) scale(1.05);
  border-color: var(--accent-primary);
}
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  position: relative;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-primary);
}
.status.online { color: green; }
.status.offline { color: red; }