: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);
}

* {
    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.75;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 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(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  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;
}

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

.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;
}

.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: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

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

/* 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: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    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.5rem 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);
}

.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);
    font-weight: 600;
    text-decoration: none;
}
.card-link:hover { text-decoration: underline; }

/* 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;
}

.section-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0 0 0.75rem 0;
    text-align: center;
    font-weight: 600;
}

.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-chips {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0 0;
}

.skill-item {
    background: #f8fafc;
    border: 1px solid rgba(10,37,64,0.08);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.15s ease;
    text-align: center;
}

.skill-item:hover {
    background: rgba(0,119,204,0.08);
    border-color: var(--secondary-color);
    transform: translateY(-1px);
}

/* 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;
    }
}

/* 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;
    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) {
    .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: 1rem 0;
    border-top: 1px solid var(--ring);
    text-align: center;
  }

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

  .nav-burger {
    display: block;
  }
    .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: 11px 18px;
        font-size: 1rem;
    }
    .section {
        padding: 30px 0;
    }
    .section-title {
        font-size: 1.2rem;
    }
    .main-footer {
        font-size: 0.85rem;
    }
}

/* Hamburger menu hidden by default */
.nav-burger {
    display: none;
}

/* Extra breathing room for Services on homepage */
#services.section {
    padding-top: 88px;
    padding-bottom: 96px;
}

/* 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; }

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