:root {
    --primary-color: #0a2540;
    --secondary-color: #0077cc;
    --background-light: #f8f9fa;
    --text-dark: #343a40;
    --text-light: #ffffff;
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
    
    /* New brand colors */
    --bg: #0f172a;          /* Dunkelblau / Hintergrund */
    --grad1: #0ea5e9;       /* Akzent (hell) */
    --grad2: #22d3ee;       /* Akzent (hell) */
    --text: #e5e7eb;        /* Text auf dunkel */
    --muted: #cbd5e1;       /* Untertitel */
    --btn: #22d3ee;         /* Primärbutton */
    --btnText: #0b1220;     /* Text auf Button */
    --ring: rgba(255,255,255,.25);
}

/* Subpage hero mapping (legacy .hero-subpage -> small hero style) */
.hero-subpage {
  position: relative;
  isolation: isolate;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(34,211,238,.25), transparent 60%),
              linear-gradient(135deg, var(--bg), #0b1220 60%);
  color: var(--text);
  padding: clamp(48px, 8vw, 80px) 0;
}
.hero-subpage h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 8px;
}
.hero-subpage p {
  font-size: clamp(14px, 2vw, 18px);
  margin-bottom: 0;
}

/* Swipe hint overlays (mobile) */
.swipe-hint {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.8);
  background: rgba(15,23,42,0.25);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 6px 10px;
  border-radius: 10px;
  z-index: 1200;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  transition: opacity .3s ease, transform .3s ease;
}
.swipe-hint span { font-size: 22px; line-height: 1; display: block; }
.swipe-hint--left { left: 8px; }
.swipe-hint--right { right: 8px; }
.swipe-hint.is-hidden { opacity: 0; transform: translateY(-50%) scale(0.95); }

@media (min-width: 901px) {
  .swipe-hint { display: none; }
}

/* Disable hover animations on touch devices for stability */
@media (hover: none) {
  .lang-switcher a:hover {
    background: transparent;
    transform: none;
  }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* Prevent accidental horizontal scrolling and improve long content wrapping */
    overflow-x: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Improve media responsiveness globally */
img, video, svg, canvas {
  max-width: 100%;
  height: auto;
}

/* Reduce highlight on mobile taps */
* {
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Utility: make text non-copyable when applied */
.no-copy {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Hero Section */
.hero {
  position: relative;
  isolation: isolate;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(34,211,238,.25), transparent 60%),
              linear-gradient(135deg, var(--bg), #0b1220 60%);
  color: var(--text);
  padding: clamp(64px, 12vw, 140px) 0;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--grad1), var(--grad2), transparent);
  opacity: .5;
}

.hero__container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero__content {
  max-width: 760px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--text);
}

.text-gradient {
  background: linear-gradient(90deg, #4f81ff, #4fceff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero p {
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 60ch;
}

.hero__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Small hero variant for inner pages */
.hero--small {
  padding: clamp(48px, 8vw, 80px) 0;
}

.hero--small h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 8px;
}

.hero--small p {
  font-size: clamp(14px, 2vw, 18px);
  margin-bottom: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px; /* slightly wider default */
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: .2s ease;
    cursor: pointer;
}

/* Map primary button utility for consistency with markup */
.btn-primary {
  background: linear-gradient(90deg, var(--grad1), var(--grad2));
  color: var(--btnText);
  box-shadow: 0 6px 24px rgba(34,211,238,.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(34,211,238,.35);
}

/* Large button size helper */
.btn-lg {
  padding: 14px 24px;
  font-size: 1rem;
}

.btn--primary {
  background: linear-gradient(90deg, var(--grad1), var(--grad2));
  color: var(--btnText);
  box-shadow: 0 6px 24px rgba(34,211,238,.25);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(34,211,238,.35);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--ring);
}

.btn--ghost:hover {
  background: rgba(255,255,255,.06);
}

