/* ===== Variables ===== */
:root {
  --navy:       #0d1b2a;
  --navy-mid:   #1a2f45;
  --blue:       #1a78c4;
  --blue-light: #3a98e4;
  --orange:     #f47c20;
  --orange-lt:  #ff9a4a;
  --white:      #ffffff;
  --light:      #f0f4f8;
  --text:       #1e2d3d;
  --muted:      #5c7080;
  --border:     #dde3ea;
  --font-mono:  'JetBrains Mono', 'Courier New', monospace;
  --font-sans:  'Inter', system-ui, sans-serif;
  --radius:     0.75rem;
  --shadow:     0 4px 24px rgba(13,27,42,0.10);
  --shadow-md:  0 8px 40px rgba(13,27,42,0.18);
  --ease:       0.2s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== Language visibility ===== */
html[lang="en"] .lang-de { display: none !important; }
html[lang="de"] .lang-en { display: none !important; }

/* ===== Utilities ===== */
.container { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--blue);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}
.section-title--light { color: var(--white); }

.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 580px;
  line-height: 1.7;
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  padding: 0.85em 2.1em;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease);
}
.btn-primary:hover { background: var(--orange-lt); transform: translateY(-2px); }

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--white);
  padding: 0.85em 2.1em;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid rgba(255,255,255,0.35);
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), transform var(--ease);
}
.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

/* ===== Dot-grid texture ===== */
.dot-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(26,120,196,0.16) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* ===== NAV ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 1.5rem;
  transition: box-shadow var(--ease);
}
#navbar.scrolled { box-shadow: 0 2px 20px rgba(13,27,42,0.12); }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}
.nav-brand img { width: 34px; height: 34px; }
.nav-brand-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  white-space: nowrap;
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 2rem;
}
.nav-center a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--ease);
}
.nav-center a:hover { color: var(--navy); }

.nav-lang {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 0.4rem;
  padding: 0.45em 1em;
  cursor: pointer;
  transition: background var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-lang:hover { background: var(--blue); }

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 1.5rem 5rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero-inner { position: relative; max-width: 720px; }

.hero-logo {
  width: clamp(110px, 17vw, 175px);
  margin: 0 auto 2rem;
  border-radius: 1.25rem;
  filter: drop-shadow(0 6px 28px rgba(26,120,196,0.45));
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--blue-light);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2.2vw, 1.1rem);
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.2rem;
  letter-spacing: 0.02em;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: rgba(255,255,255,0.65);
  margin-bottom: 2.5rem;
  line-height: 1.75;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

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

/* ===== ABOUT ===== */
#about {
  padding: 6rem 1.5rem;
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 860px;
  margin: 0 auto;
}

.about-photo {
  width: clamp(120px, 18vw, 175px);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-md);
  border: 4px solid var(--white);
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.about-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

.about-role {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--blue);
  font-weight: 500;
  margin-bottom: 1.4rem;
  letter-spacing: 0.04em;
}

.about-desc {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
}

.about-desc + .about-desc {
  margin-top: 1rem;
}

/* ===== SERVICES ===== */
#services {
  padding: 6rem 1.5rem;
  background: var(--light);
}

.services-header {
  text-align: center;
  margin-bottom: 3rem;
}
.services-header .section-sub { margin: 0 auto; }

.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  max-width: 1080px;
  margin: 0 auto;
}

.service-card {
  flex: 0 0 calc(33.333% - 0.84rem);
  min-width: 280px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--blue);
  transition: transform var(--ease), box-shadow var(--ease);
  cursor: pointer;
  position: relative;
}
.service-card:nth-child(even) { border-left-color: var(--orange); }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.service-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
}

.service-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

.service-detail {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.75;
}
.service-card.expanded .service-detail { display: block; }

.service-toggle {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--blue);
  font-weight: 600;
  margin-top: 0.9rem;
  letter-spacing: 0.02em;
}
.service-card:nth-child(even) .service-toggle { color: var(--orange); }

/* ===== PROJECTS ===== */
#projects {
  padding: 6rem 1.5rem;
  background: var(--white);
}

.projects-header {
  text-align: center;
  margin-bottom: 3rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  max-width: 1080px;
  margin: 0 auto;
}

.project-card {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease);
  background: var(--white);
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.project-header {
  padding: 1.6rem;
  cursor: pointer;
}

.project-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--orange);
  background: rgba(244,124,32,0.08);
  border: 1px solid rgba(244,124,32,0.22);
  padding: 0.2em 0.7em;
  border-radius: 0.3rem;
  margin-bottom: 0.8rem;
  letter-spacing: 0.04em;
}

.project-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.45rem;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

.project-expand {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue);
  margin-top: 0.9rem;
  letter-spacing: 0.02em;
}

.project-details {
  display: none;
  padding: 0 1.6rem 1.6rem;
  border-top: 1px solid var(--border);
  margin-top: 0;
}
.project-card.expanded .project-details { display: block; }

.project-details img {
  width: 100%;
  border-radius: 0.5rem;
  margin: 1rem 0;
  object-fit: cover;
}

.project-details .detail-overview {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.project-details ul {
  padding-left: 1.1rem;
  list-style: disc;
}
.project-details li {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 0.35rem;
}

/* ===== CONTACT ===== */
#contact {
  padding: 6rem 1.5rem;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}

.contact-inner {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.contact-inner .section-label { color: var(--blue-light); }
.contact-inner .section-sub {
  color: rgba(255,255,255,0.55);
  margin: 0 auto 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: left;
}

.contact-form input,
.contact-form textarea {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 0.5rem;
  padding: 0.85em 1.1em;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--white);
  width: 100%;
  transition: border-color var(--ease), background var(--ease);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255,255,255,0.35); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(255,255,255,0.1);
}
.contact-form textarea { resize: vertical; min-height: 110px; }

.contact-form .btn-primary { width: 100%; margin-top: 0.25rem; }
.contact-form .btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.contact-status {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  min-height: 1.4em;
}
.contact-status.success { color: #4ade80; }
.contact-status.error   { color: #f87171; }

/* ===== FOOTER ===== */
footer {
  background: #081220;
  color: rgba(255,255,255,0.35);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  padding: 0;
  transition: color var(--ease);
}
.footer-links button:hover { color: var(--white); }

/* ===== OVERLAY PAGES ===== */
.overlay-page {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 200;
  overflow-y: auto;
  padding: 2.5rem 1.5rem 4rem;
}
.overlay-page.active { display: block; }

.overlay-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 2.5rem;
  transition: color var(--ease);
}
.overlay-back:hover { color: var(--navy); }

.overlay-content {
  max-width: 760px;
  margin: 0 auto;
}
.overlay-content h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}
.overlay-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 2rem 0 0.5rem;
}
.overlay-content p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}
.overlay-content ul {
  padding-left: 1.25rem;
  list-style: disc;
  margin-bottom: 1rem;
}
.overlay-content li {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 0.35rem;
}
.overlay-content strong { color: var(--navy); font-weight: 600; }

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .about-photo { margin: 0 auto; }
  .nav-center { display: none; }
  .nav-brand-name { display: none; }
  footer { flex-direction: column; text-align: center; align-items: center; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .btn-primary, .btn-outline { width: 100%; text-align: center; }
}
