:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --paper: #fffdf8;
  --ink: #171717;
  --muted: #6e6a61;
  --line: rgba(23, 23, 23, 0.14);
  --green: #4e8d66;
  --blue: #2c6f8f;
  --red: #bd4a3b;
  --yellow: #e2b94f;
  --shadow: 0 24px 80px rgba(35, 31, 24, 0.14);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101419;
  --paper: #171d24;
  --ink: #f6f7f4;
  --muted: #b7b4aa;
  --line: rgba(255, 255, 255, 0.14);
  --green: #58c982;
  --blue: #5eb5da;
  --red: #ee715f;
  --yellow: #f2c95d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(23, 23, 23, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(23, 23, 23, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

body[data-theme="dark"]::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
}

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

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

.floating-cubes {
  position: fixed;
  z-index: 6;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.floating-cubes.is-hidden-over-hero { opacity: 0 !important; }

.float-cube {
  position: absolute;
  top: 0;
  left: 0;
  width: 25px;
  height: 25px;
  border-radius: 5px;
  background: var(--cube-color);
  opacity: var(--opacity);
  box-shadow:
    inset -7px -7px 0 rgba(0, 0, 0, 0.16),
    inset 4px 4px 0 rgba(255, 255, 255, 0.28),
    0 18px 36px rgba(0, 0, 0, 0.12);
  transform: translate3d(-120px, -120px, 0);
  will-change: transform;
}

.float-cube::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), transparent 45%),
    linear-gradient(315deg, rgba(0, 0, 0, 0.12), transparent 48%);
  pointer-events: none;
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  height: 78px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 clamp(18px, 4vw, 52px);
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.7);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.site-header.scrolled,
.site-header.menu-open {
  color: var(--ink);
  background: rgba(255, 253, 248, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  text-shadow: none;
}

main,
.site-footer {
  position: relative;
  z-index: 3;
}

body[data-theme="dark"] .site-header.scrolled,
body[data-theme="dark"] .site-header.menu-open {
  background: rgba(16, 20, 25, 0.9);
  color: var(--ink);
}

.brand {
  display: grid;
  gap: 1px;
  font-weight: 900;
  white-space: nowrap;
  font-size: 18px;
}

.brand small {
  color: currentColor;
  opacity: 0.65;
  font-size: 12px;
  font-weight: 650;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  padding: 12px 16px;
  border-radius: 7px;
  font-size: 16px;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.08);
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.18);
}

.site-header.scrolled .nav a:hover,
.site-header.menu-open .nav a:hover {
  background: rgba(23, 23, 23, 0.08);
}

.account-launch {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 7px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.theme-toggle {
  position: relative;
  width: 66px;
  height: 36px;
  min-width: 66px;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  cursor: pointer;
  overflow: hidden;
}

.site-header.scrolled .theme-toggle,
.site-header.menu-open .theme-toggle {
  border-color: var(--line);
  background: rgba(23, 23, 23, 0.08);
  color: var(--ink);
}

body[data-theme="dark"] .site-header.scrolled .theme-toggle,
body[data-theme="dark"] .site-header.menu-open .theme-toggle {
  background: rgba(255, 255, 255, 0.08);
}

.theme-toggle::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.22);
  transform: translateY(-50%);
  transition: transform 0.2s ease, background 0.2s ease;
}

body[data-theme="dark"] .theme-toggle::before {
  transform: translate(30px, -50%);
  background: #101419;
}

.theme-icon {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
  opacity: 0.92;
  transform: translateY(-50%);
}

.theme-icon.sun {
  left: 4px;
  color: #d79c0d;
}

.theme-icon.moon {
  right: 4px;
  color: #d9ecff;
  font-size: 14px;
}

body:not([data-theme="dark"]) .theme-icon.sun {
  color: #e3a414;
}

body:not([data-theme="dark"]) .theme-icon.moon {
  color: rgba(255, 255, 255, 0.78);
}

body[data-theme="dark"] .theme-icon.sun {
  color: rgba(255, 255, 255, 0.62);
}

body[data-theme="dark"] .theme-icon.moon {
  color: #dceeff;
}

