/*
  Design Tokens:
  Zentrale Farben, Akzentwerte und maximale Inhaltsbreite.
  Änderungen an diesen Variablen wirken sich auf die gesamte Seite aus.
*/
@font-face {
  font-family: "ao";
  src: url("https://ao.criticalarchitecture.org/wp-content/themes/ao/build/fonts/CCSA.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "aoItalic";
  src: url("https://ao.criticalarchitecture.org/wp-content/themes/ao/build/fonts/CCSAItalic.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #171717;
  --muted: #66615d;
  --line: #cfcac3;
  --accent: #b71918;
  --accent-soft: #f1d7d5;
  --shadow: none;
  --max: 1160px;
}

/* Basis-Reset: berechenbare Boxgrößen, weiches Scrollen und Grundtypografie. */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent calc(12.5vw - 1px),
      rgba(23, 23, 23, 0.18) calc(12.5vw - 1px),
      rgba(23, 23, 23, 0.18) 12.5vw
    ),
    var(--bg);
  color: var(--ink);
  font-family: "ao", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

::-moz-selection {
  background: var(--accent);
  color: var(--paper);
}

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

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

.page-top {
  position: absolute;
  top: 0;
}

/*
  Header und Navigation:
  Sticky auf Desktop/Tablet, halbtransparenter Hintergrund mit Blur,
  damit der Header beim Scrollen lesbar bleibt.
*/
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  width: 100%;
  min-height: 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

.brand {
  position: fixed;
  top: 22px;
  left: 22px;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  pointer-events: auto;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  transition: transform 160ms ease, opacity 160ms ease;
  transform-origin: center;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0;
  width: clamp(238px, 20vw, 320px);
  height: 100vh;
  color: var(--ink);
  font-size: clamp(1rem, 1.35vw, 1.35rem);
  font-weight: 600;
  line-height: 1;
  pointer-events: auto;
}

.site-nav a {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  width: clamp(36px, 3.3vw, 52px);
  min-height: 100vh;
  padding: 0 8px 24px;
  border-bottom: 0;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.055), rgba(255, 255, 255, 0) 48%),
    rgba(255, 255, 255, 0.96);
  box-shadow: -10px 0 22px rgba(0, 0, 0, 0.045);
  text-align: right;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0;
  transform: rotate(180deg);
  transform-origin: center;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

main,
.site-footer {
  padding-right: clamp(238px, 20vw, 320px);
}

/*
  Allgemeine Section-Hülle:
  Begrenzt die Inhaltsbreite und sorgt für großzügige vertikale Abstände.
*/
.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(44px, 6vw, 78px) 0;
}

.section-number {
  display: none;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

/*
  Intro-Layout:
  Zweispaltiger Einstieg mit Text links und Porträt rechts.
  Die Spalten werden in den Media Queries untereinander gesetzt.
*/
.intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.66fr) minmax(260px, 0.34fr);
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  min-height: 0;
  padding-top: clamp(40px, 6vw, 72px);
}

.intro-copy {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  max-width: none;
}

.breadcrumb {
  position: absolute;
  top: 0;
  left: 0;
  min-height: 48px;
  margin: 0 0 20px;
  padding-bottom: 20px;
  color: var(--accent);
  font-size: 1rem;
}

/* Kleine Rubriklabels über Überschriften, als wiederkehrender Akzent. */
.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Globale typografische Hierarchie für Überschriften und Fließtext. */
h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  margin: 0 0 20px;
  font-size: clamp(2.2rem, 4.4vw, 4rem);
  line-height: 1;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.role {
  max-width: none;
  margin: 18px 0 0;
  padding: 12px 14px 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: clamp(1.05rem, 1.45vw, 1.22rem);
  line-height: 1.28;
  font-weight: 400;
}

.degree {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: clamp(1.2rem, 1.65vw, 1.45rem);
  line-height: 1.2;
}

.intro-copy > p:not(.breadcrumb):not(.role):not(.degree) {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
}

.intro-header {
  max-width: none;
  min-height: 100px;
  margin: 0 0 10px;
  padding: 20px 22px 24px;
  border: 1px solid var(--accent);
  background: var(--paper);
}

/*
  Porträt:
  Fester Bildausschnitt über aspect-ratio und object-position,
  damit das Foto responsiv ruhig wirkt.
*/
.portrait {
  position: relative;
  margin: 0;
  justify-self: stretch;
  align-self: start;
  overflow: hidden;
}