/* Typography: headings use Poppins */
h1, h2, h3, h4, h5, h6, .section-title, .nav-logo {
    font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Paragraph readability */
p {
    max-width: 72ch;
    margin-left: auto;
    margin-right: auto;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* Accessibility: Skip link */
.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    left: 16px;
    top: 16px;
    width: auto;
    height: auto;
    padding: 10px 14px;
    background: #000;
    color: #fff;
    border-radius: 6px;
    z-index: 2000;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.main-nav {
    background-color: var(--bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--ring);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Sticky shadow when content scrolls under navbar */
.main-nav--scrolled {
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
    border-bottom-color: rgba(255,255,255,0.18);
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text);
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.4rem; /* increased desktop spacing */
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, background 0.2s ease;
    padding: 0.35rem 0.5rem; /* larger click area on desktop */
    border-radius: 8px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.nav-burger {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hide the bars icon and remove text label */
.nav-burger i { display: none !important; }
.nav-burger::after { content: ''; }

/* Language Switcher Styles */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 2rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.lang-switcher:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.lang-switcher a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem 0.7rem; /* larger tap target */
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    position: relative;
    cursor: pointer;
    min-width: 56px; /* wider for touch */
    justify-content: center;
}

.lang-switcher a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.lang-switcher a.lang-active {
    color: var(--secondary-color);
    background: transparent; /* flat look */
    font-weight: 600;
    font-size: 0.9rem; /* slightly larger than inactive (0.85rem) */
    box-shadow: none; /* remove glow */
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--secondary-color);
}

.lang-switcher a.lang-active:hover {
    background: transparent; /* keep flat */
    transform: none;
    color: var(--secondary-color);
}

/* Subtle dim for inactive language */
.lang-switcher a.lang-inactive {
    opacity: 0.85;
}

.lang-switcher span {
    color: var(--muted);
    opacity: 0.4;
    font-size: 0.8rem;
    margin: 0 0.2rem;
}

/* Sections & Cards */
.section {
    padding: 64px 0;
}

/* Clear separation between consecutive sections */
.section + .section {
    border-top: 2px solid rgba(10,37,64,0.12);
}

/* Alternate section background to separate blocks visually */
.section--alt {
    background: #fff;
}

/* Subtle tint for services section */
.section--tint {
    background: #f5f7fb;
}

/* Stronger divider utility */
.section--divider-strong {
    border-bottom: 2px solid rgba(10,37,64,0.12);
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 3rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 2.8rem 2.2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 18px 38px rgba(10,37,64,0.14);
    text-align: center;

}

.card .icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Services - feature list styling */
.service-features {
    list-style: none;
    padding: 0;
    margin: 14px 0 12px;
    text-align: left;
}
.service-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 6px 0;
    color: #334155;
}
.service-features li i {
    color: var(--secondary-color);
    margin-top: 3px;
}

/* Card link style */
.card-link {
    color: var(--secondary-color);
}

/* Section CTA alignment */
.section-cta { 
    text-align: left; 
    margin-top: 1.25rem; 
}
.section-cta .btn { border-radius: 999px; }

/* Compact Tech Stack Section */
#techstack {
    padding: 2.5rem 0;
    background: #f8fafc;
}

/* Scope titles inside techstack to avoid overriding global section titles */
#techstack .section-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0 0 0.75rem 0;
    text-align: center;
    font-weight: 600;
}

#techstack .section-subtitle {
    text-align: center;
    color: #64748b;
    max-width: 500px;
    margin: 0 auto 2rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.skills-groups {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.skills-group {
    background: #fff;
    border: 1px solid rgba(10,37,64,0.06);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 1.25rem 1rem;
    transition: all 0.2s ease;
}

.skills-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.skills-group-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 0.75rem 0;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 0.5rem;
}

.skills-group-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.skills-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    margin-top: 0.75rem;
    min-height: 60px; /* Ensure consistent height */
}

.skills-icons i {
  font-size: 2.1rem; /* slightly smaller for inline fit */
  transition: transform 0.2s ease;
  display: inline-flex; /* icon and label on the same line */
  align-items: center; /* vertically center icon and label */
  gap: 8px; /* space between icon and label */
}

.skills-icons i:hover {
    transform: scale(1.15);
}

