/* ===== Global Styles ===== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background: #fafafa;
  color: #333;
}

h1, h2, h3 {
  margin-top: 0;
}

/* ===== Header ===== */
header {
  text-align: center;
  background: #333;
  color: white;
  padding: 2rem;
  position: relative;
}

header .headshot {
  width: 150px;
  border-radius: 12px; /* soft rounded corners */
  margin-bottom: 1rem;
}

/* ===== Sections ===== */
section {
  padding: 2rem;
  max-width: 800px;
  margin: auto;
}

h2 {
  color: #333;
  border-bottom: 2px solid #ddd;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.project {
  margin-bottom: 1.5rem;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  background: #f4f4f4;
  padding: 1rem;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #666;
}

/* ===== Language Toggle (labels outside track) ===== */
.lang-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 1rem;
  font: 700 13px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Hide the real checkbox */
.lang-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Wider container to fit labels left/right */
.lang-toggle .toggle {
  position: relative;
  display: inline-block;
  width: 160px;          /* overall container */
  height: 36px;
  cursor: pointer;
  user-select: none;
}

/* Track centered inside container */
.lang-toggle .track {
  position: absolute;
  top: 0;
  left: 32px;            /* centers a 96px track */
  width: 96px;
  height: 36px;
  background: #e9f2ff;   /* EN default */
  border-radius: 9999px;
  box-shadow: inset 0 0 0 1px #d0d0d0;
  transition: background .25s ease;
  z-index: 0;
}

/* Labels OUTSIDE the track so the thumb never covers them */
.lang-toggle .label {
  position: absolute;
  top: 0; bottom: 0;
  display: flex;
  align-items: center;
  color: #FFFFFF;
  pointer-events: none;
  transition: color .25s ease;
}
.lang-toggle .label.left  { left: 0;  padding-left: 0;  content: "EN"; }
.lang-toggle .label.right { right: 0; padding-right: 0; content: "DE"; }

/* Active side darker for contrast */
.lang-toggle input:not(:checked) + .toggle .label.left  { color: #111; }  /* EN active */
.lang-toggle input:checked + .toggle .label.right       { color: #111; }  /* DE active */

/* Thumb (moving circle) — your HTML has text inside (#langThumb) */
.lang-toggle .thumb {
  position: absolute;
  top: 4px;
  left: 32px;            /* align with track start */
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
  transition: transform .25s ease, background .25s ease;
  will-change: transform;
  transform: translateX(0);  /* EN */
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 10px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #333;
}

/* Slide distance: 96 - 28 - 2*4 = 60px */
.lang-toggle input:checked + .toggle .thumb {
  transform: translateX(60px); /* DE */
}

/* Track color when DE active */
.lang-toggle input:checked + .toggle .track {
  background: #fff0e6; /* DE */
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .lang-toggle .thumb { transition: none; }
  .lang-toggle .track { transition: none; }
}

/* Mobile adjustments */
@media (max-width: 550px) {
  .lang-toggle .toggle {
    width: 100px;   /* narrower container */
  }
  .lang-toggle .track {
    left: 20px;
    width: 60px;    /* smaller track */
  }
  .lang-toggle .thumb {
    left: 20px;
    width: 24px;
    height: 24px;
  }
  /* New slide distance = 60 - 24 - 8px gaps = 28px */
  .lang-toggle input:checked + .toggle .thumb {
    transform: translateX(28px);
  }
  .lang-toggle .label {
    font-size: 11px; /* smaller labels */
  }
}

.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.project-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  padding: 1rem;
}
.project-card img {
  width: 100%; height: 180px; object-fit: cover;
  border-radius: 8px; margin-bottom: .8rem;
}
.project-card .btn {
  display: inline-block;
  margin-top: .6rem;
  padding: .5rem .9rem;
  background: #333; color: #fff; text-decoration: none; border-radius: 8px;
}
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .projects-grid { grid-template-columns: 1fr; }
}

.breadcrumb { margin-top: .5rem; color: #ddd; }
.breadcrumb a { color: #fff; text-decoration: none; }
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
}
.gallery img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  max-width: 1200px;
}

/* Spacing between gallery blocks and subsequent subsections */
.gallery { margin-bottom: 1.2rem; }
.gallery + h3 { margin-top: 1.2rem; }

/* Force two columns for phase 1 galleries */
.gallery.gallery--two { grid-template-columns: repeat(2, 1fr); }

/* Make each figure occupy both columns to increase size */
.gallery.gallery--two figure { grid-column: span 2; }

/* Optional: larger images inside figures while preserving aspect ratio */
.gallery figure img { max-height: 340px; }

/* Optional: caption styling for clarity */
.gallery figure { margin: 0; }
.gallery figcaption { margin-top: .4rem; font-size: .95rem; color: #555; text-align: center; }

/* Under construction styling */
.project.under-construction {
  opacity: 0.6;
  filter: grayscale(0.3);
  position: relative;
}

.project.under-construction::after {
  content: "Site under construction";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 10;
}