.portrait img {
  width: 100%;
  height: auto;
  margin-bottom: -48px;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  filter: none;
  box-shadow: var(--shadow);
  transform: translateY(-48px);
}

/* Social Icons und primärer E-Mail-Link im Intro und Kontaktbereich. */
.intro-actions,
.social-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.profile-links {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: auto;
  margin-bottom: 0;
  min-height: 26px;
}

.profile-links a {
  display: inline-flex;
  align-items: flex-end;
  height: 26px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  line-height: 1.2;
}

.profile-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.icon-link {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 0;
  transition: transform 160ms ease, opacity 160ms ease;
}

.icon-link:focus-visible,
.text-link:focus-visible,
.profile-links a:focus-visible,
.site-nav a:focus-visible,
.brand:focus-visible,
.menu-toggle:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 4px;
}

.icon-link:hover {
  transform: translateY(-2px);
}

.icon-link img {
  width: 48px;
  height: 48px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 0;
  font-weight: 700;
}

.text-link:hover {
  background: var(--ink);
  color: var(--paper);
}

/*
  Split-Sections:
  Wiederverwendbares zweispaltiges Layout für Abschnittstitel links
  und Inhalte rechts.
*/
.split {
  display: grid;
  grid-template-columns: minmax(210px, 0.3fr) minmax(0, 0.7fr);
  gap: clamp(48px, 8vw, 128px);
}

#extra.split {
  display: block;
}

#extra .extra-groups {
  margin-top: clamp(28px, 4vw, 52px);
}

.cv-heading {
  max-width: 560px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.cv-heading .eyebrow {
  margin-bottom: 16px;
}

/*
  Timeline:
  Vertikale Linie plus Punktmarkierungen für CV-Stationen.
*/
.timeline {
  border-left: 2px solid var(--ink);
  padding-left: 28px;
}

.timeline-item {
  position: relative;
  padding-bottom: 28px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 4px;
  left: -35px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--paper) 0 2px, var(--ink) 2.5px);
}

