/* Armando Weder – statische Bewerbungsseite.
   Breakpoint 980px muss mit script.js übereinstimmen. */

:root {
  --bg: #f6f4ef;
  --surface: #fffcf8;
  --ink: #1c1915;
  --muted: #5c564c;
  --line: #ddd4c6;
  --line-strong: #8a8174;
  --accent: #0e564f;
  --accent-hover: #0a3f3a;
  --accent-ink: #f4fbf9;
  --accent-soft: #e5f2f0;
  --shadow: 0 18px 40px rgba(28, 25, 21, 0.06);
  --sans: system-ui, -apple-system, "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Noto Serif", Georgia, serif;
  --page: 66rem;
  --header: 4.5rem;
  --radius: 1.05rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111413;
    --surface: #1b201e;
    --ink: #f3f0e8;
    --muted: #c4bdb2;
    --line: #3a4440;
    --line-strong: #9a9288;
    --accent: #9ee0d6;
    --accent-hover: #c4f3ec;
    --accent-ink: #06211e;
    --accent-soft: #1a3330;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111413;
  --surface: #1b201e;
  --ink: #f3f0e8;
  --muted: #c4bdb2;
  --line: #3a4440;
  --line-strong: #9a9288;
  --accent: #9ee0d6;
  --accent-hover: #c4f3ec;
  --accent-ink: #06211e;
  --accent-soft: #1a3330;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 {
  margin-top: 0.35rem;
  font-size: clamp(2.7rem, 8vw, 4.75rem);
}

h2 {
  font-size: clamp(1.85rem, 3vw, 2.45rem);
}

h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 700;
}

p {
  text-wrap: pretty;
}

ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  position: relative;
  color: var(--accent);
  text-underline-offset: 0.18em;
}

address {
  font-style: normal;
}

a:hover {
  text-decoration-thickness: 2px;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  z-index: 80;
  transform: translateY(-160%);
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(100% - 2rem, var(--page));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--header);
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.monogram {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 0.7rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.icon-button {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
}

.icon-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-button svg {
  width: 1.2rem;
  height: 1.2rem;
}

.icon-sun {
  display: none;
}

.icon-moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .icon-moon {
    display: none;
  }
}

:root[data-theme="dark"] .icon-sun {
  display: block;
}

:root[data-theme="dark"] .icon-moon {
  display: none;
}

:root[data-theme="light"] .icon-sun {
  display: none;
}

:root[data-theme="light"] .icon-moon {
  display: block;
}

.burger,
.burger::before,
.burger::after {
  display: block;
  width: 1.05rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  position: relative;
}

.burger::before,
.burger::after {
  content: "";
  position: absolute;
  left: 0;
}

.burger::before {
  top: -6px;
}

.burger::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .burger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .burger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .burger::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-toggle {
  display: none;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.site-nav a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.98rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="true"] {
  color: var(--ink);
  background: var(--accent-soft);
  text-decoration: none;
}

.site-nav a[aria-current="true"] {
  box-shadow: inset 0 -2px 0 var(--accent);
}