.site-header.scrolled .account-launch,
.site-header.menu-open .account-launch {
  border-color: var(--line);
  background: rgba(23, 23, 23, 0.06);
}

.account-launch:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.24);
}

.settings-fab {
  position: fixed;
  z-index: 50;
  left: 22px;
  bottom: 22px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #fff;
  background: rgba(16, 22, 28, 0.76);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(14px);
  cursor: pointer;
  font-size: 22px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.settings-fab:hover {
  transform: translateY(-3px) rotate(12deg);
  border-color: rgba(242, 201, 93, 0.72);
  background: rgba(25, 34, 42, 0.9);
}

.settings-fab.language-fab {
  font-size: 25px;
  line-height: 1;
}

.settings-fab.language-fab span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  transform: translateY(1px);
}

.settings-fab.language-fab:hover {
  transform: translateY(-3px);
}

.settings-overlay[hidden] {
  display: none;
}

.settings-overlay {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: start;
  padding: 24px;
  background: rgba(10, 13, 17, 0.35);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.16s ease;
}

.settings-overlay.open {
  opacity: 1;
}

.settings-panel {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.24);
}

.settings-panel h2 {
  margin: 8px 0 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 0.96;
}

.settings-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 22px;
}

.settings-row {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.language-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--soft);
  font: inherit;
  text-transform: none;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.language-option:hover {
  transform: translateY(-2px);
  border-color: rgba(233, 82, 55, 0.55);
}

.language-option.active {
  border-color: rgba(233, 82, 55, 0.8);
  background: rgba(233, 82, 55, 0.12);
}

.language-option .flag {
  font-size: 22px;
  line-height: 1;
}

.settings-panel p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid currentColor;
  border-radius: 7px;
  background: transparent;
  color: inherit;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 128px clamp(22px, 6vw, 76px) 132px;
  color: #fff;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: saturate(0.92) contrast(1.02);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(8, 11, 9, 0.82), rgba(8, 11, 9, 0.48) 42%, rgba(8, 11, 9, 0.08) 72%),
    linear-gradient(0deg, rgba(8, 11, 9, 0.62), transparent 48%);
}

.hero-content {
  position: relative;
  width: min(760px, 100%);
  transform: translateY(-160px);
}

.eyebrow,
.kicker {
  display: block;
  margin: 0 0 14px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(54px, 9vw, 118px);
  line-height: 0.92;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
}

h3 {
  margin-bottom: 9px;
  font-size: 24px;
}

.lead {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 7px;
  padding: 0 30px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  backdrop-filter: blur(12px);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.button::after {
  content: "→";
  font-size: 22px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.button:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.2);
}

.button:hover::after {
  transform: translateX(4px);
}

.button.primary {
  background: #fff;
  color: #171717;
}

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

.intro-strip {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: -34px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.intro-strip p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 17px;
}

.intro-strip a,
.project-card strong {
  font-weight: 850;
}

.section {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 0;
}

.section-head {
  width: min(760px, 100%);
  margin-bottom: 28px;
}

.project-section .section-head {
  width: 100%;
}

.project-section h2 {
  max-width: none;
  white-space: nowrap;
}