/* Enhanced tech item blocks */
.skills-icons {
  gap: 1rem;
}
.skills-icons .skill {
  display: inline-flex;
  flex-direction: row; /* icon and text on the same line */
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px;
  min-width: 150px; /* wider to fit inline layout */
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(10,37,64,0.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  text-decoration: none; /* clickable tiles as links */
}
.skills-icons .skill:hover,
.skills-icons .skill:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0,0,0,0.08);
  border-color: var(--secondary-color);
  background: #ffffff;
}
.skills-icons .skill:focus-visible {
  outline: 3px solid rgba(34,211,238,.55);
  outline-offset: 2px;
}

/* Accessible tooltips driven by data-tooltip */
.skills-icons .skill[data-tooltip] {
  position: relative;
}
.skills-icons .skill[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  max-width: 220px;
  padding: 6px 8px;
  font-size: 12px;
  color: #0f172a;
  background: #e2e8f0;
  border: 1px solid rgba(15,23,42,.15);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
  white-space: normal;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.skills-icons .skill[data-tooltip]:hover::after,
.skills-icons .skill[data-tooltip]:focus-visible::after {
  opacity: 1;
}
.skills-icons .skill .label {
  font-size: 0.85rem;
  color: #334155;
  font-weight: 600;
  line-height: 1.2;
}
.skills-icons .skill .badge {
  font-size: 0.7rem;
  color: #0b1220;
  background: linear-gradient(90deg, var(--grad1), var(--grad2));
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1.6;
  margin-top: 2px;
}
.skills-icons .skill .badge.badge--core {
  box-shadow: 0 6px 18px rgba(34,211,238,.25);
  border: 1px solid rgba(34,211,238,.6);
}

/* Short helper text under each group */
.skills-note {
  margin: 6px 0 10px;
  color: #64748b;
  font-size: 0.92rem;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  word-break: break-word;
}

@media (max-width: 768px) {
  .skills-icons { justify-content: center; gap: 10px; }
  .skills-icons .skill {
    min-width: auto;
    width: 100%;
    flex: 0 0 100%;
    justify-content: flex-start; /* left-align icon + text */
    padding: 10px 12px;
  }
  .skills-icons i { font-size: 1.7rem; }
  .skills-icons .skill .label { font-size: 0.82rem; }
}

/* Two columns on larger phones/phablets */
@media (min-width: 480px) and (max-width: 768px) {
  .skills-icons {
    justify-content: space-between;
  }
  .skills-icons .skill {
    width: auto;
    flex: 0 0 calc(50% - 10px);
    justify-content: center; /* center content */
  }
  .skills-icons i { font-size: 1.8rem; }
}

/* Group badges above each category */
.group-badges { display: flex; gap: 8px; margin: 2px 0 8px; }
.group-badge {
  display: inline-block;
  font-size: 0.72rem;
  color: #0b1220;
  background: linear-gradient(90deg, var(--grad1), var(--grad2));
  padding: 3px 10px;
  border-radius: 999px;
  line-height: 1.6;
  box-shadow: 0 6px 14px rgba(34,211,238,.18);
}
.group-badge--alt {
  background: #e2e8f0;
  color: #0f172a;
  box-shadow: none;
}

/* Legend above the grid */
.skills-legend { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 8px 0 16px; }
.skills-legend .legend-label { font-size: 0.86rem; color: #475569; }

/* Responsive Breakpoints */
/* Desktop: 5 columns (default) */
.skills-groups {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.9rem;
    max-width: 1100px;
    padding: 0 1.25rem;
}

/* Laptops: 3 columns */
@media (max-width: 1200px) {
    .skills-groups {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.9rem;
        max-width: 900px;
    }
}

/* Tablets: 2 columns */
@media (max-width: 992px) {
    .skills-groups {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.9rem;
        padding: 0 1.25rem;
    }
    
    .skills-group {
        padding: 1.1rem 1rem;
    }

    /* Slightly larger buttons on tablets for better touch */
    .btn {
        padding: 13px 22px;
        font-size: 1rem;
    }
}

/* Mobile: 1 column */
@media (max-width: 768px) {
    #techstack {
        padding: 2rem 0;
    }
    
    .skills-groups {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
        padding: 0 1.25rem;
        gap: 0.8rem;
    }
    
    .section-title {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }
    
    .section-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
    
    .skills-group {
        padding: 1rem;
    }
    
    .skill-item {
        padding: 0.35rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* About Me Section */
.about-me-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-me-text {
    flex: 2;
}

.about-me-image {
    flex: 1;
    text-align: center;
}

.about-me-image img {
    max-width: 250px;
    width: 250px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--card-shadow);
}

/* Testimonials */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border: 1px solid rgba(10,37,64,0.06);
}

.testimonial-card .quote-mark {
    font-family: Georgia, serif;
    font-size: 3rem;
    line-height: 1;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.testimonial-text {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.testimonial-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-meta .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,119,204,0.1);
    color: var(--secondary-color);
    display: grid;
    place-items: center;
}

.testimonial-meta .name {
    font-weight: 600;
}

.testimonial-meta .role {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    border: 1px solid rgba(10,37,64,0.08);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.project-title {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

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

.tags { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    margin: 12px 0 8px; 
    list-style: none; 
    padding: 0;
}

.tag {
    background: rgba(0,119,204,0.08);
    color: var(--secondary-color);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
    border: 1px solid rgba(0,119,204,0.18);
}

.project-link { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    color: var(--primary-color); 
    font-weight: 600; 
    text-decoration: none; 
}

.project-link:hover { 
    text-decoration: underline; 
}

/* CTA band */
.cta-band { 
    background: linear-gradient(135deg, rgba(0,119,204,0.08), rgba(10,37,64,0.08));
    padding: 48px 0; 
    text-align: center; 
}

.cta-container { 
    max-width: 820px; 
    margin: 0 auto; 
}

.cta-title { 
    font-size: 2rem; 
    margin-bottom: 8px; 
}

.cta-text { 
    color: var(--text-muted); 
    margin-bottom: 18px; 
}

/* Responsive grids for new sections */
@media (max-width: 1024px) {
    /* Switch to burger menu on tablets to avoid wrapping/cut-off */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg);
        padding: 0.5rem 0;
        border-top: 1px solid var(--ring);
        text-align: center;
        gap: 0; /* tighter */
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-burger {
        display: block;
        font-size: 1.6rem;
    }

    /* Slightly reduce spacing for top nav items on tablet */
    .nav-links a {
        padding: 0.85rem 1rem;
        font-size: 1rem;
    }

    /* Tighter language switcher on tablet */
    .lang-switcher {
        margin-left: 1rem;
        padding: 0.3rem 0.5rem;
        gap: 0.2rem;
    }

    .lang-switcher a {
        min-width: 52px;
        font-size: 0.8rem;
        padding: 0.4rem 0.55rem;
    }

    .testimonial-grid, .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
    .testimonial-grid, .projects-grid { grid-template-columns: 1fr; }
}

/* Section CTA spacing */
.section-cta p { margin-bottom: 12px; }

/* Legal Card */
.legal-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 2.5rem 2rem;
    border: 1px solid rgba(0,0,0,0.05);
    max-width: 800px;
    margin: 4rem auto;
}

/* Footer */
footer {
  background-color: var(--bg);
  color: var(--text);
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--ring);
}

