:root {
  --color-bg: #f7f9fc;
  --color-surface: #ffffff;
  --color-ink: #2b2d42;
  --color-muted: #69768b;
  --color-line: #dfe5ef;
  --color-primary: #2f7cff;
  --color-primary-dark: #1f52a9;
  --color-accent: #4eba9a;
  --color-teal-dark: #39797e;
  --color-header: #ffffff;
  --shadow-soft: 0 14px 32px rgba(43, 45, 66, 0.08);
  --shadow-card: 0 8px 18px rgba(43, 45, 66, 0.06);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.6;
  padding-top: 90px;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

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

img,
svg {
  display: block;
}

button,
input,
textarea {
  font: inherit;
}

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

.container {
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
}

.section {
  padding: 96px 0;
  scroll-margin-top: 86px;
}

#kontakt {
  scroll-margin-top: 100px;
}

.section-tight {
  padding: 42px 0 72px;
}

.section-muted {
  background: #edf3f7;
}

main > section {
  border-top: 1px solid rgba(43, 45, 66, 0.08);
}

main > section:first-child {
  border-top: 0;
}

#leistungen {
  background:
    linear-gradient(180deg, #f4f8ff 0%, #eef5ff 100%);
}

#projekte {
  background:
    linear-gradient(180deg, #eef6f5 0%, #e7f0f2 100%);
}

#ueber-mich {
  background: #ffffff;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 90px;
  padding: 10px max(20px, calc((100vw - var(--container)) / 2));
  color: var(--color-ink);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(43, 45, 66, 0.09);
  box-shadow: 0 8px 24px rgba(43, 45, 66, 0.06);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  line-height: 1;
}

.brand-text strong {
  color: var(--color-ink);
  font-size: 1.75rem;
}

.brand-text span {
  color: var(--color-muted);
  font-size: 1.75rem;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.site-nav a {
  padding: 10px 12px;
  color: rgba(43, 45, 66, 0.78);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: color 180ms ease, background 180ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--color-primary-dark);
  background: rgba(47, 124, 255, 0.1);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 10px;
  padding-left: 12px;
  color: var(--color-muted);
  font-size: 0.88rem;
  font-weight: 800;
  border-left: 1px solid var(--color-line);
}

.language-switch a {
  padding: 7px 8px;
  color: var(--color-muted);
}

.language-switch a.is-active {
  color: #ffffff;
  background: var(--color-primary);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  transition: transform 180ms ease, opacity 180ms ease;
}

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

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

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.82fr);
  gap: 56px;
  align-items: center;
  min-height: calc(100vh - 90px);
  padding: 94px max(20px, calc((100vw - var(--container)) / 2)) 76px;
  background: #ffffff;
  border-bottom: 1px solid var(--color-line);
}

