/* ===================================
   The Coding Cortex – Styles
   Papercraft/Clay Design System
   =================================== */

/* CSS Variables */
:root {
  /* Colors */
  --yellow: #FFB300;
  --teal: #36C3F2;
  --coral: #FB6C6C;
  --purple: #3B2E5A;
  --beige: #F8EBD7;
  --neon: #00F0FF;
  --navy: #1b2138;
  --navy-2: #111627;

  /* Typography */
  --font-headline: 'Baloo 2', 'Comic Sans MS', cursive;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --section-padding: 160px;
  --section-padding-mobile: 80px;
  --container-max: 1200px;

  /* Effects */
  --card-radius: 24px;
  --btn-radius: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--beige);
  background: var(--navy-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
}

.lead {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  line-height: 1.7;
  margin-bottom: 1.5em;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 2.5rem);
}

/* Utility Classes */
.papercraft-card {
  border-radius: var(--card-radius);
  background: #0f1426;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 10px 28px rgba(0, 0, 0, 0.28);
}

.bevel {
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25) inset;
}

.glow-cyan {
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.35));
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--btn-radius);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  transition: all var(--transition);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25) inset;
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  outline: 3px solid var(--neon);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--yellow) 0%, #ff9f00 100%);
  color: var(--navy-2);
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.25) inset,
    0 8px 20px rgba(255, 179, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.25) inset,
    0 12px 28px rgba(255, 179, 0, 0.4);
}

.btn-secondary {
  background: rgba(54, 195, 242, 0.15);
  color: var(--teal);
  border: 2px solid var(--teal);
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.15) inset,
    0 0 20px rgba(54, 195, 242, 0.2);
}

.btn-secondary:hover {
  background: rgba(54, 195, 242, 0.25);
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.15) inset,
    0 0 28px rgba(54, 195, 242, 0.35);
}

