:root {
  --bg: #fdfdfd;
  --surface: #ffffff;
  --surface-alt: #f5f3ff;
  --accent: #6b21a8;
  --accent-strong: #4c1d95;
  --accent-soft: #ede9fe;
  --accent-soft-strong: #ddd6fe;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-soft: 0 18px 60px rgba(15, 23, 42, 0.16);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

/* Layout */

.container {
  width: min(1120px, 100% - 3rem);
  margin: 0 auto;
}

.section {
  padding-block: 3.5rem;
}

.section-alt {
  background: var(--surface-alt);
}

.section-header {
  margin-bottom: 2rem;
  max-width: 640px;
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.9rem, 2.4vw, 2.1rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.section-header p {
  margin: 0;
  color: var(--muted);
}

.section-header-center {
  text-align: center;
  margin-inline: auto;
}

.section-header-center p {
  margin-inline: auto;
}

/* Header & Nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 253, 253, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e5e7eb;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.8rem;
}

/* Brand links */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #a855f7, #6d28d9);
  box-shadow: 0 8px 16px rgba(109, 40, 217, 0.4);
  line-height: 0;
}

.brand-mark-text {
  font-weight: 400;
  font-size: 0.9rem;
  color: #fff;
  font-family: "Mrs Saint Delafield", cursive;
  line-height: 0.5;
  display: inline-block;
  transform: translate(-2px, 3px);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  gap: 0.05rem;
}

.brand-name {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

.brand-role {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Desktop-Navigation */

.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--muted);
  position: relative;
  padding-block: 0.25rem;
}

.site-nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #a855f7, #6d28d9);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 150ms ease-out;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent-strong);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 200;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #4b5563;
  transition: transform 160ms ease-out, opacity 160ms ease-out;
}

.nav-toggle-bar + .nav-toggle-bar {
  margin-top: 3px;
}

/* Burger → X Animation */
.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* Wenn offen: Striche weiß */
.nav-toggle.is-open .nav-toggle-bar {
  background: #ffffff;
}

/* Buttons */

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 150ms ease-out,
    color 150ms ease-out,
    box-shadow 120ms ease-out,
    transform 80ms ease-out;
}

