
:root {
  --bg: #050d1d;
  --bg-soft: #0d1a34;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.1);
  --text: #f4f7fb;
  --text-soft: #b7c0d4;
  --primary: #73a9ff;
  --primary-strong: #94bdff;
  --accent: #79f0c4;
  --accent-soft: rgba(121, 240, 196, 0.15);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  --radius: 22px;
  --container: 1150px;
}
body.light-mode {
  --bg: #f4f7fb;
  --bg-soft: #e9eef8;
  --card: rgba(255, 255, 255, 0.9);
  --card-border: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --text-soft: #475569;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.12);
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(115, 169, 255, 0.2), transparent 26%),
    radial-gradient(circle at top right, rgba(121, 240, 196, 0.14), transparent 22%),
    linear-gradient(180deg, #071020 0%, #050d1d 100%);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}
body.light-mode {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 26%),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.10), transparent 22%),
    #f4f7fb;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(92%, var(--container)); margin: 0 auto; }

.header {
  position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(18px);
  background: rgba(5, 13, 29, 0.68); border-bottom: 1px solid var(--card-border);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
body.light-mode .header { background: rgba(244, 247, 251, 0.78); }

.nav {
  min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white; font-weight: 800; font-size: 1rem; box-shadow: var(--shadow);
}
.nav-menu { display: flex; gap: 24px; align-items: center; }
.nav-menu a { color: var(--text-soft); font-weight: 500; transition: 0.2s ease; }
.nav-menu a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.theme-toggle, .menu-toggle {
  border: 1px solid var(--card-border); background: var(--card); color: var(--text);
  width: 44px; height: 44px; border-radius: 12px; cursor: pointer; font-size: 1rem;
}
.menu-toggle { display: none; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 95px 0 60px;
}
.hero-background::before,
.hero-background::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  pointer-events: none;
}
.hero-background::before {
  width: 260px; height: 260px; top: 30px; left: -40px;
  background: rgba(115, 169, 255, 0.18);
}
.hero-background::after {
  width: 320px; height: 320px; right: -60px; top: 0;
  background: rgba(121, 240, 196, 0.14);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
.eyebrow {
  color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.82rem; margin-bottom: 14px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 999px; background: var(--accent-soft);
  border: 1px solid var(--card-border); margin-bottom: 18px; color: var(--text);
  font-weight: 700;
}
.hero-text h1 {
  font-size: clamp(2.5rem, 5vw, 4.9rem); line-height: 1.02; margin-bottom: 14px; font-weight: 800;
}
.hero-text h1 span {
  background: linear-gradient(135deg, var(--primary-strong), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-text h2 {
  font-size: clamp(1rem, 2vw, 1.35rem); color: var(--text-soft); font-weight: 500;
  margin-bottom: 18px; max-width: 700px;
}
.typing-line {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 1.05rem;
}
.typing-prefix { color: var(--text); font-weight: 700; }
.typing-text { color: var(--accent); font-weight: 700; }
.typing-cursor { font-weight: 700; animation: blink 0.9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-description {
  max-width: 700px; color: var(--text-soft); margin-bottom: 28px; font-size: 1.02rem;
}
.hero-buttons, .social-buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-buttons { margin-bottom: 16px; }
.social-buttons { margin-bottom: 30px; }
.btn, .social-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 14px; font-weight: 700; transition: 0.25s ease;
  border: none; cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #08111f; }
.btn-primary:hover, .social-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-secondary, .social-btn { background: var(--card); border: 1px solid var(--card-border); color: var(--text); }
.github-btn { background: linear-gradient(135deg, rgba(115,169,255,.16), rgba(255,255,255,.05)); }
.linkedin-btn { background: linear-gradient(135deg, rgba(16, 119, 255, 0.18), rgba(255,255,255,.05)); }

.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-card, .card, .project-card, .profile-card, .contact-form, .timeline-content {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stat-card {
  padding: 18px; position: relative; overflow: hidden;
}
.stat-card::after {
  content: ""; position: absolute; inset: auto -20px -20px auto; width: 80px; height: 80px;
  border-radius: 50%; background: rgba(255,255,255,0.04);
}
.stat-icon { font-size: 1.1rem; color: var(--accent); margin-bottom: 8px; }
.stat-card strong { display: block; margin-bottom: 6px; font-size: 1rem; }
.stat-card span { color: var(--text-soft); font-size: 0.95rem; }

.profile-card { padding: 30px; position: relative; }
.premium-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(115,169,255,0.35), rgba(121,240,196,0.35));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.profile-glow {
  position: absolute; width: 180px; height: 180px; right: -30px; top: -20px;
  border-radius: 50%; background: rgba(121, 240, 196, 0.12); filter: blur(35px);
}
.profile-image {
  width: 210px; height: 210px; border-radius: 32px; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--primary), var(--accent)); position: relative; z-index: 1;
}
.real-image { overflow: hidden; padding: 0; }
.real-image img { width: 100%; height: 100%; object-fit: cover; }
.profile-card h3 { font-size: 1.9rem; margin-bottom: 10px; position: relative; z-index: 1; }
.profile-card p { color: var(--text-soft); margin-bottom: 16px; position: relative; z-index: 1; }
.quick-info { list-style: none; display: grid; gap: 12px; color: var(--text-soft); position: relative; z-index: 1; }
.quick-info li { display: flex; align-items: center; gap: 10px; }
.quick-info i { color: var(--accent); min-width: 18px; }

.section { padding: 90px 0; }
.alt-section { background: rgba(255,255,255,0.02); }
body.light-mode .alt-section { background: rgba(15,23,42,0.03); }
.section-title { margin-bottom: 34px; }
.section-title h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }

.about-grid, .projects-grid, .contact-grid, .why-grid { display: grid; gap: 22px; }
.about-grid { grid-template-columns: repeat(3, 1fr); }
.card { padding: 24px; }
.card-top-icon {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 14px;
}
.card h3 { margin-bottom: 10px; font-size: 1.2rem; }
.card p { color: var(--text-soft); }

.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.skill-box {
  padding: 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--card-border);
  text-align: center; font-weight: 700; color: var(--text); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.skill-box i { color: var(--accent); }

.projects-grid { grid-template-columns: repeat(3, 1fr); }
.project-card { padding: 24px; transition: transform 0.25s ease; }
.project-card:hover { transform: translateY(-6px); }
.project-tag {
  display: inline-block; margin-bottom: 12px; padding: 6px 10px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 700; background: rgba(115,169,255,0.16); color: var(--primary-strong);
}
.project-pro { position: relative; overflow: hidden; }
.project-pro::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.project-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.project-header h3 { font-size: 1.35rem; line-height: 1.2; }
.project-location {
  padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-border); font-size: 0.85rem; color: var(--text-soft); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
}
.project-role { color: var(--text-soft); margin-bottom: 18px; min-height: 88px; }
.project-details { display: grid; gap: 12px; margin-bottom: 18px; }
.project-details div {
  display: flex; flex-direction: column; gap: 4px; padding: 12px 14px;
  background: rgba(255,255,255,0.03); border-radius: 14px; border: 1px solid var(--card-border);
}
.project-details strong { font-size: 0.85rem; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.project-details span { color: var(--text); font-size: 0.96rem; }
.project-tech { display: flex; flex-wrap: wrap; gap: 10px; }
.project-tech span {
  padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-border); font-size: 0.85rem;
}

