.home-page {
  --home-surface: #ffffff;
  --home-surface-muted: #f4f3f5;
  --home-border: #d3d1d5;
  --home-text: #4e4c50;
  --home-text-muted: #636466;
  --home-primary: #722ea5;
  --home-primary-strong: #5d218c;
  --home-on-primary: #ffffff;
  --home-focus: #d0dd28;
  --home-shadow: 0 12px 28px rgb(78 76 80 / 10%);
  box-sizing: border-box;
  min-width: 0;
  background: var(--home-surface);
  color: var(--home-text);
  font-family: "Montserrat", sans-serif;
}

[data-theme="dark"] .home-page {
  --home-surface: #211e24;
  --home-surface-muted: #39343e;
  --home-border: #635d68;
  --home-text: #ffffff;
  --home-text-muted: #d3d1d5;
  --home-primary-strong: #8d51bc;
  --home-shadow: 0 12px 28px rgb(0 0 0 / 28%);
}

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

.home-page__inner {
  width: min(100% - 32px, 1240px);
  margin: 0 auto;
  padding: 48px 0 64px;
}

.home-page__header {
  position: relative;
  overflow: hidden;
  padding: 32px;
  border: 1px solid var(--home-border);
  border-radius: 12px;
  background: var(--home-surface);
  box-shadow: var(--home-shadow);
}

.home-page__header::after {
  position: absolute;
  top: -46px;
  right: -38px;
  width: 152px;
  height: 152px;
  border: 18px solid color-mix(in srgb, var(--home-primary) 16%, transparent);
  content: "";
  pointer-events: none;
  transform: rotate(-15deg);
}

.home-page__header::before {
  position: absolute;
  top: 22px;
  right: 76px;
  width: 28px;
  height: 28px;
  background: var(--home-focus);
  content: "";
  pointer-events: none;
  transform: rotate(-15deg);
}

.home-page__eyebrow,
.home-page__marker,
.home-page__status {
  color: var(--home-primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-page__header h1,
.home-page__section h2,
.home-page__workspace h2,
.home-page__project h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--home-text);
  overflow-wrap: anywhere;
}

.home-page__header h1 {
  max-width: 760px;
  margin-top: 12px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.home-page__header > p {
  position: relative;
  z-index: 1;
  max-width: 610px;
  margin: 16px 0 0;
  color: var(--home-text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.home-page__workspace,
.home-page__section,
.home-page__help {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--home-border);
  border-radius: 12px;
  background: var(--home-surface);
}

.home-page__section-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.home-page__marker {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 4px;
  margin-top: 10px;
  background: var(--home-focus);
}

.home-page__section-heading h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
}

.home-page__section-heading p {
  margin: 6px 0 0;
  color: var(--home-text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.home-page__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.home-page__action {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 104px;
  padding: 20px;
  border: 1px solid var(--home-border);
  border-radius: 10px;
  color: var(--home-text);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.home-page__action--primary {
  border-color: var(--home-primary);
  background: var(--home-primary);
  color: var(--home-on-primary);
}

.home-page__action-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.home-page__action-copy {
  margin-top: 6px;
  color: inherit;
  font-size: 0.875rem;
  line-height: 1.45;
  opacity: 0.88;
}

.home-page__action:not(.home-page__action--primary):hover {
  border-color: var(--home-primary);
  box-shadow: 0 8px 20px rgb(114 46 165 / 13%);
  transform: translateY(-2px);
}

.home-page__action--primary:hover {
  background: var(--home-primary-strong);
  box-shadow: 0 8px 20px rgb(114 46 165 / 25%);
  transform: translateY(-2px);
}

.home-page__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  margin-top: 24px;
}

.home-page__section {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-top: 0;
}

.home-page__news {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--home-border);
}

.home-page__news-title {
  margin: 0;
  color: var(--home-text);
  font-size: 1rem;
  line-height: 1.4;
}

.home-page__event--upcoming {
  border-inline-start: 3px solid var(--home-primary);
}

.home-page__event-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--home-primary);
  color: var(--home-on-primary);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.home-page__event-list,
.home-page__projects {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.home-page__event,
.home-page__project {
  min-width: 0;
  border: 1px solid var(--home-border);
  border-radius: 8px;
  background: var(--home-surface-muted);
}

.home-page__event-link {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
  min-height: 56px;
  padding: 14px 16px;
  color: var(--home-text);
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

.home-page__event-title,
.home-page__event-date,
.home-page__project h3,
.home-page__project h3 a {
  overflow-wrap: anywhere;
}

.home-page__event-date {
  color: var(--home-text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.home-page__project {
  padding: 16px;
}

.home-page__status {
  margin: 0 0 6px;
  color: var(--home-text-muted);
  font-size: 0.6875rem;
}

.home-page__project h3,
.home-page__project h3 a {
  font-size: 1rem;
  line-height: 1.4;
}

.home-page__project h3 a {
  color: var(--home-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.home-page__data-state {
  display: grid;
  gap: 12px;
  min-height: 142px;
  margin-top: 20px;
  padding: 20px;
  border: 1px dashed var(--home-border);
  border-radius: 8px;
  background: var(--home-surface-muted);
  align-content: center;
}

.home-page__data-state p,
.home-page__help p {
  margin: 0;
  color: var(--home-text-muted);
  line-height: 1.5;
}

.home-page__data-state--unavailable {
  border-inline-start: 4px solid var(--home-focus);
}

.home-page__text-link,
.home-page__retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--home-primary);
  border-radius: 8px;
  background: transparent;
  color: var(--home-primary);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.home-page__text-link:hover,
.home-page__retry:hover {
  background: color-mix(in srgb, var(--home-primary) 10%, transparent);
}

.home-page__retry[disabled] {
  cursor: wait;
  opacity: 0.68;
}

.home-page :is(a, button):focus-visible {
  outline: 3px solid #d0dd28;
  outline-offset: 3px;
}

.home-page__help {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
}

.home-page__help .home-page__text-link {
  margin-inline-start: auto;
}

@media (max-width: 1023px) {
  .home-page__inner {
    padding-top: 32px;
  }

  .home-page__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .home-page__inner {
    width: min(100% - 24px, 1240px);
    padding: 24px 0 40px;
  }

  .home-page__header,
  .home-page__workspace,
  .home-page__section,
  .home-page__help {
    padding: 20px;
  }

  .home-page__header::after {
    right: -88px;
  }

  .home-page__header::before {
    right: 30px;
  }

  .home-page__actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-page__action {
    min-height: 112px;
  }

  .home-page__text-link,
  .home-page__retry {
    width: 100%;
  }

  .home-page__help .home-page__text-link {
    margin-inline-start: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page__action {
    transition: none;
  }
}