.btn-primary {
  background: linear-gradient(135deg, #a855f7, #6d28d9);
  color: white;
  box-shadow: 0 12px 24px rgba(109, 40, 217, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(109, 40, 217, 0.4);
}

.btn-outline {
  background: #fdfdfd;
  color: var(--accent-strong);
  border-color: var(--accent-soft-strong);
}

.btn-outline:hover {
  background: var(--accent-soft);
}

/* Hero */

.hero {
  padding-block: 4rem 3.5rem;
  background: #f9fafb;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr);
  grid-template-areas:
    "text photo"
    "copy photo";
  gap: 3.2rem;
  align-items: center;
  min-height: calc(100vh - 90px);
}

.hero-text {
  grid-area: text;
  max-width: 560px;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--accent-strong);
  margin: 0 0 0.5rem;
}

.hero-stats {
  display: flex;
  gap: 2.4rem;
  margin: 0 0 1.1rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.hero-stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.hero-stat-label {
  display: block;
  margin-top: 0.15rem;
}

.hero-name {
  margin: 0 0 0.6rem;
  font-family: "Mrs Saint Delafield", cursive;
  font-style: normal;
  font-size: clamp(6rem, 8vw, 6.5rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* NEU: eigener Block für die zwei Sätze + Buttons */
.hero-copy-block {
  grid-area: copy;
  max-width: 640px;
  margin-top: 0.75rem;
}

.hero-copy {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.hero-copy-highlight {
  font-weight: 500;
}

.hero-buttons {
  margin-top: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* Hero Bild rechts */

.hero-photo {
  grid-area: photo;
  justify-self: center;
}

.hero-photo img {
  display: block;
  width: min(520px, 100%);
  height: auto;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
}

/* Über-mich-Karten */

.hero-interests {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.interest-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.interest-image {
  position: relative;
  padding-top: 60%;
  overflow: hidden;
  background: #f3f4f6;
}

.interest-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.interest-content {
  padding: 1rem 1.1rem 1.1rem;
}

.interest-icon {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.interest-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.interest-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Timeline */

.timeline {
  display: grid;
  gap: 2.8rem;
}

.timeline-group {
  position: relative;
  border-left: 2px solid #e5e7eb;
  padding-left: 1.7rem;
  margin-left: 0.35rem;
}

.timeline-group-education {
  margin-top: 0.5rem;
}

.timeline-group-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-strong);
  margin-bottom: 1rem;
}

.timeline-item + .timeline-item {
  margin-top: 1.8rem;
}

.timeline-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.timeline-meta span {
  display: block;
}

.timeline-content h3 {
  margin: 0 0 0.3rem;
  font-size: 1.02rem;
}

.timeline-content p {
  margin: 0.1rem 0 0.4rem;
  color: var(--muted);
}

.timeline-content ul {
  margin: 0.2rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Skills */
#skills {
  padding-block: 6.5rem;
}

.skills-card {
  background: var(--surface);
  border-radius: 24px;
  padding: 1.8rem 1.7rem;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.skills-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.skills-group h3 {
  margin: 0 0 0.8rem;
  font-size: 1rem;
  color: var(--accent-strong);
}

.skill-item + .skill-item {
  margin-top: 0.7rem;
}

.skill-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9rem;
}

.skill-name {
  font-weight: 500;
}

.skill-level {
  font-size: 0.8rem;
  color: var(--muted);
}

.skill-meter {
  margin-top: 0.3rem;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  overflow: hidden;
}

.skill-meter-fill {
  height: 100%;
  width: var(--level, 70%);
  border-radius: 999px;
  background: linear-gradient(90deg, #a855f7, #6d28d9);
}

/* Projekte */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.8rem;
  align-items: stretch;
}

.project-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  outline: none;
  transition:
    transform 120ms ease-out,
    box-shadow 120ms ease-out,
    border-color 120ms ease-out;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.18);
  border-color: var(--accent-soft-strong);
}

.project-image {
  position: relative;
  padding-top: 72%;
  overflow: hidden;
  background: #f3f4f6;
}

.project-image-small {
  padding-top: 55%;
}

.project-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-content {
  padding: 1.2rem 1.3rem 1.1rem;
}

.project-content h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.project-description {
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  font-size: 0.78rem;
  color: #4b5563;
  background: #f9fafb;
}

/* Kontakt */

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.contact-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.contact-list a {
  color: var(--accent-strong);
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

/* Footer */

.site-footer {
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  padding-block: 1.1rem 1.6rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-hint {
  margin: 0;
}

/* Modals */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal-dialog {
  position: relative;
  max-width: 900px;
  width: min(900px, 100% - 2.5rem);
  max-height: 90vh;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  padding: 1.7rem 1.9rem 1.5rem;
  overflow-y: auto;
  z-index: 1;
}

.modal-header h2 {
  margin: 0 0 0.3rem;
  font-size: 1.3rem;
}

.modal-subtitle {
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.modal-body h3 {
  margin: 1.1rem 0 0.3rem;
  font-size: 1rem;
  color: var(--accent-strong);
}

.modal-body p {
  margin: 0.3rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.modal-body ul {
  margin: 0.25rem 0 0.3rem;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.modal-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
  margin-top: 0.4rem;
}

.modal-media-grid img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.modal-media-grid figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.modal-actions {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #4b5563;
}

/* Scroll to top button */

.scroll-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, #a855f7, #6d28d9);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  text-decoration: none;
  opacity: 0.9;
  transition:
    transform 120ms ease-out,
    box-shadow 120ms ease-out,
    opacity 120ms ease-out;
  z-index: 80;
}

.scroll-top:hover,
.scroll-top:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(109, 40, 217, 0.6);
  opacity: 1;
}

.hero-interests-header {
  margin-top: 2.5rem;
}

.hero-interests-title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

/* Bild im Quartier-G Modal etwas kleiner */
.quartier-visual img {
  max-width: 40%;
  display: block;
  margin: 0 auto;
}

/* Responsive */

@media (min-width: 1200px) {
  .container {
    width: min(1240px, 100% - 4rem);
  }

  .hero {
    padding-block: 5rem 4.5rem;
  }

  .hero-name {
    margin-top: 2rem;
    font-size: clamp(8rem, 6vw, 7.2rem);
  }

  .hero-copy {
    font-size: 1.05rem;
  }

  .hero-stats {
    font-size: 0.85rem;
  }

  .hero-photo img {
    width: min(620px, 100%);
  }
}

@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skills-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .hero {
    padding-block: 2.4rem 2.4rem;
  }

  .hero-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    grid-template-areas:
      "text photo"
      "copy photo";
    gap: 1.4rem;
    min-height: auto;
    align-items: center;
  }

  .hero-text {
    max-width: none;
  }

  .hero-name {
    font-size: clamp(3rem, 9vw, 3.6rem);
  }

  .hero-stats {
    font-size: 0.78rem;
    gap: 1.4rem;
  }

  .hero-copy {
    font-size: 0.95rem;
  }

  .hero-photo {
    align-self: flex-start;
    margin-top: 10rem;
  }

  .hero-photo img {
    width: min(220px, 100%);
  }

  .hero-interests {
    grid-template-columns: minmax(0, 1fr);
  }

  .skills-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding-top: 4.5rem;
    padding-right: 1.5rem;
    background: rgba(85, 87, 91, 0.97);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 200ms ease-out,
      opacity 200ms ease-out;
    z-index: 150;
  }

  .site-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
  }

  .site-nav a {
    font-size: 0.9rem;
    color: #ffffff;
  }

  .site-nav a::after {
    background: linear-gradient(90deg, #a855f7, #a92fff);
  }

  .site-nav a:hover,
  .site-nav a:focus-visible {
    color: #ffffff;
  }

  .site-nav--open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .header-inner {
    padding-block: 0.7rem;
  }

  .section {
    padding-block: 3rem;
  }

  .modal-dialog {
    max-height: 92vh;
  }

  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Handy-Layout für den Hero-Bereich */
  .hero-layout {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "text text"
      "copy photo";
    gap: 1.2rem;
    align-items: flex-start;
  }

  .hero-photo {
    justify-self: flex-end;
    align-self: flex-start;
    margin-top: 0;
  }

  .hero-photo img {
    display:none;
  }

  .hero-copy-block {
    grid-area: copy;
    margin-top: 0.3rem;
  }
}


@media (max-width: 520px) {
  .timeline-group {
    padding-left: 1.3rem;
    margin-left: 0.3rem;
  }
}