.why-grid { grid-template-columns: repeat(4, 1fr); }
.why-card h3 { margin-bottom: 12px; }

.timeline {
  position: relative; margin-top: 10px; padding-left: 18px; border-left: 2px solid var(--card-border);
  display: grid; gap: 24px;
}
.timeline-item { position: relative; }
.timeline-dot {
  position: absolute; left: -28px; top: 24px; width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.timeline-content { padding: 22px; }
.timeline-content h3 { margin-bottom: 6px; }
.timeline-meta { color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.timeline-content p:last-child { color: var(--text-soft); }

.resume-actions { margin-top: 28px; }
.contact-grid { grid-template-columns: 0.95fr 1.05fr; }
.contact-form { padding: 24px; display: grid; gap: 14px; }
.contact-form input, .contact-form textarea {
  width: 100%; border: 1px solid var(--card-border); background: rgba(255,255,255,0.03);
  color: var(--text); border-radius: 14px; padding: 14px 16px; font: inherit; outline: none;
}
body.light-mode .contact-form input, body.light-mode .contact-form textarea { background: rgba(15,23,42,0.03); }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary); }

.footer { padding: 26px 0; border-top: 1px solid var(--card-border); color: var(--text-soft); transition: opacity 0.8s ease, transform 0.8s ease; }
.footer-content { display: flex; justify-content: space-between; gap: 18px; align-items: center; }