/* Header / Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 22, 39, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1rem clamp(1.5rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo-text {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-slogan {
  font-size: 0.6rem;
  font-weight: 500;
  color: white;
  letter-spacing: 0.05em;
  font-family: var(--font-body);
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
  position: relative;
}

.nav-menu a:hover {
  color: var(--teal);
}

.nav-menu a:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 4px;
  border-radius: 4px;
}

.nav-cta {
  padding: 8px 20px;
  background: rgba(54, 195, 242, 0.15);
  border: 1px solid var(--teal);
  border-radius: 12px;
  color: var(--teal) !important;
  transition: all var(--transition);
}

.nav-cta:hover {
  background: rgba(54, 195, 242, 0.25);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  position: relative;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--beige);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: background var(--transition);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--beige);
  left: 0;
  transition: transform var(--transition);
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
}

.hero-content {
  text-align: center;
  padding: 2rem;
  z-index: 1;
}


.hero-title {
  color: var(--beige);
  margin-bottom: 0.5rem;
  text-shadow:
    0 4px 12px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(255, 179, 0, 0.2);
}

.hero-claim {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--beige);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  opacity: 0.9;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  font-weight: 600;
  letter-spacing: 0.05em;
}

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

.hero-cta .btn {
  opacity: 0.5;
}

.hero-cta .btn:hover {
  opacity: 1;
}


/* About Section */
.about {
  padding: var(--section-padding) 0;
  background: var(--navy);
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

.about-image img {
  border-radius: var(--card-radius);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.about-content h2 {
  color: var(--yellow);
  margin-bottom: 1rem;
}

.about-bullets {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2.5rem;
}

.about-bullets li {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.bullet-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 179, 0, 0.1);
  border-radius: 16px;
  border: 2px solid rgba(255, 179, 0, 0.2);
}

.about-bullets h3 {
  color: var(--beige);
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.about-bullets p {
  color: rgba(248, 235, 215, 0.75);
  font-size: 0.95rem;
}

/* Skills Section */
.skills {
  padding: var(--section-padding) 0;
  background: var(--navy-2);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section-header h2 {
  color: var(--teal);
  margin-bottom: 0.5rem;
}

.section-header p {
  font-size: 1.125rem;
  color: rgba(248, 235, 215, 0.7);
}

.skills-workflow {
  margin-bottom: 0;
  position: relative;
}

.workflow-board {
  border-radius: var(--card-radius) var(--card-radius) 0 0;
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Cortex Skills Card - Integrated with workflow board */
.cortex-skills-card {
  margin-top: -2px;
}

.skills-card {
  width: 100%;
  color: var(--beige);
  background: rgba(17, 24, 38, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(54, 195, 242, 0.15);
  border-top: 2px solid rgba(123, 220, 255, 0.3);
  border-radius: 0 0 var(--card-radius) var(--card-radius);
  padding: clamp(24px, 4vw, 40px);
  box-shadow:
    0 10px 22px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(123, 220, 255, 0.1);
  position: relative;
  isolation: isolate;
}

.skills-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123, 220, 255, 0.5) 50%, transparent);
  pointer-events: none;
}

.skills-card h2 {
  margin: 0 0 1rem 0;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  font-weight: 700;
  letter-spacing: .2px;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-shadow: 0 0 12px rgba(123,220,255,.15);
}

.skills-card h2 span {
  background: linear-gradient(90deg, #7bdcff, #b2f5ea 60%, #e6fbff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skills-card p {
  margin: 0;
  line-height: 1.7;
  font-size: clamp(.95rem, 2.2vw, 1.05rem);
  color: rgba(248, 235, 215, 0.8);
}

.skills-card strong {
  color: var(--teal);
  font-weight: 600;
}


/* Projects Section */
.projects {
  padding: var(--section-padding) 0;
  background: var(--navy);
  position: relative;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 2.5rem;
}

.project-card {
  background: #0f1426;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 10px 28px rgba(0, 0, 0, 0.28);
  transition: all var(--transition);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 20px 48px rgba(0, 0, 0, 0.4);
}

.card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.project-card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 2rem;
}

.card-content h3 {
  color: var(--yellow);
  margin-bottom: 0.75rem;
}

.card-content p {
  color: rgba(248, 235, 215, 0.75);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.card-link {
  color: var(--teal);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap var(--transition);
}

.card-link:hover {
  gap: 0.75rem;
}

.card-link:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 4px;
  border-radius: 4px;
}


/* Blog Section */
.blog {
  padding: var(--section-padding) 0;
  background: var(--navy-2);
}

.blog-header-image {
  margin-bottom: 4rem;
}

.blog-header-image img {
  border-radius: var(--card-radius);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 2.5rem;
}

.blog-card {
  padding: 2rem;
  background: rgba(248, 235, 215, 0.03);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--transition);
}

.blog-card:hover {
  background: rgba(248, 235, 215, 0.06);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.blog-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: rgba(248, 235, 215, 0.6);
}

.blog-category {
  padding: 4px 12px;
  background: rgba(54, 195, 242, 0.15);
  border-radius: 8px;
  color: var(--teal);
  font-weight: 600;
}

.blog-card h3 {
  color: var(--beige);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.blog-card p {
  color: rgba(248, 235, 215, 0.7);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.blog-link {
  color: var(--coral);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap var(--transition);
}

.blog-link:hover {
  gap: 0.75rem;
}

.blog-link:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Contact Section */
.contact {
  padding: var(--section-padding) 0;
  background: var(--navy);
  position: relative;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

.contact-visual img {
  border-radius: var(--card-radius);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.period-block {
  display: block;
}

.contact-content h2 {
  color: var(--coral);
  margin-bottom: 1rem;
}

.contact-cta {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.contact-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  color: rgba(248, 235, 215, 0.6);
  font-size: 0.9rem;
}

.contact-links a {
  color: var(--teal);
  font-weight: 500;
  transition: color var(--transition);
}

.contact-links a:hover {
  color: var(--neon);
}

.contact-links a:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 4px;
  border-radius: 4px;
}

.contact-links .divider {
  opacity: 0.3;
}


/* Footer */
.site-footer {
  background: var(--navy-2);
  padding-top: 0;
  padding-bottom: 3rem;
}

.footer-divider {
  width: 100%;
  margin-bottom: 2rem;
}

.footer-divider img {
  width: 100%;
  height: auto;
  opacity: 0.6;
}

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

.footer-copyright {
  color: rgba(248, 235, 215, 0.5);
  font-size: 0.9rem;
}

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

.footer-nav a {
  color: rgba(248, 235, 215, 0.6);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--beige);
}

.footer-nav a:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Responsive Design */

/* Tablet (≤ 900px) */
@media (max-width: 900px) {
  :root {
    --section-padding: 120px;
  }

  .nav-menu {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: rgba(17, 22, 39, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: all var(--transition);
    pointer-events: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-toggle {
    display: block;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-image,
  .contact-visual {
    order: -1;
  }


  .skills-badges {
    gap: 1.5rem;
  }

  .badge-item {
    min-width: 120px;
  }
}

/* Mobile (≤ 600px) */
@media (max-width: 600px) {
  :root {
    --section-padding: 80px;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .about-bullets {
    gap: 1.5rem;
  }

  .bullet-icon {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }

  .projects-grid,
  .blog-grid {
    gap: 2rem;
  }

  .contact-cta {
    flex-direction: column;
  }

  .contact-cta .btn {
    width: 100%;
  }

  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Focus visible styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--neon);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Legal Pages (Impressum, Datenschutz) */
.legal-page {
  padding: var(--section-padding) 0;
  background: var(--navy);
  min-height: 60vh;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h1 {
  color: var(--yellow);
  margin-bottom: 2rem;
  font-size: clamp(2rem, 5vw, 3rem);
}

.legal-intro {
  font-size: 1.125rem;
  color: var(--teal);
  font-weight: 500;
  margin-bottom: 3rem;
  padding: 1.5rem;
  background: rgba(54, 195, 242, 0.05);
  border-left: 3px solid var(--teal);
  border-radius: 4px;
}

.legal-content h2 {
  color: var(--teal);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.legal-content h3 {
  color: var(--beige);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

.legal-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: rgba(248, 235, 215, 0.85);
}

.legal-content a {
  color: var(--teal);
  text-decoration: underline;
  transition: color var(--transition);
}

.legal-content a:hover {
  color: var(--neon);
}

.legal-content ul {
  list-style: disc;
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
  color: rgba(248, 235, 215, 0.85);
}

.back-link {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Reduced motion utilities */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
  }
}