footer a {
  color: var(--text-light);
}

footer a:hover {
  color: var(--muted);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-content p {
    margin: 0;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-links a {
        margin: 0 0.5rem;
    }
}

footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-footer p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Footer links */
.main-footer .footer-link {
    color: var(--secondary-color);
    text-decoration: underline;
}
.main-footer .footer-link + .footer-link {
    margin-left: 10px;
}
.main-footer .footer-link:hover {
    color: #ffffff;
}

/* Animation: Fade-in on scroll */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Responsive */
/* --- Responsive Enhancements --- */
@media (max-width: 1024px) {
    .container {
        max-width: 98vw;
        padding: 0 10px;
    }
    .section {
        padding: 50px 0;
    }
    /* Center the Nachricht textarea container in the contact form on medium screens */
    .card form > div label[for='id_nachricht'] {
        display: block;
        text-align: center;
    }
    .card form > div label[for='id_nachricht'] + textarea {
        display: block;
        margin-left: auto;
        margin-right: auto;
        max-width: 350px;
        width: 100%;
    }
    /* Center the parent div as well */
    .card form > div:has(label[for='id_nachricht']) {
        display: block;
        margin-left: auto;
        margin-right: auto;
        max-width: 400px;
    }
}


@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg);
    padding: 0.5rem 0; /* tighter vertical padding */
    border-top: 1px solid var(--ring);
    text-align: center;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-burger {
    display: block;
    font-size: 1.7rem; /* larger touch target */
  }

  /* Mobile language switcher */
  .lang-switcher {
    margin-left: 1rem;
    margin-right: 0;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    gap: 0.2rem;
  }

  .lang-switcher a {
    font-size: 0.8rem;
    padding: 0.45rem 0.6rem;
    min-width: 52px;
  }

  .lang-switcher span {
    font-size: 0.7rem;
    margin: 0 0.1rem;
  }

  /* Larger tap targets for mobile menu links */
  .nav-links a {
    display: block;
    padding: 0.9rem 1.25rem;
    border-radius: 10px;
    font-size: 1rem;
  }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .section-title {
        font-size: 1.5rem;
    }
    .card {
        padding: 22px;
    }
    .about-me-content {
        flex-direction: column;
        gap: 24px;
    }
    .skills-list {
        gap: 8px;
    }
    .main-footer {
        padding: 22px 0;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 5px;
    }
    .card {
        padding: 12px;
        font-size: 0.97rem;
    }
    .btn {
        padding: 13px 20px; /* bigger buttons on phones */
        font-size: 1.05rem;
    }
    .section {
        padding: 30px 0;
    }
    .section-title {
        font-size: 1.2rem;
    }
    .main-footer {
        font-size: 0.85rem;
}