.date {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.timeline p,
.cv-group p,
.project-list p,
.skills p,
.contact p {
  color: var(--muted);
}

/*
  Akzentband:
  Full-width Abschnitt für Projekte/Engagement mit dunklem Hintergrund.
  padding-inline zentriert den Inhalt weiterhin auf die globale Maximalbreite.
*/
.accent-band {
  width: min(var(--max), calc(100% - 40px));
  max-width: var(--max);
  padding-inline: 0;
  padding-block: clamp(44px, 6vw, 78px);
  background: transparent;
  color: var(--ink);
}

.accent-band .section-number {
  color: var(--accent);
}

.accent-band .eyebrow {
  color: var(--accent);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(210px, 0.3fr) minmax(0, 0.7fr);
  column-gap: clamp(48px, 8vw, 128px);
  row-gap: 0;
  max-width: none;
  align-items: start;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-heading .section-number {
  grid-column: 1;
  grid-row: 1;
}

.section-heading .eyebrow {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 16px;
  color: var(--accent);
}

.section-heading h2 {
  grid-column: 1;
  grid-row: 2;
}

.section-heading p:not(.eyebrow):not(.section-number) {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.accent-band .section-heading p:not(.eyebrow),
.accent-band .project-list p {
  color: var(--muted);
}

/* Skills-Raster: drei Spalten auf Desktop, eine Spalte auf Mobile. */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-list article {
  display: grid;
  grid-template-columns: minmax(120px, 0.18fr) minmax(0, 0.58fr) minmax(150px, 0.24fr);
  gap: clamp(20px, 3vw, 46px);
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.project-thumb-placeholder {
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.48);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.skills-grid article,
.contact-panel {
  border: 1px solid rgba(222, 217, 210, 0.8);
  border-radius: 0;
  padding: 24px;
  background: rgba(255, 255, 255, 0.22);
}

.skills-grid article {
  border-color: var(--ink);
  background: transparent;
}

.skills-grid h3 {
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Vernetzt: drei kompakte Kompetenzgruppen mit eigener grafischer Sprache. */
.extra-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.extra-group {
  padding: 24px;
  border: 1px solid var(--accent);
  background: var(--paper);
}

.extra-group h3 {
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.extra-group-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.extra-group-list li {
  padding: 5px 0;
}

.extra-group-list li + li {
  margin-top: 1px;
}

.extra-group .date {
  display: block;
  margin-bottom: 3px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.extra-group strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.22;
}

.extra-point-list {
  margin: 5px 0 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.extra-point-list li + li {
  margin-top: 1px;
}

.extra-group h3,
.timeline h4,
.project-list h3 {
  text-wrap: balance;
}

/* Skills und Listen: Pillen für Programme, einfache Liste für Sprachen. */
.pill-list,
.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-list li {
  padding: 8px 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 600;
}

.plain-list li + li {
  margin-top: 10px;
}

/*
  Kontaktbereich:
  Text und Kontaktpanel stehen auf Desktop nebeneinander,
  auf kleineren Screens untereinander.
*/
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.5fr);
  align-items: start;
  gap: clamp(36px, 7vw, 96px);
}

.contact .eyebrow {
  color: var(--accent);
}

.contact-panel {
  background: var(--paper);
  box-shadow: var(--shadow);
}

.cv-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(96px, 11vw, 172px);
}

.cv-group > h3 {
  margin-bottom: 26px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.25;
}

.timeline p {
  max-width: 34ch;
  font-size: 0.93rem;
  line-height: 1.58;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 0;
  border: 1px solid var(--line);
  object-fit: cover;
  object-position: top;
  filter: none;
}

.project-thumb-neobuch {
  object-position: center bottom;
}

.project-thumb-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
}

.project-thumb-frame .project-thumb {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
}

.project-thumb-zoom .project-thumb {
  transform: translateX(5%) scale(1.8);
  transform-origin: center;
}

.project-thumb-zoom-small .project-thumb {
  transform: scale(1.2);
  transform-origin: center;
}

.project-thumb-shift-down .project-thumb {
  transform: translateY(5%) scale(1.2);
}

.project-entry h3 {
  margin-bottom: 10px;
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.project-date,
.project-place {
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 700;
}

.project-place {
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 600;
}

.project-entry p:last-child {
  max-width: 62ch;
  margin-bottom: 0;
}

.project-meta {
  display: grid;
  gap: 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-meta span {
  padding-top: 8px;
  border-top: 1px solid var(--accent);
}

.location {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.contact-panel > a {
  display: inline-block;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* Schlichter Seitenabschluss. */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(238px, 20vw, 320px) 28px clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

/*
  Tablet Breakpoint:
  Komplexe Spaltenlayouts werden einspaltig, Navigation darf umbrechen.
*/
@media (max-width: 860px) {
  .site-header {
    position: sticky;
    left: auto;
    right: auto;
    width: auto;
    min-height: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(20px, 5vw, 64px);
    background: var(--paper);
    border-left: 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
    pointer-events: auto;
  }

  .brand {
    position: static;
  }

  main,
  .site-footer {
    padding-right: 0;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    display: none;
    width: min(340px, calc(100vw - 40px));
    height: auto;
    padding: 18px;
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: var(--shadow);
    font-size: 1.25rem;
    line-height: 1.1;
  }

  .site-nav.is-open {
    display: grid;
    justify-content: stretch;
    gap: 12px;
    text-align: center;
  }

  .site-nav a {
    width: auto;
    min-height: 0;
    padding: 8px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    box-shadow: none;
    text-align: center;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    letter-spacing: 0;
    transform: none;
  }

  .intro,
  .split,
  .contact {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .section-heading .section-number,
  .section-heading .eyebrow,
  .section-heading h2,
  .section-heading p:not(.eyebrow):not(.section-number) {
    grid-column: auto;
    grid-row: auto;
  }

  .intro {
    padding-top: 54px;
  }

  .portrait {
    justify-self: start;
    width: min(360px, 100%);
  }

  .timeline {
    padding-left: 28px;
  }

  .timeline-item::before {
    left: -35px;
  }

  .skills-grid,
  .cv-columns {
    grid-template-columns: 1fr;
  }

  .project-list article {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .project-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cv-heading {
    margin-bottom: 36px;
  }

  .extra-groups {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/*
  Mobile Breakpoint:
  Header ist nicht mehr sticky, Schrift und Abstände werden kompakter,
  Call-to-Action-Button nimmt die volle Breite ein.
*/
@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .site-header {
    position: sticky;
    display: flex;
  }

  .site-nav {
    left: 50%;
  }

  .section {
    width: min(100% - 28px, var(--max));
  }

  .intro-actions {
    align-items: stretch;
  }

  .text-link {
    width: 100%;
    justify-content: center;
  }

  .site-footer {
    flex-direction: column;
  }
}

.site-footer .copyright {
  margin-left: auto;
  text-align: right;
}

.site-footer .copyright { display: block; margin-left: auto; color: #111; text-align: right; opacity: 1; visibility: visible; }