.section-head .kicker,
.contact-section .kicker {
  color: var(--red);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.project-card {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

body[data-theme="dark"] .project-card,
body[data-theme="dark"] .intro-strip,
body[data-theme="dark"] .account-preview,
body[data-theme="dark"] .timeline-card,
body[data-theme="dark"] .contact-card,
body[data-theme="dark"] .legal-card {
  background: var(--paper);
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(23, 23, 23, 0.25);
  box-shadow: 0 28px 90px rgba(35, 31, 24, 0.18);
}

.project-card.featured {
  grid-row: auto;
}

.browser-shot {
  position: relative;
  height: 390px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #111;
}

.browser-shot > span {
  display: none;
}

.browser-shot img,
.placeholder-visual {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #111;
}

/* Individuelle Bildausschnitte der beiden Projektkarten. */
.browser-shot img.project-image-cubytel {
  object-fit: cover;
  object-position: 68% center;
}

.browser-shot img.project-image-maki {
  object-fit: cover;
  object-position: 0% center;
}

.project-card > div:last-child {
  padding: 18px;
}

.project-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.project-card p {
  color: var(--muted);
  line-height: 1.55;
  min-height: 0;
}

.project-card strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.project-card strong::after {
  content: "→";
  transition: transform 0.18s ease;
}

.project-card:hover strong::after {
  transform: translateX(4px);
}

.account-section {
  padding-top: 86px;
}

.account-section .section-head p {
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.account-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--paper);
  box-shadow: 0 20px 70px rgba(35, 31, 24, 0.1);
}

.account-preview span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.account-preview strong {
  font-size: clamp(24px, 3vw, 38px);
}

.button.dark {
  border-color: #171717;
  background: #171717;
  color: #fff;
}

.placeholder-visual {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(78, 141, 102, 0.95), rgba(44, 111, 143, 0.95)),
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(255, 255, 255, 0.12) 14px 15px);
  font-size: 42px;
  font-weight: 900;
}

.timeline-section {
  padding-top: 126px;
}

.timeline {
  --timeline-progress: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px minmax(0, 1fr);
  grid-auto-rows: minmax(190px, auto);
  gap: 16px 22px;
  min-height: 1420px;
  padding: 36px 0 58px;
}

.timeline-line {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 156px;
  height: 100%;
  transform: translateX(-50%);
  overflow: visible;
  pointer-events: none;
}

.timeline-line path {
  fill: none;
  stroke-linecap: round;
  stroke-width: 8;
}

.timeline-line-bg {
  stroke: rgba(189, 74, 59, 0.16);
}

.timeline-line-fill {
  stroke: var(--red);
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--timeline-progress));
  transition: stroke-dashoffset 0.12s linear;
}

.timeline-card {
  position: relative;
  z-index: 1;
  grid-column: 1;
  align-self: start;
  min-height: 232px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 22px 70px rgba(35, 31, 24, 0.12);
  opacity: 0;
  transform: translateX(-54px);
  transition: opacity 0.58s ease, transform 0.58s cubic-bezier(0.2, 0.75, 0.2, 1), box-shadow 0.22s ease;
}

.timeline-card:nth-of-type(even) {
  grid-column: 3;
  transform: translateX(54px);
}

.timeline-card:nth-of-type(1) {
  grid-row: 1;
}

.timeline-card:nth-of-type(2) {
  grid-row: 2;
}

.timeline-card:nth-of-type(3) {
  grid-row: 3;
}

.timeline-card:nth-of-type(4) {
  grid-row: 4;
}

.timeline-card:nth-of-type(5) {
  grid-row: 5;
}

.timeline-card:nth-of-type(6) {
  grid-row: 6;
}

.timeline-card:nth-of-type(7) {
  grid-row: 7;
}

.timeline-card.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-card:hover {
  box-shadow: 0 28px 86px rgba(35, 31, 24, 0.18);
}

.timeline-card::before {
  content: "";
  position: absolute;
  top: 32px;
  right: -70px;
  width: 17px;
  height: 17px;
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 8px rgba(189, 74, 59, 0.14), 0 12px 30px rgba(189, 74, 59, 0.26);
}

.timeline-card:nth-of-type(even)::before {
  right: auto;
  left: -70px;
}

.timeline-card::after {
  content: "";
  position: absolute;
  top: 39px;
  right: -47px;
  width: 47px;
  height: 1px;
  background: rgba(189, 74, 59, 0.34);
}

.timeline-card:nth-of-type(even)::after {
  right: auto;
  left: -47px;
}

.date {
  display: inline-flex;
  margin-bottom: 34px;
  border: 1px solid rgba(44, 111, 143, 0.2);
  border-radius: 999px;
  padding: 8px 11px;
  color: #163f53;
  background: rgba(44, 111, 143, 0.1);
  font-size: 14px;
  font-weight: 850;
  text-transform: uppercase;
}

