/* ===== TOKENS ===== */
:root {
  --bg:           #09090f;
  --bg-card:      #111119;
  --border:       rgba(255, 255, 255, 0.07);
  --border-hover: rgba(129, 140, 248, 0.45);
  --accent:       #818cf8;
  --accent-glow:  rgba(129, 140, 248, 0.12);
  --accent-pill:  rgba(129, 140, 248, 0.12);
  --accent-pill-border: rgba(129, 140, 248, 0.22);
  --text:         #e2e8f0;
  --text-muted:   #94a3b8;
  --text-dim:     #64748b;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --radius:       12px;
  --max-w:        820px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

/* ===== NAV ===== */
header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(9, 9, 15, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

nav {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  opacity: 1;
  transition: opacity 0.2s;
}

.nav-logo img {
  height: 26px;
  width: auto;
}

.nav-logo:hover { opacity: 0.8; }

.nav-links {
  display: flex;
  gap: 2rem;
}

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

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

/* ===== SECTION BASE ===== */
section {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 5rem 1.5rem;
}

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

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ===== HERO ===== */
#hero {
  position: relative;
  padding-top: 11rem;
  padding-bottom: 6rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse at 50% 30%, rgba(129, 140, 248, 0.13) 0%, transparent 65%);
  pointer-events: none;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-content { flex: 1; min-width: 0; }

.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: 0 0 40px rgba(129, 140, 248, 0.12);
  display: block;
}

@media (max-width: 640px) {
  .hero-layout { flex-direction: column-reverse; gap: 2rem; }
  .hero-photo img { width: 120px; height: 120px; }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

h1 {
  font-size: clamp(2.4rem, 7vw, 3.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 0.75rem;
}

.gradient-text {
  background: linear-gradient(135deg, #818cf8 20%, #a78bfa 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 0.975rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.75;
  margin-bottom: 2.25rem;
}

.hero-cta {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1.35rem;
  border-radius: 8px;
  background: var(--accent);
  color: #07071A;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1.35rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ===== PRINZIPIEN ===== */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.principle-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  background-image: linear-gradient(135deg, rgba(129,140,248,0.05) 0%, transparent 50%);
  transition: border-color 0.2s, transform 0.2s;
}

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

.principle-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.principle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-pill);
  border: 1px solid var(--accent-pill-border);
  color: var(--accent);
  box-shadow: 0 0 16px rgba(129, 140, 248, 0.1);
}

.principle-num { display: none; }

.principle-card h3 {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.principle-card p {
  font-size: 0.845rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ===== SKILLS ===== */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tech-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: default;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.tech-item:hover {
  border-color: var(--border-hover);
  background: rgba(129, 140, 248, 0.05);
  transform: translateY(-2px);
}

.tech-icon {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  object-position: center;
}

.tech-item span { display: none; }

/* ===== TAGS (project cards) ===== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tags span {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-pill);
  color: var(--accent);
  border: 1px solid var(--accent-pill-border);
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.project-card {
  display: block;
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

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

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
}

.project-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
}

.project-stars {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.project-header svg {
  color: var(--text-dim);
  flex-shrink: 0;
  transition: color 0.2s;
}

.project-card:hover .project-header svg { color: var(--accent); }

.project-card p {
  font-size: 0.855rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-card .tags span { font-size: 0.75rem; }

.all-repos-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.all-repos-link:hover { color: var(--accent); }

/* ===== CONTACT ===== */
#contact { text-align: center; }

.contact-inner h2 {
  font-size: 2rem;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.contact-inner p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  max-width: 400px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.imprint-toggle {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.imprint-toggle:hover { color: var(--text-muted); }

/* ===== IMPRESSUM OVERLAY ===== */
.imprint-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow-y: auto;
  padding: 3rem 1.25rem;
}

.imprint-overlay.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.imprint-panel {
  position: relative;
  background: #0f0f1a;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2.75rem;
  max-width: 560px;
  width: 100%;
  margin: auto;
}

.imprint-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.imprint-panel h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}

.imprint-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.imprint-close:hover {
  border-color: rgba(255,255,255,0.15);
  color: var(--text);
}

.imprint-body {
  display: grid;
  gap: 1.5rem;
}

.imprint-section {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
}

.imprint-section h3 {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  padding-top: 0.05rem;
}

.imprint-section p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.imprint-section a {
  color: var(--accent);
  text-decoration: none;
}

.imprint-section a:hover { text-decoration: underline; }

.imprint-note {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.6;
}

@media (max-width: 500px) {
  .imprint-panel { padding: 1.75rem 1.25rem; }
  .imprint-section { grid-template-columns: 1fr; gap: 0.15rem; }
  .imprint-section h3 { color: var(--text-dim); }
}

/* ===== SCROLL FADE-IN ===== */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  nav { padding: 0.875rem 1rem; }
  .nav-links { gap: 1.5rem; }

  #hero {
    padding-top: 8.5rem;
    padding-bottom: 4rem;
  }

  section { padding: 4rem 1rem; }

  .contact-inner h2 { font-size: 1.6rem; }
}
