/* ==========================================================================
   Projektportfolio – Stylesheet
   Struktur: Reset & Basis → Layout-Bausteine → Sektionen → Responsive →
             Reduced Motion → Scroll-Popups → Personal-Brand-Elemente
   ========================================================================== */

/* --- Reset & Basis ------------------------------------------------------ */
:root {
  color-scheme: dark;
  --bg: #07080c;
  --text: #f5f5f7;
  --muted: #a5a6b1;
  --line: rgba(255, 255, 255, .16);
  --beam: 0px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, #24283838, transparent 65%);
  z-index: -1;
}

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

button {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 6px;
}

/* --- Header & Navigation -------------------------------------------------- */
header {
  padding: 27px 6%;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid #ffffff09;
}

.brand {
  display: inline-flex;
  align-items: flex-start;
  gap: 9px;
}

.brand img {
  width: 136px;
  height: auto;
  mix-blend-mode: screen;
}

.brand span {
  font-size: 25px;
  font-weight: 300;
  margin-top: 11px;
  letter-spacing: 1px;
  background: linear-gradient(120deg, #b85bff, #00c5ef);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

nav {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: #b6b7c0;
}

nav a {
  padding: 12px 0;
}

nav a:hover {
  color: white;
}

/* --- Hero ------------------------------------------------------------- */
.hero {
  max-width: 1180px;
  margin: auto;
  padding: 90px 35px 110px;
  position: relative;
}

.eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  color: #b6b7c1;
}

h1 {
  font-size: clamp(58px, 8.2vw, 118px);
  letter-spacing: -.065em;
  font-weight: 450;
  line-height: 1.02;
  margin: 26px 0 29px;
}

h1 em {
  font-family: Georgia, serif;
  font-weight: 400;
  color: #c7c7d1;
}

.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.hero p {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 460px;
  margin: 0;
}

.explore {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 25px;
  white-space: nowrap;
}

.explore span {
  display: grid;
  place-items: center;
  border: 1px solid #ffffff40;
  border-radius: 50%;
  width: 46px;
  height: 46px;
}

/* --- Timeline: Rail, Sonne, Lichtstrahl -------------------------------- */
.timeline-wrap {
  position: relative;
  max-width: 1180px;
  padding: 0 35px;
  margin: 0 auto;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 80px 0 45px;
  position: relative;
}

.rail {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #ffffff19;
  left: 50%;
  pointer-events: none;
}

.rail::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(#ffffff38, #ffffff10);
}

.beam {
  position: absolute;
  top: 0;
  left: -1px;
  width: 3px;
  height: var(--beam);
  max-height: 100%;
  background: #fff;
  box-shadow: 0 0 6px #fff, 0 0 18px #ffffffa0, 0 0 40px #ffffff40;
  border-radius: 5px;
  will-change: height;
}

.sun {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 33% 28%, white 0%, #fff 35%, #e9eaf2 65%, #9197a8 100%);
  box-shadow: 0 0 20px #ffffff80, 0 0 55px #ffffff35, 0 0 120px #ffffff20;
  z-index: 2;
}

.sun::after {
  content: "";
  position: absolute;
  inset: -23px;
  border: 1px solid #ffffff12;
  border-radius: 50%;
}

.cursor-light {
  position: absolute;
  left: 50%;
  top: var(--beam);
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 14px #fff, 0 0 40px #fff;
  pointer-events: none;
}

/* --- Kapitel-Marker (Studium / Eigenständig) --------------------------- */
.chapter {
  position: relative;
  z-index: 2;
  text-align: center;
  margin: 0 0 70px;
}

.chapter:not(:first-child) {
  margin-top: 90px;
}

.chapter span {
  display: inline-block;
  background: #07080c;
  padding: 14px 20px;
  border: 1px solid #ffffff1a;
  border-radius: 30px;
  font-size: 12px;
  letter-spacing: 2px;
  color: #c5c5cd;
}

/* --- Projekt-Einträge --------------------------------------------------- */
.entry {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: start;
  margin-bottom: 90px;
  --side: -1;
}

.entry:nth-of-type(odd) {
  --side: 1;
}

.entry article {
  grid-column: 1;
  padding: 32px;
  border-radius: 22px;
  border: 1px solid #ffffff1a;
  background: linear-gradient(130deg, #17191fdd, #0c0e14f5);
  box-shadow: 0 24px 60px #0003;
  transition: border-color .5s, box-shadow .5s, transform .6s;
}

.entry:nth-of-type(odd) article {
  grid-column: 2;
}

.entry .node {
  position: absolute;
  left: 50%;
  top: 51px;
  width: 11px;
  height: 11px;
  background: #282b34;
  border: 1px solid #72747f;
  border-radius: 50%;
  transform: translateX(-50%);
  transition: background .5s, box-shadow .5s;
  z-index: 3;
}

.entry::before {
  content: "";
  position: absolute;
  top: 56px;
  height: 1px;
  width: 50px;
  background: linear-gradient(90deg, #ffffff20, #ffffff55);
  left: calc(50% - 50px);
}

.entry:nth-of-type(odd)::before {
  left: 50%;
  background: linear-gradient(90deg, #ffffff55, #ffffff20);
}

.entry .index {
  position: absolute;
  left: calc(50% + 25px);
  top: 46px;
  font-size: 13px;
  letter-spacing: 2px;
  color: #666976;
}

.entry:nth-of-type(odd) .index {
  left: auto;
  right: calc(50% + 25px);
}

.entry.passed .node,
.entry.active .node {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 12px #ffffffb0, 0 0 30px #ffffff50;
}

.entry.active article {
  border-color: #ffffff65;
  box-shadow: 0 0 30px #ffffff07, 0 24px 60px #0003;
}

.category {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #b5b6c3;
  line-height: 1.6;
}

.entry h2 {
  font-size: clamp(27px, 3.1vw, 43px);
  font-weight: 450;
  letter-spacing: -.05em;
  line-height: 1.13;
  margin: 21px 0;
}

.entry p {
  font-size: 16px;
  line-height: 1.8;
  color: #b0b1bd;
  margin: 0;
}

/* --- Tags ---------------------------------------------------------------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 25px;
}

.tags span {
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid #ffffff15;
  border-radius: 6px;
  background: #ffffff03;
  color: #bdbec9;
}

/* --- Details / Accordion ("Projekt entdecken") -------------------------- */
details {
  border-top: 1px solid #ffffff13;
  margin-top: 27px;
}

summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  min-height: 48px;
  font-size: 14px;
  color: #dedee5;
}

summary::-webkit-details-marker {
  display: none;
}

summary > span {
  font-size: 24px;
  font-weight: 300;
  transition: transform .25s;
}

details[open] summary > span {
  transform: rotate(45deg);
}

.detail {
  padding-top: 18px;
}

.detail p {
  font-size: 15px;
}

.flow {
  font-size: 12px;
  line-height: 1.7;
  color: #e0e0e7;
  padding: 16px 0 0;
}

/* --- Abschlussbereich ("Weiterdenken...") -------------------------------- */
.end {
  position: relative;
  text-align: center;
  padding: 85px 25px 70px;
  margin: auto;
}

.end::before {
  content: "";
  position: absolute;
  width: 60px;
  height: 60px;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #fff 0%, #ffffff35 15%, transparent 65%);
  pointer-events: none;
}

.end h2 {
  font-size: clamp(35px, 5vw, 68px);
  letter-spacing: -.05em;
  font-weight: 400;
  margin: 20px 0 35px;
}

.contact {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.mail,
.copy {
  border: 1px solid #ffffff30;
  border-radius: 30px;
  padding: 14px 22px;
  font-size: 16px;
  min-height: 48px;
}

.mail {
  color: #08090c;
  background: #f2f2f5;
}

.copy {
  background: transparent;
  color: white;
  cursor: pointer;
}

.copy:hover {
  background: #ffffff10;
}

.status {
  min-height: 24px;
  color: #babcc7;
  font-size: 14px;
}

/* --- Footer & fixe UI-Elemente ------------------------------------------- */
footer {
  padding: 30px 6%;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #ffffff12;
  color: #8c8e9d;
  font-size: 12px;
  letter-spacing: 1px;
}

.position {
  position: fixed;
  left: 20px;
  bottom: 22px;
  font-size: 12px;
  letter-spacing: 2px;
  color: #9395a2;
  pointer-events: none;
  z-index: 6;
}

.top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #101218e8;
  border: 1px solid #ffffff25;
  z-index: 6;
}

.read-progress {
  height: 2px;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  position: fixed;
  top: 0;
  left: 0;
  background: #fff;
  box-shadow: 0 0 10px white;
  z-index: 20;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (min-width: 1500px) {
  .hero {
    padding-top: 110px;
  }

  .entry {
    margin-bottom: 110px;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 25px;
  }

  header {
    padding: 20px 6%;
    align-items: center;
  }

  .brand img {
    width: 110px;
  }

  .brand span {
    font-size: 21px;
    margin-top: 9px;
  }

  nav {
    gap: 17px;
    font-size: 13px;
  }

  .hero {
    padding: 65px 7% 95px;
  }

  h1 {
    font-size: clamp(50px, 10.6vw, 78px);
    line-height: 1.07;
  }

  .eyebrow {
    font-size: 11px;
    letter-spacing: 1.8px;
  }

  .hero-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 25px;
  }

  .hero p {
    font-size: 16px;
  }

  .timeline-wrap {
    padding: 0 6% 0 8%;
  }

  .timeline {
    padding-top: 65px;
  }

  .rail,
  .sun,
  .cursor-light {
    left: 0;
  }

  .sun {
    width: 44px;
    height: 44px;
    top: -22px;
  }

  .sun::after {
    inset: -13px;
  }

  .chapter {
    text-align: left;
    margin-bottom: 40px;
    padding-left: 27px;
  }

  .chapter span {
    font-size: 10px;
    letter-spacing: 1px;
    padding: 12px 14px;
  }

  .chapter:not(:first-child) {
    margin-top: 65px;
  }

  .entry {
    display: block;
    margin-bottom: 35px;
    padding-left: 28px;
  }

  .entry article {
    padding: 24px 21px;
    border-radius: 17px;
  }

  .entry .node {
    left: 0;
    top: 41px;
    width: 9px;
    height: 9px;
  }

  .entry::before,
  .entry:nth-of-type(odd)::before {
    left: 0;
    top: 45px;
    width: 28px;
  }

  .entry .index {
    display: none;
  }

  .entry h2 {
    font-size: 30px;
    margin: 17px 0;
    line-height: 1.14;
  }

  .category {
    font-size: 11px;
    letter-spacing: 1.2px;
  }

  .entry p {
    font-size: 15px;
    line-height: 1.75;
  }

  .tags {
    gap: 6px;
  }

  .tags span {
    font-size: 11px;
    padding: 6px 8px;
  }

  .detail p {
    font-size: 14px;
    line-height: 1.8;
  }

  .end {
    padding: 65px 7% 55px;
  }

  .end::before {
    left: 8%;
  }

  .end h2 {
    font-size: 38px;
  }

  .contact {
    gap: 8px;
  }

  .mail,
  .copy {
    font-size: 14px;
    padding: 14px 17px;
  }

  footer {
    padding-bottom: 80px;
    flex-direction: column;
    gap: 13px;
  }

  .position {
    left: 15px;
    bottom: 18px;
    font-size: 10px;
  }

  .top {
    right: 15px;
    bottom: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   Scroll-getriggerte Projekt-Popups
   Inhalt bleibt ohne JavaScript vollständig sichtbar.
   ========================================================================== */

.popups-on .entry article {
  opacity: 0;
  transform: translateY(42px) scale(.87);
  transform-origin: center;
  transition: opacity .65s ease, transform .8s cubic-bezier(.18, .85, .22, 1.12), border-color .4s, box-shadow .4s;
}

.popups-on .entry.revealed article,
.popups-on .entry:focus-within article {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.entry.revealed .node {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 12px #fff, 0 0 30px #ffffff60;
}

@media (prefers-reduced-motion: reduce) {
  .popups-on .entry article {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Personal-Brand-Elemente (Kopfzeile, Notiz, Rücksprung-Link)
   ========================================================================== */

.personal-brand {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 3px;
  color: #f5f5f7;
}

.personal-brand span {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1.4px;
  color: #a5a6b1;
}

.personal-note {
  max-width: 580px;
  margin: 0 auto 27px;
  color: #a5a6b1;
  font-size: 16px;
  line-height: 1.8;
}

.portfolio-return {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid #ffffff30;
  border-radius: 26px;
  font-size: 14px;
}

@media (max-width: 600px) {
  .personal-brand {
    font-size: 16px;
    letter-spacing: 2px;
  }

  .personal-brand span {
    max-width: 120px;
    font-size: 9px;
    line-height: 1.5;
  }

  header nav {
    gap: 12px;
    font-size: 12px;
  }

  .end h2 {
    font-size: 34px;
  }
}