/* Add extra top padding on skills to separate from services */
#skills.section { padding-top: 84px; }

/* Benefits strip */
.benefit-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
}
.benefit-item {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 12px 10px;
    font-weight: 600;
    color: var(--primary-color);
}
.benefit-item i { color: var(--secondary-color); }

@media (max-width: 768px) {
    .benefit-list { grid-template-columns: 1fr; }
}

/* Process section */
.process-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 18px;
}
.step-card {
    background: #fff;
    border: 1px solid rgba(10,37,64,0.08);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}
.step-badge {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--secondary-color);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 8px;
}
.step-title { font-weight: 700; margin: 4px 0 6px; color: var(--primary-color); }
.step-text { color: var(--text-muted); }

@media (max-width: 900px) {
    .process-steps { grid-template-columns: 1fr; }
}

/* CTA banner */
.cta-banner {
    background: linear-gradient(0deg, rgba(10,37,64,0.06), rgba(10,37,64,0.06));
    padding: 56px 0 64px;
    margin-bottom: 2rem;
}
.cta-banner .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.cta-banner__content { max-width: 720px; }
.cta-title { font-size: 2rem; margin-bottom: 8px; color: var(--primary-color); }
.cta-subtitle { color: var(--text-muted); margin: 0; }

/* Make CTA primary button more prominent */
.cta-banner .btn.btn-primary {
  padding: 16px 28px;
  font-size: 1.06rem;
  border-radius: 12px;
  min-width: 240px;
}

@media (max-width: 768px) {
  .cta-banner .btn.btn-primary {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    display: inline-flex;
  }
}

@media (max-width: 768px) {
    .cta-banner .container { flex-direction: column; text-align: center; }
}

/* Mobile Bottom Navigation */
@media (max-width: 900px) {
  body.has-bottom-nav {
    padding-bottom: 68px; /* prevent content from being hidden under nav */
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: rgba(15,23,42,0.85);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.18);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    z-index: 1100;
  }

  .bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--muted);
    font-size: 13px; /* clearer label size */
    padding: 8px 6px; /* larger tap target */
    position: relative; /* allow active indicator */
    border-radius: 8px;
  }

  .bottom-nav__item .icon {
    font-size: 20px; /* slightly larger icon */
    line-height: 1;
  }

  .bottom-nav__item.is-active,
  .bottom-nav__item:hover {
    color: var(--text);
  }

  /* Stronger active styling for clarity */
  .bottom-nav__item.is-active {
    font-weight: 700;
    background: rgba(255,255,255,0.10);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
  }
  .bottom-nav__item.is-active .icon {
    color: var(--secondary-color);
  }
  /* Removed top indicator per request */
}

/* Style for required form field indicator */
.required {
  color: black;
  font-weight: bold;
  margin-left: 4px;
}