.hero-content,
.hero-visual {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 850px;
  margin-bottom: 24px;
  font-size: clamp(2.45rem, 5vw, 5.1rem);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.hero h1 {
  max-width: 780px;
  font-size: clamp(2.2rem, 3vw, 3.35rem);
  line-height: 1.1;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.12rem;
  line-height: 1.28;
}

.hero-text {
  max-width: 660px;
  margin-bottom: 34px;
  color: var(--color-muted);
  font-size: 1.18rem;
}

.hero-actions,
.contact-actions,
.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.intro-actions {
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  font-weight: 800;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  text-align: center;
  overflow-wrap: anywhere;
  transition: transform 180ms ease, box-shadow 180ms ease, color 180ms ease, background 180ms ease, border-color 180ms ease;
}

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

.button:focus-visible {
  outline: 3px solid rgba(47, 124, 255, 0.28);
  outline-offset: 3px;
}

.button:active {
  transform: translateY(0);
}

.button-primary {
  color: #ffffff;
  background: var(--color-primary);
  box-shadow: 0 12px 24px rgba(47, 124, 255, 0.22);
}

.button-primary:hover {
  background: var(--color-primary-dark);
}

.button-secondary {
  color: var(--color-primary-dark);
  background: #ffffff;
  border-color: var(--color-primary);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  color: #ffffff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.button-light {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.logo-intro {
  min-height: calc(100vh - 90px);
  display: grid;
  align-items: center;
  text-align: center;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  border-bottom: 1px solid var(--color-line);
}

.logo-intro-inner {
  display: grid;
  justify-items: center;
  gap: 20px;
  width: min(100% - 40px, 920px);
  max-width: 920px;
}

.logo-intro-inner > * {
  max-width: 100%;
  min-width: 0;
}

.logo-intro-inner > :not(.intro-logo):not(.button) {
  width: 100%;
}

.logo-intro-inner .button {
  width: auto;
}

.intro-logo {
  width: clamp(180px, 22vw, 290px);
  height: auto;
  object-fit: contain;
}

.intro-kicker {
  margin: 6px 0 0;
  color: var(--color-primary-dark);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.intro-text {
  max-width: 720px;
  margin: 0 0 8px;
  color: var(--color-muted);
  font-size: 1.08rem;
}

.logo-intro h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4.3vw, 4.25rem);
  line-height: 1.08;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-photo-card {
  display: grid;
  width: min(100%, 420px);
  margin: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.hero-photo-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  background: #f3f6fb;
}

.hero-photo-card figcaption {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  background: #ffffff;
  border-top: 1px solid var(--color-line);
}

.hero-photo-card figcaption strong {
  font-size: 1.06rem;
}

.hero-photo-card figcaption span {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.automation-panel {
  position: relative;
  width: min(100%, 430px);
  min-height: 460px;
  padding: 26px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.automation-panel::before,
.automation-panel::after {
  position: absolute;
  content: "";
  border-radius: 999px;
}

.automation-panel::before {
  inset: auto -90px -120px auto;
  width: 230px;
  height: 230px;
  background: rgba(26, 166, 166, 0.13);
}

.automation-panel::after {
  top: 92px;
  left: -70px;
  width: 170px;
  height: 170px;
  background: rgba(15, 111, 143, 0.1);
}

.panel-header {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  margin-bottom: 34px;
}

.panel-header span {
  width: 10px;
  height: 10px;
  background: #b7c4d0;
  border-radius: 999px;
}

.control-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(5, 58px);
  gap: 14px;
}

.node,
.module,
.line {
  border-radius: var(--radius-sm);
}

.node {
  grid-column: span 2;
  background: #e8f2f6;
  border: 1px solid #cce0e9;
}

.node-primary {
  background: var(--color-primary);
}

.node-accent {
  background: var(--color-accent);
}

.module {
  grid-column: span 3;
  background: #f2f6f9;
  border: 1px solid #dce5ed;
}

.module-wide {
  grid-column: span 4;
  background: var(--color-ink);
}

.module-dark {
  background: var(--color-teal-dark);
}

.line {
  align-self: center;
  height: 4px;
  background: #9fb3c4;
}

.line-a {
  grid-column: span 2;
}

.line-b,
.line-c {
  grid-column: span 1;
}

.signal-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 34px;
}

.signal-row span {
  height: 76px;
  background: linear-gradient(180deg, #e8f2f6, #ffffff);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
}

.fact-grid,
.card-grid,
.project-grid {
  display: grid;
  gap: 20px;
}

.fact-grid {
  grid-template-columns: repeat(4, 1fr);
}

.mini-card,
.card,
.project-card,
.about-panel,
.about-aside,
.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.mini-card {
  min-height: 154px;
  padding: 24px;
}

.mini-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--color-primary-dark);
  font-size: 1.28rem;
  line-height: 1.15;
}

.mini-card span {
  display: block;
  color: var(--color-muted);
}

.mini-card h2 {
  margin: 16px 0 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--color-primary);
  background: #eaf5f7;
  border-radius: var(--radius-sm);
}

.icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(46%) sepia(95%) saturate(3099%) hue-rotate(204deg) brightness(101%) contrast(101%);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 38px;
}

.section-heading h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
}

.section-heading p:last-child {
  color: var(--color-muted);
  font-size: 1.05rem;
}

.service-grid {
  grid-template-columns: repeat(3, 1fr);
}

.service-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-content: start;
  column-gap: 12px;
}

.service-card .service-media {
  grid-column: 1 / -1;
  grid-row: 1;
}

.service-card .icon {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
}

.service-card h3 {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  margin: 0;
}

.service-card p,
.service-card .service-list {
  grid-column: 1 / -1;
}

