@import url('https://fonts.googleapis.com/css2?family=Alegreya&family=Montserrat&family=UnifrakturCook&display=swap');

:root {
  --bg-gradient-start: #e5e0f9;
  --bg-gradient-end: #b6aeea;
  --text-color: #2d1d3a;
  --accent-color: #7a5fff;
  --accent-color-light: #b6aeea;
  --button-bg: #e1d4f2;
  --button-color: #4d2e8c;
  --button-bg-active: #7a5fff;
  --button-color-active: #fff;
  --shadow-color: #7a5fff22;
  --border-color: #7a5fff;
  --decor-color-light: #c9c5f8aa;
}

body {
  background: radial-gradient(ellipse at top, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: var(--text-color);
  font-family: 'Alegreya', serif;
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
  position: relative;
  transition: background 0.4s ease, color 0.4s ease;
}

#theme-switcher {
  position: fixed;
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  width: 160px;
  font-family: 'Montserrat', sans-serif;
  user-select: none;
  z-index: 1000;
}

#theme-switcher button,
#theme-switcher button[data-back-button] {
  padding: 0.5em 1em;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 10px;
  border: 2px solid var(--accent-color);
  background: var(--button-bg);
  color: var(--accent-color);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

#theme-switcher button.active,
#theme-switcher button:hover,
#theme-switcher button:focus-visible,
#theme-switcher button[data-back-button]:hover,
#theme-switcher button[data-back-button]:focus-visible {
  background-color: var(--button-bg-active);
  color: var(--button-color-active);
  outline: none;
}

body.theme-dark {
  --button-bg: #2e2850;
  --accent-color: #01cfff;
  --button-bg-active: #01cfff;
  --button-color-active: #231f33;
  background: radial-gradient(ellipse at top, #1e1930 0%, #2a2443 100%);
  color: #e5e3f7;
}

body.theme-contrast {
  --button-bg: #fff;
  --accent-color: #000;
  --button-bg-active: #000;
  --button-color-active: #fff;
  background: #fff;
  color: #000;
}

header {
  padding-left: 180px;
  padding-top: 1rem;
  padding-bottom: 1rem;
  background: var(--button-bg);
  border-bottom: 2px solid var(--accent-color);
}

header h1 {
  margin: 0 0 0.5rem 0;
  font-family: 'UnifrakturCook', serif;
  color: var(--accent-color);
}

main {
  padding: 2rem 1.5rem 4rem 1.5rem;
  max-width: 900px;
  margin: auto;
  position: relative;
  z-index: 1; /* над декоративными элементами */
}

.author-info {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

.author-photo {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 8px var(--shadow-color);
  border: 3px solid var(--accent-color);
  flex-shrink: 0;
}

.author-details h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: 'UnifrakturCook', serif;
  color: var(--accent-color);
}

.author-contacts h2 {
  font-family: 'UnifrakturCook', serif;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.author-contacts ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.author-contacts li {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.author-contacts a {
  color: var(--accent-color);
  text-decoration: none;
}

.author-contacts a:hover,
.author-contacts a:focus {
  text-decoration: underline;
}

/* Декоративные элементы для заполнения пустого пространства */
#decor-right {
  position: fixed;
  top: 100px;
  right: 0;
  width: 120px;
  height: calc(100vh - 150px);
  background: radial-gradient(circle at center, var(--accent-color-light), transparent 70%);
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
  border-top-left-radius: 100px;
  border-bottom-left-radius: 100px;
}

#decor-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(90deg, var(--accent-color-light), transparent 70%);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* Responsive */
@media (max-width: 600px) {
  #theme-switcher {
    position: static;
    flex-direction: row;
    width: auto;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  header {
    padding-left: 0;
  }
 
  .author-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .author-photo {
    width: 120px;
    height: 120px;
  }

  #decor-right,
  #decor-bottom {
    display: none;
  }
}

.fancy-border {
  border: 2px dashed var(--accent-color);
  border-radius: 18px;
  position: relative;
  background: linear-gradient(110deg, #f3f1fe80 60%, #f5eaff00);
  box-shadow: 0 0 28px 0 var(--shadow-color);
  margin-bottom: 2rem;
  padding-right: 50px;
}

.fancy-shadow {
  box-shadow: 0 0 16px 0 var(--accent-color-light), 0 4px 30px var(--shadow-color);
}

/* Шестерёнка — SVG-графика справа второго плана */
.decor-gear {
  position: absolute;
  right: 0;
  top: 10px;
  width: 44px;
  height: 44px;
  opacity: 0.22;
  background: url('img/gear.svg') no-repeat center/contain;
  pointer-events: none;
}

/* Плавающие фоны */
#floating-gears {
  position: fixed;
  left: 50vw;
  top: 90vh;
  width: 60vw;
  height: 14vw;
  pointer-events: none;
  z-index: 0;
  background: url('img/gears-light.svg') no-repeat left bottom/contain;
  opacity: 0.19;
}

/* Водяной знак LFD */
#lfd-watermark {
  position: fixed;
  right: 15px;
  bottom: 20px;
  width: 80px;
  height: 80px;
  background: url('img/lfd-logo.svg') no-repeat center/contain;
  opacity: 0.08;
  pointer-events: none;
  z-index: 1;
}

/* Галерея работ */
.works-gallery {
  margin-top: 2rem;
  display: flex;
  gap: 16px;
  overflow-x: auto;
}

.work-thumb {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  box-shadow: 0 0 6px var(--shadow-color);
  background: var(--accent-color-light) url('img/mini-sample.png') center/cover no-repeat;
  border: 2px solid var(--accent-color);
}

/* Цитата */
.author-quote {
  margin: 2rem 0 0.5rem 0;
  padding-left: 1.4rem;
  border-left: 4px solid var(--accent-color);
  color: var(--accent-color);
  font-style: italic;
  font-size: 1.1em;
  opacity: 0.8;
}

/* Сохраняются базовые стили: .author-info, .author-photo и т.п. */