body[data-theme="dark"] .date {
  border-color: rgba(242, 201, 93, 0.62);
  background: linear-gradient(135deg, rgba(242, 201, 93, 0.24), rgba(94, 181, 218, 0.28));
  color: #ffe79a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 28px rgba(242, 201, 93, 0.12);
}

.timeline-card p {
  color: var(--muted);
  line-height: 1.58;
}

.contact-section {
  padding-bottom: 90px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.62fr 0.9fr minmax(470px, 1.55fr);
  gap: 14px;
  align-items: stretch;
}

.contact-links {
  display: grid;
  gap: 10px;
}

.contact-card,
.email-card {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--paper);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.contact-card::before,
.email-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.contact-card:hover,
.email-card:hover {
  transform: translateY(-6px);
  border-color: rgba(23, 23, 23, 0.28);
  box-shadow: 0 22px 58px rgba(35, 31, 24, 0.18);
}

.contact-card:hover::before,
.email-card:hover::before {
  transform: scaleX(1);
}

.contact-card span,
.email-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-card strong,
.email-card strong {
  min-width: 0;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.contact-card em {
  position: absolute;
  right: 16px;
  top: 14px;
  color: var(--muted);
  font-style: normal;
  font-size: 22px;
  transition: transform 0.18s ease, color 0.18s ease;
}

.contact-card:hover em {
  color: var(--ink);
  transform: translate(3px, -3px);
}

.email-card {
  background: #171717;
  color: #fff;
  min-height: 210px;
}

.email-card:hover {
  background:
    linear-gradient(135deg, rgba(23, 23, 23, 0.96), rgba(31, 61, 74, 0.96)),
    #171717;
}

.email-card span {
  color: rgba(255, 255, 255, 0.58);
}

.email-card em {
  color: rgba(255, 255, 255, 0.72);
  font-style: normal;
  font-weight: 800;
}

.email-card strong {
  font-size: clamp(21px, 1.72vw, 27px);
  overflow-wrap: normal;
  word-break: normal;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 26px 0 36px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer a {
  font-weight: 780;
}

.account-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: none;
  place-items: center;
  padding: 14px;
  background: rgba(12, 14, 16, 0.58);
  backdrop-filter: blur(9px);
}

.account-backdrop.open {
  display: grid;
}

.account-modal {
  width: min(1780px, calc(100vw - 18px));
  height: min(980px, calc(100vh - 18px));
  max-height: calc(100vh - 18px);
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: #171b21;
  color: #f7f8fa;
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.48);
}

@media (min-width: 1800px) {
  .account-backdrop.admin-mode .account-modal {
    width: min(3040px, calc(100vw - 72px));
    height: min(1280px, calc(100vh - 54px));
    max-height: calc(100vh - 54px);
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
  }

  .account-backdrop.admin-mode .account-panel {
    max-height: calc(100vh - 54px);
    padding: 38px 46px;
  }

  .account-backdrop.admin-mode .account-aside {
    padding: 42px 38px;
  }
}

body.construction-open {
  overflow: hidden;
}

.construction-overlay {
  position: fixed;
  z-index: 160;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 7, 10, 0.82);
  backdrop-filter: blur(18px);
}

.construction-overlay[hidden] {
  display: none;
}