.card {
  min-height: 244px;
  padding: 26px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover,
.project-card:hover {
  border-color: rgba(47, 124, 255, 0.25);
  box-shadow: 0 12px 26px rgba(43, 45, 66, 0.08);
  transform: translateY(-2px);
}

.card h3 {
  margin-top: 18px;
}

.service-card h3 {
  margin: 0;
}

.service-media {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 18px 0 22px;
  overflow: hidden;
  background: #102034;
  border-radius: var(--radius-sm);
}

.service-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.card p,
.timeline-item p,
.project-summary,
.about-panel p,
.contact-content p,
.site-footer p {
  color: var(--color-muted);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.process-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.timeline-item {
  position: relative;
  padding: 24px 20px;
  background: #ffffff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}

.timeline-number {
  display: inline-grid;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  background: var(--color-primary);
  border-radius: 999px;
}

.process-grid .timeline-item {
  min-height: 230px;
}

.skills-grid {
  grid-template-columns: repeat(3, 1fr);
}

.project-card ul,
.about-aside ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.project-card li,
.about-aside li {
  padding: 7px 10px;
  color: #344457;
  font-size: 0.92rem;
  background: #f1f6f8;
  border: 1px solid #dfe9ef;
  border-radius: var(--radius-sm);
}

.service-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.service-list li {
  position: relative;
  padding-left: 16px;
  color: #344457;
  font-size: 0.93rem;
  line-height: 1.45;
}

.service-list li::before {
  position: absolute;
  top: 0.66em;
  left: 0;
  width: 5px;
  height: 5px;
  content: "";
  background: var(--color-primary);
  border-radius: 999px;
}

.project-grid {
  grid-template-columns: repeat(3, 1fr);
}

.project-card {
  padding: 28px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.project-summary {
  margin-bottom: 16px;
}

.project-icon {
  position: relative;
  width: 100%;
  height: 128px;
  margin-bottom: 24px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.45) 50%, transparent 51%),
    linear-gradient(180deg, var(--color-primary), var(--color-ink));
  border-radius: var(--radius-md);
}

.project-icon span {
  position: absolute;
  right: 26px;
  bottom: 22px;
  width: 96px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-sm);
}

.project-icon svg {
  position: absolute;
  inset: 18px 22px;
  width: calc(100% - 44px);
  height: calc(100% - 36px);
  fill: none;
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-icon img {
  position: absolute;
  inset: 18px 22px;
  width: calc(100% - 44px);
  height: calc(100% - 36px);
  object-fit: contain;
}

.project-icon-robot img {
  filter: invert(1);
}

.project-icon-oil-gas {
  background:
    radial-gradient(circle at 22% 22%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #2f7cff, #173352);
}

.project-icon-oil-gas img {
  inset: 14px 26px;
  width: calc(100% - 52px);
  height: calc(100% - 28px);
}

.project-icon-twin {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(180deg, var(--color-accent), var(--color-ink));
}

.project-icon-twin img {
  inset: 14px 28px;
  width: calc(100% - 56px);
  height: calc(100% - 28px);
  filter: invert(1);
}

.project-icon-vertical-handling {
  background:
    radial-gradient(circle at 68% 26%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(180deg, var(--color-teal-dark), var(--color-ink));
}

.project-icon-hcs-hpc {
  background:
    radial-gradient(circle at 70% 24%, rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(180deg, var(--color-teal-dark), var(--color-ink));
}

.project-icon-hcs-hpc img {
  inset: 13px 18px;
  width: calc(100% - 36px);
  height: calc(100% - 26px);
}

.project-icon-robot {
  background:
    radial-gradient(circle at 72% 26%, rgba(255, 255, 255, 0.2), transparent 28%),
    linear-gradient(180deg, #3a9ea6, #1c2b45);
}

.project-icon-conveyor {
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(180deg, #4aa86f, #1c2b45);
}

.project-icon-conveyor img {
  inset: 13px 24px;
  width: calc(100% - 48px);
  height: calc(100% - 26px);
  filter: invert(1);
}

.project-icon-alt {
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.36) 50%, transparent 51%),
    linear-gradient(180deg, var(--color-accent), var(--color-ink));
}

.project-icon-dark {
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.28) 50%, transparent 51%),
    linear-gradient(180deg, var(--color-teal-dark), var(--color-ink));
}

.about-layout,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: stretch;
}

.personal-section {
  background: #ffffff;
}

.personal-section .about-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: center;
  gap: 48px;
}

.personal-section .about-panel {
  box-shadow: none;
}

.personal-section .about-panel p {
  font-size: 1.05rem;
}

.personal-section .fact-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 28px;
}

.personal-photo {
  justify-self: end;
  width: min(100%, 420px);
}

.about-panel {
  padding: 38px;
}

.about-aside {
  padding: 30px;
  background: var(--color-ink);
  border-color: var(--color-ink);
}

.about-aside h3 {
  color: #ffffff;
}

.about-aside li {
  width: 100%;
  color: #d8e5ed;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.contact {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(43, 45, 66, 0.97), rgba(57, 121, 126, 0.94)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 92px);
}

.contact .eyebrow {
  color: #7de0df;
}

.contact-content p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.08rem;
}

.contact-card {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 30px;
  color: var(--color-ink);
}

.contact-card strong {
  font-size: 1.2rem;
}

.contact-card a {
  color: var(--color-primary-dark);
  font-weight: 700;
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: #0d1420;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 0.8fr;
  gap: 30px;
  padding: 54px 0;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 800;
}

.site-footer h2 {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 1rem;
}

