* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Lucida Console, Lucida Sans Typewriter, Monaco, "Bitstream Vera Sans Mono", monospace;
  background-color: #fafafa;
  color: #000000;
  overflow-x: hidden;
  line-height: 1.6;
  font-size: 1rem; /* 16px on desktop */
}

h1 {
  font-size: 2rem;     /* 32px */
}
h2 {
  font-size: 1.5rem;   /* 24px */
}
h3 {
  font-size: 1.25rem;  /* 20px */
}

@media (max-width: 768px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }
}

code, pre {
  font-size: 0.95rem; /* ~15px */
  font-family: inherit; /* already monospace by default */
  white-space: pre-wrap;
  word-break: break-word;

}

section pre {
  font-size: 0.95rem;
  overflow-x: auto;
  border-radius: 4px;
  padding: 2rem;
  background: rgb(200, 200, 200);
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  z-index: 10;
  color: #333;
}

.logo {
  font-weight: bold;
  font-size: 1.5rem;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}

nav a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: #1e90ff;
}

.social-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-left: 1.1rem;
}

.social-icons a {
  color: #333;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: #1e90ff;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 25px;
  height: 20px;
  cursor: pointer;
  user-select: none;
  margin-left: 1rem;
}

.hamburger div {
  width: 100%;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: background 0.3s;
}

/* MOBILE NAVIGATION */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }

  nav {
    position: fixed;
    top: 60px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    flex-direction: column;
    width: 200px;
    padding: 1rem 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    height: calc(100vh - 60px);
    z-index: 9;
  }

  nav.open {
    transform: translateX(0);
  }

  .hamburger {
    display: flex;
  }

  .social-icons {
    order: 1;
    width: 100%;
    justify-content: flex-start;
    margin-top: 0.5rem;
    padding-left: 0;
    gap: 0.75rem;
    margin-left: 0;
  }

  .social-icons a {
    font-size: 1.1rem;
  }
}

/* MAIN CONTENT - Abstand wegen fixed Header */
main {
  padding: 80px 2rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

/* HEADINGS */
h1 {
  text-align: left;
  margin-bottom: 2rem;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 2px;
}

h2 {
  margin-bottom: 3rem;
  margin-top: 3rem;
}

h3 {
  font-size: 1rem;
  margin-bottom: 3rem;
  margin-top: 3rem;
}

/* PORTFOLIO GRID */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* CARD STYLE */
.card {
  font-family: Arial, sans-serif;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(144, 144, 144, 0.2);
  backdrop-filter: blur(5px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 25px rgba(144, 144, 144, 0.5);
}

.card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.card-text {
  padding: 1rem;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-family: Lucida Console, Lucida Sans Typewriter, Monaco, "Bitstream Vera Sans Mono", monospace;
}

.card p {
  font-size: 0.95rem;
  line-height: 1.3;
  color: #333333;
}

/* PROJECT DETAIL */
.project-detail {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
}

/* ARTICLE IMAGE */
.article-image img {
  display: block;
  margin: 1rem auto;
  max-width: 100%;
  height: auto;
}

/* ART IMAGE */
.art-image img {
  display: block;
  margin: 4rem auto;
  max-width: 100%;
  height: auto;
  border: 20px solid #fafafa;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

@media (max-width: 600px) {
  .art-image img {
	border: 10px solid #fafafa;
  }
}

/* IMAGE GALLERY */
.image-gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.image-gallery img {
  width: 100%;
  border-radius: 4px;
  display: block;
}

@media (min-width: 600px) {
  .image-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .image-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* BACK LINK */
.back-link {
  display: inline-block;
  margin-top: 2rem;
  text-decoration: none;
  color: #1e90ff;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 1rem 2rem;
  color: #666666;
  font-size: 0.9rem;
  user-select: none;
  margin-top: 3rem;
}

/* P5 CONTAINER STYLES */
.sketch-container,
#p5-container,
#p5-container-2,
#p5-container-zerfall {
  margin: 6rem auto 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  width: fit-content;
}

.sketch-container,
#p5-container {
  width: 300px;
  height: 300px;
}

#p5-container-2 {
  width: 300px;
  height: 300px;
}

#p5-container-zerfall {
  margin-top: 0;
  width: 800px;
  height: 800px;
}

.sketch-container,
#p5-container canvas,
#p5-container-2 canvas,
#p5-container-zerfall canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 800px;
  max-height: 800px;
}

@media (max-width: 768px) {
  .sketch-container,
  #p5-container-zerfall {
    width: 300px !important;
    height: 300px !important;
  }
  .sketch-container canvas,
  #p5-container-zerfall canvas {
    width: 300px !important;
    height: 300px !important;
  }
}

/* BLOG */
.blog-entry {
  margin-bottom: 4rem;
}

.blog-date {
  display: block;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
  margin-top: 2rem;
}

.blog-entry h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.blog-entry p em {
  display: block;
  margin-bottom: 1rem;
  font-style: italic;
  color: #333;
}

.blog-entry section {
  margin-top: 1rem;
}

.log-separator {
  border: none;
  height: 2px;
  background: linear-gradient(to right, #222, #999, #222);
  margin: 3rem 0;
}

.starfleet-logo {
  width: 264px;
  height: 264px;
  display: block;
  transition: transform 0.3s ease;
}