.fade-in { opacity: 0; transform: translateY(24px); transition: all 0.7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Terminal Intro */
body.intro-active { overflow: hidden; }
.intro-screen {
  position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center;
  background:
    radial-gradient(circle at top left, rgba(115, 169, 255, 0.18), transparent 24%),
    radial-gradient(circle at bottom right, rgba(121, 240, 196, 0.12), transparent 24%),
    linear-gradient(180deg, #020816 0%, #040c1a 100%);
  opacity: 1; visibility: visible;
  transition: opacity 0.7s ease, visibility 0.7s ease, transform 0.7s ease;
}
.intro-screen.hide { opacity: 0; visibility: hidden; transform: translateY(-18px); }
.intro-noise {
  position: absolute; inset: 0; opacity: 0.04;
  background-image:
    linear-gradient(rgba(255,255,255,0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 42px 42px; pointer-events: none;
}
.intro-terminal {
  position: relative; width: min(760px, 92vw); border-radius: 22px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(5, 12, 25, 0.88);
  box-shadow: 0 30px 90px rgba(0,0,0,0.45), 0 0 80px rgba(115, 169, 255, 0.08);
  backdrop-filter: blur(18px);
}
.terminal-topbar {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03);
}
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.terminal-title {
  margin-left: 10px; color: rgba(255,255,255,0.65); font-size: 0.92rem; letter-spacing: 0.04em;
}
.terminal-body {
  padding: 28px 24px 30px; font-family: Consolas, "Courier New", monospace; color: #dbeafe; min-height: 270px;
}
.terminal-line {
  opacity: 0; transform: translateY(6px); margin-bottom: 14px; white-space: nowrap;
  overflow: hidden; width: 0; border-right: 2px solid transparent;
}
.terminal-line.show {
  opacity: 1; transform: translateY(0); animation: terminalTyping 0.95s steps(28, end) forwards;
}
.terminal-line.show.fast { animation-duration: 0.7s; }
.terminal-line.show.slow { animation-duration: 1.15s; }
.terminal-highlight { color: #79f0c4; font-weight: 700; }
.prompt { color: #79f0c4; margin-right: 10px; }

@keyframes terminalTyping {
  from { width: 0; border-right-color: #79f0c4; }
  to { width: 100%; border-right-color: transparent; }
}

#mainContent { transition: opacity 0.8s ease, transform 0.8s ease; }
body.intro-active #mainContent,
body.intro-active .header,
body.intro-active .footer { opacity: 0; transform: translateY(10px); }
body:not(.intro-active) #mainContent,
body:not(.intro-active) .header,
body:not(.intro-active) .footer { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .projects-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .hero-grid, .about-grid, .contact-grid, .skills-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .menu-toggle { display: inline-grid; place-items: center; }
  .nav-menu {
    position: absolute; top: 80px; right: 4%; width: min(260px, 92vw); background: var(--bg-soft);
    border: 1px solid var(--card-border); border-radius: 18px; padding: 18px; display: none;
    flex-direction: column; align-items: flex-start; box-shadow: var(--shadow);
  }
  .nav-menu.show { display: flex; }
  .hero-grid, .about-grid, .projects-grid, .contact-grid, .skills-grid, .why-grid { grid-template-columns: 1fr; }
  .section { padding: 75px 0; }
  .hero { padding-top: 70px; }
  .footer-content { flex-direction: column; align-items: flex-start; }
  .profile-image { width: 160px; height: 160px; }
  .project-header { flex-direction: column; }
  .project-role { min-height: auto; }
  .typing-line { align-items: flex-start; flex-wrap: wrap; }
  .terminal-body { min-height: 240px; padding: 24px 16px 26px; font-size: 0.9rem; }
  .terminal-line { white-space: normal; }
}


/* Profilkarte Feinschliff */
.profile-card {
  min-height: 100%;
}

.profile-image {
  width: 220px;
  height: 220px;
  border-radius: 30px;
  display: block;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}

.real-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.quick-info {
  margin-top: 10px;
  gap: 14px;
}

.quick-info li {
  display: grid;
  grid-template-columns: 20px 95px 1fr;
  align-items: start;
  column-gap: 12px;
  row-gap: 2px;
}

.quick-info i {
  margin-top: 3px;
}

.info-label {
  font-weight: 700;
  color: var(--text);
}

.info-value {
  color: var(--text-soft);
  line-height: 1.45;
}

@media (max-width: 760px) {
  .profile-image {
    width: 170px;
    height: 170px;
  }

  .quick-info li {
    grid-template-columns: 20px 88px 1fr;
  }
}


/* Gleichmässige Ausrichtung Profilinfos */
.quick-info li {
  grid-template-columns: 20px 110px 1fr !important;
}

.info-label {
  display: inline-block;
  min-width: 110px;
}

.info-value {
  padding-left: 4px;
}

@media (max-width: 760px) {
  .quick-info li {
    grid-template-columns: 20px 96px 1fr !important;
  }
}

/* Private Projekte */
.private-projects-heading {
  margin-top: 42px;
  margin-bottom: 18px;
  font-size: 1.35rem;
}

.private-projects-subtext {
  color: var(--text-soft);
  margin-bottom: 22px;
  max-width: 780px;
}

.project-notes {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border);
  color: var(--text-soft);
}

.project-notes strong {
  color: var(--text);
}

.project-pro.private-project::before {
  background: linear-gradient(90deg, #8b5cf6, var(--accent));
}


/* Schöneres Layout für Privatprojekt */
.private-project-layout {
  display: block;
}

.private-project-wide {
  width: 100%;
  max-width: 100%;
}

.project-header-clean {
  margin-bottom: 18px;
}

.private-project-intro {
  color: var(--text-soft);
  margin-top: 12px;
  max-width: 900px;
  font-size: 1.02rem;
}

.private-project-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: start;
}

.private-project-side {
  display: grid;
  gap: 18px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.project-actions .btn {
  width: fit-content;
}

.project-card.private-project .project-tech {
  margin-top: 4px;
}

.project-card.private-project .project-tech span {
  background: rgba(139, 92, 246, 0.10);
}

@media (max-width: 980px) {
  .private-project-grid {
    grid-template-columns: 1fr;
  }
}


.form-status {
  min-height: 24px;
  color: var(--accent);
  font-size: 0.95rem;
}
.contact-form button[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}


/* Zusätzliche Mobile-Optimierung für iPhone / Android */
html, body {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

input, textarea, button {
  font: inherit;
}

textarea,
input[type="text"],
input[type="email"] {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 16px;
}

@media (max-width: 640px) {
  .container {
    width: min(94%, var(--container));
  }

  .header .nav {
    min-height: 72px;
  }

  .hero {
    padding: 76px 0 34px;
  }

  .hero-text h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .hero-text h2,
  .hero-description,
  .private-project-intro,
  .private-projects-subtext {
    font-size: 0.98rem;
  }

  .hero-buttons,
  .social-buttons,
  .project-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .social-btn,
  .project-actions .btn {
    width: 100%;
    min-height: 52px;
  }

  .hero-stats,
  .about-grid,
  .projects-grid,
  .why-grid,
  .skills-grid,
  .contact-grid,
  .private-project-grid {
    grid-template-columns: 1fr !important;
  }

  .profile-card,
  .card,
  .project-card,
  .timeline-content,
  .contact-form {
    padding: 20px;
  }

  .profile-image {
    width: 150px;
    height: 150px;
    border-radius: 24px;
  }

  .quick-info li {
    grid-template-columns: 18px 84px 1fr !important;
    column-gap: 10px;
  }

  .section {
    padding: 64px 0;
  }

  .section-title {
    margin-bottom: 24px;
  }

  .section-title h2 {
    font-size: clamp(1.7rem, 7vw, 2.2rem);
  }

  .project-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-location {
    white-space: normal;
  }

  .project-role {
    min-height: auto;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 14px;
    font-size: 16px;
  }

  .contact-form textarea {
    min-height: 140px;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .terminal-body {
    min-height: 210px;
    font-size: 0.86rem;
  }

  .terminal-line {
    white-space: normal;
  }
}


.contact-direct-card h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.contact-direct-card p {
  color: var(--text-soft);
}

.direct-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
  margin-bottom: 18px;
}

.direct-contact-note {
  margin-top: 4px;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .direct-contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .direct-contact-actions .btn {
    width: 100%;
  }
}