.site-footer a {
  display: block;
  width: fit-content;
  margin-bottom: 8px;
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding: 18px 20px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.footer-bottom p {
  margin: 0;
}

.legal-main {
  background: #ffffff;
}

.legal-hero {
  padding: 86px max(20px, calc((100vw - var(--container)) / 2)) 52px;
  background: #ffffff;
  border-bottom: 1px solid var(--color-line);
}

.legal-hero h1 {
  max-width: var(--container);
  font-size: clamp(1.55rem, 3.4vw, 3.2rem);
  line-height: 1.06;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.legal-hero p:last-child {
  max-width: 760px;
  color: var(--color-muted);
  font-size: 1.05rem;
}

.legal-content {
  padding: 54px 0 96px;
}

.legal-card {
  max-width: 900px;
  padding: 34px;
  margin-bottom: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.legal-card h2 {
  margin-bottom: 12px;
  font-size: 1.45rem;
}

.legal-card h3 {
  margin-bottom: 8px;
  font-size: 1.06rem;
}

.legal-card p,
.legal-card li {
  color: var(--color-muted);
}

.legal-card ul {
  padding-left: 20px;
  margin: 0 0 16px;
}

.legal-card a {
  color: var(--color-primary-dark);
  font-weight: 700;
}

.legal-note {
  border-color: rgba(47, 124, 255, 0.25);
  background: #f4f8ff;
}

.cookie-banner {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  width: min(720px, calc(100% - 48px));
  box-sizing: border-box;
  padding: 20px;
  color: var(--color-ink);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 46px rgba(13, 20, 32, 0.18);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner strong {
  display: block;
  margin-bottom: 4px;
}

.cookie-banner p {
  margin: 0;
  color: var(--color-muted);
}

.cookie-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-visual {
    justify-content: flex-start;
  }

  .fact-grid,
  .service-grid,
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .personal-section .fact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .site-header {
    padding: 14px 20px;
  }

  .nav-toggle {
    display: block;
  }

.site-nav {
    position: fixed;
    inset: 90px 0 auto 0;
    width: auto;
    display: grid;
    gap: 0;
    padding: 18px 20px 22px;
    background: #ffffff;
    border-top: 1px solid rgba(43, 45, 66, 0.09);
    box-shadow: 0 24px 45px rgba(0, 0, 0, 0.22);
    transform: translateY(-120%);
    transition: transform 220ms ease;
  }

  .nav-open .site-nav {
    transform: translateY(0);
  }

  .site-nav a {
    padding: 14px 10px;
    border-radius: 0;
    border-bottom: 1px solid rgba(43, 45, 66, 0.09);
  }

  .language-switch {
    margin: 14px 0 0;
    padding: 8px 0 0;
    border-top: 1px solid rgba(43, 45, 66, 0.09);
    border-left: 0;
  }

  .project-grid,
  .about-layout,
  .contact-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .personal-section .about-layout {
    grid-template-columns: 1fr;
  }

  .personal-photo {
    justify-self: stretch;
  }

  .about-aside {
    min-height: auto;
  }

  .cookie-banner {
    grid-template-columns: 1fr;
  }

  .cookie-actions {
    justify-content: stretch;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .section {
    padding: 68px 0;
  }

  .section-tight {
    padding: 28px 0 52px;
  }

  .logo-intro-inner {
    width: min(100% - 28px, 920px);
  }

  .brand {
    min-width: 0;
  }

  .site-header {
    min-height: 78px;
    padding: 8px 14px;
  }

  body {
    padding-top: 78px;
  }

  .brand-logo {
    width: 62px;
    height: 62px;
  }

  .brand-text strong,
  .brand-text span {
    font-size: 1.22rem;
  }

  .site-nav {
    inset: 78px 0 auto 0;
  }

  .hero {
    gap: 34px;
    padding: 64px 14px 54px;
  }

  h1 {
    font-size: clamp(1.65rem, 7vw, 1.85rem);
  }

  .hero h1 {
    font-size: clamp(1.65rem, 7vw, 1.85rem);
  }

  h2 {
    font-size: 2rem;
  }

  .hero-actions,
  .contact-actions,
  .intro-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .legal-hero {
    padding: 68px 14px 42px;
  }

  .legal-card {
    padding: 24px;
  }

  .cookie-banner {
    left: 14px;
    right: auto;
    bottom: 14px;
    width: calc(100dvw - 28px);
  }

  .cookie-actions {
    display: grid;
  }

  .automation-panel {
    min-height: 360px;
    padding: 20px;
  }

  .control-grid {
    grid-template-rows: repeat(5, 42px);
    gap: 10px;
  }

  .signal-row span {
    height: 56px;
  }

  .fact-grid,
  .service-grid,
  .timeline,
  .skills-grid,
  .personal-section .fact-grid {
    grid-template-columns: 1fr;
  }

  .mini-card,
  .card,
  .project-card,
  .about-panel,
  .about-aside,
  .contact-card {
    padding: 22px;
  }

  .card {
    min-height: auto;
  }

  .project-icon {
    height: 112px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