.construction-layout {
  display: flex;
  align-items: stretch;
  gap: 18px;
  width: min(1160px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
}

.construction-dialog {
  flex: 1 1 0;
  width: auto;
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid rgba(227, 193, 119, 0.28);
  border-radius: 26px;
  padding: clamp(26px, 4vw, 48px);
  color: #f5f2e9;
  background:
    radial-gradient(circle at 12% 0%, rgba(93, 227, 146, 0.12), transparent 34%),
    linear-gradient(145deg, #151b20, #0e1217);
  box-shadow: 0 40px 140px rgba(0, 0, 0, 0.62);
}

.construction-campaign {
  position: relative;
  z-index: 200;
  isolation: isolate;
  display: flex;
  flex: 0 0 330px;
  flex-direction: column;
  min-width: 0;
  justify-content: center;
  gap: 16px;
  overflow: auto;
  border: 1px solid rgba(227, 193, 119, 0.28);
  border-radius: 26px;
  padding: clamp(26px, 3vw, 42px);
  color: #f5f2e9;
  background: radial-gradient(circle at 100% 0%, rgba(227, 193, 119, 0.18), transparent 45%), linear-gradient(145deg, #181710, #0e1217);
  box-shadow: 0 40px 140px rgba(0, 0, 0, 0.62);
}

.construction-campaign .kicker { color: #e3c177; }
body.page-home .construction-campaign h2 { margin: 0; font-size: clamp(26px, 2.45vw, 38px); line-height: 1.02; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.construction-campaign p { margin: 0; color: rgba(245, 242, 233, 0.72); font-size: 15px; line-height: 1.6; }
.campaign-form { position: relative; z-index: 201; width: 100%; margin-top: auto; }
.campaign-link { position: relative; z-index: 1; display: inline-flex; width: 100%; align-items: center; justify-content: center; min-height: 50px; margin: 0; border: 0; border-radius: 13px; padding: 10px 14px; color: #07110c; background: linear-gradient(135deg, #f0d891, #d9ab48); font: inherit; font-weight: 900; text-align: center; cursor: pointer; pointer-events: auto; }

.construction-dialog .kicker {
  color: #e3c177;
}

.construction-dialog h2 {
  max-width: 650px;
  margin: 12px 0 18px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.construction-dialog > p {
  margin: 0;
  color: rgba(245, 242, 233, 0.72);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.62;
}

.construction-language {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.construction-language > span {
  color: rgba(245, 242, 233, 0.58);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.construction-dialog .language-option {
  border-color: rgba(255, 255, 255, 0.12);
  color: #f5f2e9;
  background: rgba(255, 255, 255, 0.055);
}

.construction-dialog .language-option.active {
  border-color: rgba(227, 193, 119, 0.68);
  background: rgba(227, 193, 119, 0.12);
}

.construction-continue {
  width: 100%;
  min-height: 58px;
  margin-top: 24px;
  border: 0;
  border-radius: 14px;
  color: #07110c;
  background: linear-gradient(135deg, #65dda0, #3fbd73);
  box-shadow: 0 18px 48px rgba(63, 189, 115, 0.22);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

@media (max-height: 800px) and (min-width: 561px) {
  .construction-dialog {
    padding: 24px 34px;
  }

  .construction-dialog h2 {
    margin: 8px 0 12px;
    font-size: 44px;
  }

  .construction-dialog > p {
    font-size: 14px;
    line-height: 1.48;
  }

  .construction-language {
    gap: 7px;
    margin-top: 16px;
  }

  .construction-dialog .language-option {
    min-height: 42px;
    padding: 7px 10px;
  }

  .construction-continue {
    min-height: 48px;
    margin-top: 14px;
  }

  .construction-campaign { padding: 24px 28px; gap: 12px; }
  body.page-home .construction-campaign h2 { font-size: 30px; }
  .construction-campaign p { font-size: 14px; line-height: 1.48; }
  .campaign-link { min-height: 44px; }
}

@media (max-width: 980px) {
  .construction-layout { flex-direction: column; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
  .construction-dialog, .construction-campaign { flex: none; max-height: none; }
  .construction-campaign { min-height: 0; }
  .campaign-form { margin-top: 6px; }
}

@media (max-width: 560px) {
  .construction-overlay { padding: 10px; }
  .construction-layout { width: 100%; max-height: calc(100vh - 20px); gap: 10px; }
  .construction-dialog { width: 100%; max-height: calc(100vh - 20px); border-radius: 20px; padding: 24px 18px; }
  .construction-campaign { border-radius: 20px; padding: 24px 18px; }
  .construction-dialog h2 { font-size: 36px; }
  .construction-dialog .language-list { gap: 7px; }
  .construction-dialog .language-option { min-height: 44px; padding: 8px 9px; font-size: 13px; }
}

.account-aside {
  padding: 30px 26px;
  background:
    linear-gradient(150deg, rgba(78, 141, 102, 0.28), rgba(44, 111, 143, 0.14)),
    #11161a;
}

.account-aside h2 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4vw, 58px);
}

.account-aside p {
  color: rgba(247, 248, 250, 0.72);
  line-height: 1.55;
}

.account-panel {
  min-height: 0;
  max-height: calc(100vh - 18px);
  overflow: auto;
  padding: 30px 34px;
  overscroll-behavior: contain;
}

.account-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

.account-panel > .account-message {
  position: sticky;
  z-index: 2;
  top: 0;
  min-height: 0;
  margin: -2px 0 16px;
  border-radius: 9px;
  background: rgba(23, 27, 33, 0.92);
}

.account-top h3 {
  margin: 0;
  font-size: 28px;
}

.account-close,
.small-action,
.admin-action {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #252b34;
  color: #f7f8fa;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.account-close {
  width: 40px;
  height: 40px;
}

.account-grid {
  display: grid;
  gap: 14px;
  padding-bottom: 24px;
}

.account-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.account-card h4 {
  margin: 0 0 12px;
  font-size: 18px;
}

.account-card p,
.account-message,
.account-muted {
  color: rgba(247, 248, 250, 0.68);
  line-height: 1.5;
}

.account-message:not(:empty) {
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 11px 13px;
}

.account-message.ok {
  color: #aaf1bf;
  background: rgba(84, 199, 128, 0.12);
}

.account-message.warn {
  color: #f0d891;
  background: rgba(240, 201, 107, 0.12);
}

.account-message.bad {
  color: #ffb6b6;
  background: rgba(255, 156, 156, 0.12);
}

.account-form {
  display: grid;
  gap: 11px;
}

.code-tier-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.code-tier-actions .account-submit {
  min-height: 64px;
  padding: 9px 12px;
  line-height: 1.15;
}

.code-tier-actions .account-submit span {
  font-size: 15px;
}

.code-tier-actions .account-submit small {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 750;
  opacity: .72;
}

.code-tier-actions .code-tier-light {
  border: 1px solid rgba(240, 201, 107, .42);
  background: rgba(240, 201, 107, .13);
  color: #f5dda5;
}

@media (max-width: 460px) {
  .code-tier-actions {
    grid-template-columns: 1fr;
  }
}

.account-form label {
  display: grid;
  gap: 7px;
  color: rgba(247, 248, 250, 0.68);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.account-form input,
.account-form textarea,
.account-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 0 12px;
  background: #101419;
  color: #f7f8fa;
  font: inherit;
}

.account-form textarea {
  min-height: 96px;
  padding-block: 12px;
  resize: vertical;
}

.account-code-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #101419;
  overflow: hidden;
}

.account-code-field span {
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(84, 199, 128, 0.12);
  color: #c7ffd9;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: none;
}

.account-form .account-code-field input {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-transform: uppercase;
}

.account-form .account-code-field:focus-within {
  border-color: #54c780;
  box-shadow: 0 0 0 3px rgba(84, 199, 128, 0.18);
}

.account-form input:focus,
.account-form textarea:focus {
  outline: none;
  border-color: #54c780;
  box-shadow: 0 0 0 3px rgba(84, 199, 128, 0.18);
}

.account-submit {
  display: inline-grid;
  place-items: center;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: #54c780;
  color: #07130c;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
  text-align: center;
}

.account-submit.secondary {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #252b34;
  color: #f7f8fa;
}

.account-submit.danger {
  background: #ffb3b3;
  color: #2a0808;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.account-actions .account-submit {
  min-width: 140px;
  padding-inline: 18px;
  white-space: nowrap;
}

.account-actions [data-action="refresh"] {
  min-width: 190px;
}

.admin-only {
  display: none;
}

.admin-only.visible {
  display: inline-grid;
}

.admin-zone {
  display: none;
  margin-top: 18px;
}

.admin-zone.visible {
  display: grid;
  gap: 14px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.admin-stat {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-stat span {
  display: block;
  color: rgba(247, 248, 250, 0.58);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-stat strong {
  display: block;
  margin-top: 7px;
  font-size: 26px;
}

.admin-stat-action {
  width: 100%;
  color: #f7f8fa;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-stat-action:hover {
  border-color: rgba(93, 227, 146, 0.52);
  background: rgba(93, 227, 146, 0.08);
}

.admin-stat-action span {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.admin-stat-action span b { color: #5de392; font-size: 14px; }

.activity-dialog {
  width: min(520px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid rgba(227, 193, 119, 0.3);
  border-radius: 18px;
  background: #151a20;
  color: #f7f8fa;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.65);
}
.activity-dialog::backdrop { background: rgba(2, 4, 7, 0.78); backdrop-filter: blur(8px); }
.activity-shell { display: grid; gap: 16px; padding: 22px; }
.activity-shell h3,.activity-shell p { margin: 0; }
.activity-shell>p { color: rgba(247,248,250,.68); line-height: 1.5; }
.activity-presets { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.activity-presets button { min-height: 38px; }
.activity-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.activity-dates label { display: grid; gap: 6px; color: rgba(247,248,250,.68); font-size: 12px; }
.activity-dates input { min-width: 0; height: 40px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; padding: 0 10px; background: #0f1318; color: #f7f8fa; color-scheme: dark; }
.activity-result { padding: 18px; border: 1px solid rgba(93,227,146,.22); border-radius: 12px; background: rgba(93,227,146,.06); }
.activity-result span,.activity-result small { display: block; color: rgba(247,248,250,.65); }
.activity-result strong { display: block; margin: 5px 0; font-size: 42px; line-height: 1; }

.admin-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.admin-table th:nth-child(1),
.admin-table td:nth-child(1) {
  width: 14%;
}

.admin-table th:nth-child(2),
.admin-table td:nth-child(2) {
  width: 10%;
}

.admin-table th:nth-child(3),
.admin-table td:nth-child(3) {
  width: 7%;
}

.admin-table th:nth-child(4),
.admin-table td:nth-child(4) {
  width: 7%;
}

.admin-table th:nth-child(5),
.admin-table td:nth-child(5) {
  width: 15%;
}

.admin-table th:nth-child(6),
.admin-table td:nth-child(6) {
  width: 17%;
}

.admin-table th:nth-child(7),
.admin-table td:nth-child(7) {
  width: 9%;
}

.admin-table th:nth-child(8),
.admin-table td:nth-child(8) {
  width: 9%;
}

.admin-table th:nth-child(9),
.admin-table td:nth-child(9) {
  width: 12%;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.admin-table th {
  color: rgba(247, 248, 250, 0.62);
  font-size: 11px;
  text-transform: uppercase;
}

.admin-action {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  margin: 0;
  padding: 0 10px;
  font-size: 12px;
}

.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.admin-row-actions .admin-action {
  min-width: 0;
  flex: 0 1 auto;
  min-height: 28px;
  padding-inline: 7px;
  font-size: 11px;
}

.download-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 28px;
  border: 1px solid rgba(93, 227, 146, .22);
  border-radius: 999px;
  background: rgba(93, 227, 146, .08);
  color: #aaf1bf;
  font-weight: 900;
  white-space: nowrap;
}

.admin-table .status-pill,
.admin-table td:first-child,
.admin-table td:nth-child(7),
.admin-table td:nth-child(8) {
  white-space: nowrap;
}

.admin-action.delete {
  border-color: rgba(255, 156, 156, .35);
  background: rgba(255, 156, 156, .1);
  color: #ffb6b6;
}

.code-tier-divider td {
  padding: 9px 12px;
  border-bottom-color: rgba(240, 201, 107, .25);
  background: rgba(240, 201, 107, .08);
  color: #f5dda5;
}

.code-tier-divider strong,
.code-tier-divider span {
  display: block;
}

.code-tier-divider span {
  margin-top: 2px;
  color: rgba(247, 248, 250, .58);
  font-size: 11px;
}

.new-code-row td {
  background: rgba(84, 199, 128, .13);
  box-shadow: inset 0 1px rgba(84, 199, 128, .28), inset 0 -1px rgba(84, 199, 128, .28);
}

.admin-note {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  padding: 0 10px;
  background: #101419;
  color: #f7f8fa;
  font: inherit;
  font-size: 13px;
}

.admin-note:focus {
  outline: none;
  border-color: #54c780;
  box-shadow: 0 0 0 3px rgba(84, 199, 128, 0.16);
}

.admin-note-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px;
  align-items: center;
  gap: 7px;
}

.presence-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -7px 0 0;
  font-size: 11px;
}

.presence-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #737a84;
  box-shadow: 0 0 0 2px rgba(115, 122, 132, 0.16);
}

.presence-dot.online {
  background: #5de392;
  box-shadow: 0 0 0 2px rgba(93, 227, 146, 0.18), 0 0 10px rgba(93, 227, 146, 0.35);
}

.presence-dot.declined {
  background: #ff6b6b;
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.18), 0 0 10px rgba(255, 107, 107, 0.32);
}

.presence-dot.unknown {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: #030405;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.18);
}

.admin-email {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.marketing-ok {
  margin-left: 6px;
  color: #f0d891;
}

@media (max-width: 900px) {
  .admin-table { font-size: 11px; }
  .admin-table th, .admin-table td { padding: 7px 5px; }
  .admin-note { padding: 0 6px; font-size: 11px; }
  .admin-action { min-height: 28px; margin-right: 3px; padding: 0 6px; font-size: 10px; }
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(84, 199, 128, 0.16);
  color: #aaf1bf;
  font-weight: 850;
}

.status-pill.used {
  background: rgba(240, 201, 107, 0.16);
  color: #f0d891;
}

.status-pill.disabled {
  background: rgba(255, 156, 156, 0.16);
  color: #ffb6b6;
}

.legal-page {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 124px 0 88px;
}

.legal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(28px, 5vw, 64px);
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: visible;
}

.legal-card h1 {
  font-size: clamp(42px, 6.6vw, 88px);
  line-height: 1;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  line-height: 1.65;
  max-width: 860px;
}

.legal-card h2 {
  margin-top: 34px;
  font-size: 28px;
}

body[data-theme="dark"] .email-card {
  background: #0b0f13;
}

@media (max-width: 1120px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 880px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 72px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: var(--shadow);
  }

  .site-header.menu-open .nav {
    display: flex;
  }

  .account-launch {
    margin-left: 0;
  }

  .theme-toggle {
    margin-left: auto;
  }

  .project-grid,
  .contact-layout,
  .intro-strip,
  .account-preview,
  .account-modal {
    grid-template-columns: 1fr;
  }

  .account-modal {
    max-height: calc(100vh - 24px);
    height: calc(100vh - 24px);
  }

  .account-aside {
    display: none;
  }

  .account-panel {
    max-height: calc(100vh - 24px);
  }

  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline-section {
    padding-top: 86px;
  }

  .timeline {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0 20px;
    min-height: 0;
    padding: 18px 0 24px;
  }

  .timeline-line {
    left: 17px;
    width: 34px;
    transform: none;
  }

  .timeline-line path {
    stroke-width: 7;
  }

  .timeline-card,
  .timeline-card:nth-of-type(even) {
    grid-column: 2;
    min-height: 0;
    margin-bottom: 26px;
    transform: translateX(36px);
  }

  .timeline-card::before,
  .timeline-card:nth-of-type(even)::before {
    left: -38px;
    right: auto;
  }

  .timeline-card::after,
  .timeline-card:nth-of-type(even)::after {
    left: -20px;
    right: auto;
    width: 20px;
  }

  .timeline-card.is-visible,
  .timeline-card:nth-of-type(even).is-visible {
    transform: translateX(0);
  }

  .project-section h2 {
    white-space: normal;
  }

  .hero {
    min-height: 86vh;
  }

  .project-card.featured {
    grid-row: auto;
  }
}

@media (max-width: 540px) {
  .site-header {
    height: 64px;
    padding-inline: 14px;
  }

  .nav {
    top: 64px;
  }

  .hero {
    padding: 104px 18px 54px;
  }

  .hero-content {
    transform: translateY(-62px);
  }

  h1 {
    font-size: 50px;
  }

  .section {
    padding-top: 72px;
  }

  .site-footer {
    flex-direction: column;
  }
}
