:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f8f8f8;
  --ink: #1e2430;
  --muted: #5c6570;
  --line: #d7cfc2;
  --accent: #0f0f6b;
  --accent-ink: #f7fffe;
  --descr: #404040;
  --image-bg: #e7e1d6;
  --logo-plate: #2c2430;
  --shadow: 0 10px 30px rgba(30, 36, 48, 0.08);
  --header-logo: 2.75rem;
  --header-title: 1.05rem;
  --header-pad: 0.85rem 1.25rem;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14181d;
  --surface: #1c2229;
  --ink: #ece7de;
  --muted: #b7b2a8;
  --line: #343b46;
  --accent: #1cbf86;
  --accent-ink: #10201f;
  --descr: #a0a0a0;
  --image-bg: #10141a;
  --logo-plate: #3a3140;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

@font-face {
  font-family: "Segoe UI";
  src: url("../fonts/segoeui.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Segoe UI";
  src: url("../fonts/segoeuib.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Segoe UI";
  src: url("../fonts/segoeuib.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Segoe Print";
  src: url("../fonts/segoepr.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", sans-serif;
  line-height: 1.55;
}

button {
  font-family: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: var(--header-pad);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.page-home .site-header {
  --header-logo: 4.5rem;
  --header-title: 1.7rem;
  --header-pad: 1.5rem 1.5rem 1.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand-logo {
  display: block;
  height: var(--header-logo);
  width: auto;
  padding: 0.35rem 0.55rem;
  background: var(--logo-plate);
  border-radius: 0.45rem;
}

.brand-title {
  margin: 0;
  font-size: var(--header-title);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.1rem;
}

.site-nav a {
  color: var(--accent);
  font-size: 1rem;
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle .icon-sun {
  display: none;
}

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

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

.icon {
  display: inline-block;
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  fill: currentColor;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.home {
  width: min(52rem, calc(100% - 2rem));
  margin: 2.5rem auto 3rem;
}

.home-intro {
  margin: 0 0 1.5rem;
  font-size: 1.2rem;
}

.year-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}

.year-links a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 8rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}

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

.year-links strong {
  font-size: 2rem;
}

.official-link {
  font-size: 1.05rem;
}

.layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 1.5rem;
  width: min(112rem, calc(100% - 2rem));
  margin: 1.5rem 1.5rem 2.5rem;
  flex: 1;
}

.calendar {
  position: sticky;
  top: 5.25rem;
  align-self: start;
  width: 200px;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

.calendar-title {
  margin: 0 0 0.7rem;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.calendar ol {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.calendar a {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 0.45rem;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
}

.calendar a.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.content h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.poster {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 450px;
  margin-bottom: 2rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--image-bg);
  cursor: zoom-in;
}

.day {
  scroll-margin-top: 6rem;
  margin: 0 0 1rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.day h2 {
  margin: 0 0 0rem;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  font-family: "Segoe Print";
}

.day p {
  margin: 0 0 0.85rem;
}

.day img {
  display: block;
  width: auto;
  min-height: 12rem;
  max-height: 500px;
  margin-top: 1rem;
  object-fit: contain;
  background: var(--image-bg);
  border: 1px solid var(--line);
  cursor: zoom-in;
}

code {
  border: solid 1px #777777;
  border-radius: 4px;
  padding: 0.15rem;
}
.day-descr {
  font-family: "Segoe Print";
  font-size: 0.80rem;
  color: var(--descr);
  margin-bottom: 10px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: auto;
  padding: 0.5rem 1.25rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 959px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .calendar {
    display: none;
  }

  .page-home .site-header {
    --header-logo: 4.2rem;
    --header-title: 1.35rem;
  }
}

@media (max-width: 640px) {
  .year-links {
    grid-template-columns: 1fr;
  }

  .brand {
    align-items: flex-start;
  }
}

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