@media (max-width: 979px) {
  .site-nav {
    flex: 1 0 100%;
    order: 5;
    padding-bottom: 0.35rem;
  }

  .nav-list {
    display: grid;
    gap: 0.1rem;
  }

  html.js .nav-toggle {
    display: inline-flex;
  }

  html.js .site-nav {
    display: none;
    position: absolute;
    z-index: 30;
    top: 100%;
    right: 0;
    left: 0;
    padding: 0.35rem max(1rem, calc((100% - var(--page)) / 2)) 0.9rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  html.js .site-nav.is-open {
    display: block;
  }

  html.js .header-bar {
    flex-wrap: nowrap;
  }
}

@media (min-width: 980px) {
  .header-bar {
    flex-wrap: nowrap;
  }

  .site-nav {
    margin-left: auto;
  }

  .header-tools {
    margin-left: 0.35rem;
  }

  .header-bar:not(:has(nav)) .header-tools {
    margin-left: auto;
  }
}

.hero {
  padding-block: clamp(2.5rem, 6vw, 4.75rem) clamp(3rem, 7vw, 5.5rem);
}

.hero-grid {
  display: grid;
  gap: 1.75rem;
  align-items: start;
}

.kicker {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tagline {
  max-width: 22em;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.35;
}

.location {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin-top: 1rem;
  color: var(--ink);
}

.location svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.lead {
  max-width: 38rem;
  margin-top: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.65;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
}

.button svg {
  width: 1.05rem;
  height: 1.05rem;
}

.button:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.button-secondary {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

.button:active {
  transform: translateY(1px);
}

.placeholder {
  display: inline-block;
  margin-left: 0.15rem;
  padding: 0.1rem 0.45rem;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

.facts {
  padding: 1.25rem 1.25rem 0.4rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.facts .kicker {
  margin-bottom: 0.85rem;
}

.facts div + div {
  border-top: 1px solid var(--line);
}

.facts div {
  padding-block: 0.8rem;
}

.facts dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.facts dd {
  margin-top: 0.15rem;
  font-weight: 700;
}

.section {
  padding-block: clamp(3.25rem, 7vw, 5.5rem);
  scroll-margin-top: 5.25rem;
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.section-head h2 {
  margin-top: 0.4rem;
}

.section-lead {
  margin-top: 0.85rem;
  color: var(--muted);
}

.prose {
  max-width: 40rem;
}

.prose p + p {
  margin-top: 1rem;
}

.languages {
  display: grid;
  gap: 0.85rem;
  margin-top: 2rem;
}

.languages div {
  padding-top: 0.75rem;
  border-top: 2px solid var(--accent);
}

.languages dd {
  margin-top: 0.15rem;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline li {
  display: grid;
  gap: 0.35rem;
  padding: 0 0 1.85rem 1.35rem;
  border-left: 1px solid var(--line-strong);
  position: relative;
}

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

.timeline li::before {
  content: "";
  position: absolute;
  top: 0.3rem;
  left: -0.38rem;
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
}

.when {
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
}

.where {
  color: var(--muted);
  font-size: 0.95rem;
}

.event p:last-child {
  max-width: 42rem;
  margin-top: 0.35rem;
}

.skills {
  display: grid;
  gap: 1.35rem 2rem;
}

.skill-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.skill-level {
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
}

.meter {
  height: 0.45rem;
  margin-top: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--accent-soft);
}

.meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transform-origin: left center;
  animation: grow 0.7s ease both;
}

.level-30 { width: 30%; }
.level-38 { width: 38%; }
.level-42 { width: 42%; }
.level-70 { width: 70%; }
.level-72 { width: 72%; }
.level-80 { width: 80%; }

.skill-note {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

@keyframes grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.projects {
  display: grid;
  gap: 1rem;
}

.project {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 100%;
  padding: 1.3rem 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.project-index {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1;
}

.project-kind,
.tags {
  color: var(--muted);
  font-size: 0.92rem;
}

.tags span + span::before {
  content: " · ";
}

.contact {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.contact-grid {
  display: grid;
  gap: 1.75rem;
}

.email {
  display: inline-block;
  margin-top: 0.85rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}

.contact-list {
  display: grid;
  gap: 1.15rem;
  font-style: normal;
}

.contact-list dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-list dd {
  margin-top: 0.25rem;
}

.fine {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer {
  padding-block: 1.35rem 2rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: end;
}

.footer-inner a {
  color: var(--ink);
  font-weight: 700;
}

body:has(.missing) {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
}

.missing {
  display: grid;
  flex: 1;
  align-items: center;
  padding-block: 2rem;
}

.missing-card {
  max-width: 36rem;
}

.missing h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
}

.missing p {
  margin-top: 0.9rem;
  max-width: 34rem;
}

.missing .actions {
  margin-top: 1.5rem;
}

@media (min-width: 700px) {
  .languages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .projects {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 880px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.8fr);
    gap: 3rem;
    align-items: end;
  }

  .timeline li {
    grid-template-columns: 12.5rem minmax(0, 1fr);
    column-gap: 1.5rem;
    row-gap: 0;
    padding: 0;
    border-left: 0;
  }

  .timeline li::before {
    display: none;
  }

  .event {
    padding: 0 0 2.1rem 1.4rem;
    border-left: 1px solid var(--line-strong);
    position: relative;
  }

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

  .event::before {
    content: "";
    position: absolute;
    top: 0.3rem;
    left: -0.38rem;
    width: 0.7rem;
    height: 0.7rem;
    border: 2px solid var(--accent);
    border-radius: 50%;
    background: var(--bg);
  }

  .when {
    padding-top: 0.05rem;
  }
}

@media (min-width: 1040px) {
  .projects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
    gap: 3rem;
    align-items: start;
  }
}

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

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

  .button:active {
    transform: none;
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --ink: #1c1915;
    --muted: #3f3a34;
    --accent: #0e564f;
    --accent-ink: #ffffff;
    --line: #cccccc;
    --line-strong: #666666;
  }

  .skip-link,
  .header-tools,
  .site-nav,
  .actions {
    display: none !important;
  }

  .site-header {
    position: static;
    border: 0;
    background: #ffffff;
  }

  .section,
  .hero,
  .project,
  .facts {
    break-inside: avoid;
    box-shadow: none;
  }

  body {
    background: #ffffff;
    color: #1c1915;
  }

  a[href^="http"]::after,
  a[href^="mailto:"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }
}
