html {
  font-family: Ubuntu, sans-serif;

  --color-accent: #f2b666;
  --color-text: #333333;
  --color-bg: #ffffff;

  overflow-x: hidden;
}

html[data-theme="dark"] {
  --color-accent: #f2b666;
  --color-text: #ffffff;
  --color-bg: #202020;
}

body {
  background: var(--color-bg);
  padding: 0.5rem;
}

* {
  color: var(--color-text);
}

h1 {
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}

h2 {
  color: var(--color-text);
  font-size: 1.2rem;
  margin: 0.4rem 0;
}

h3 {
  color: var(--color-accent);
  margin: 0 0 0.2rem;
}

hr {
  margin: 0.5rem 0;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

span {
  margin-right: 0.3rem;
}

p {
  margin: 0 0 0.2rem;
}

section {
  margin-bottom: 0.3rem;
  position: relative;
}

.cv {
  max-width: 900px;
  margin: 0 auto;
}

.header-layout {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  position: relative;
}

.header-content {
  flex: 1;
  position: relative;
}

.photo {
  width: 100%;
  max-width: 13rem;
  height: auto;
  flex-shrink: 0;
}

.contacts {
  margin-bottom: 0.3em;
}

.contact {
  display: flex;
  max-width: 300px;
  margin-bottom: 0.3rem;
}

.contact__type {
  min-width: 90px;
  font-weight: 500;
}

.experience {
  display: flex;
  margin-bottom: 0.2rem;
}

.experience__date {
  min-width: 185px;
  margin-bottom: 0.2rem;
}

.experience__name {
  font-weight: bold;
}

.experience__description {
  margin: 0;
  padding: 0;
}

/* CV Controls */
.cv-controls {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

/* Theme toggle */
.theme-switch {
  display: inline-block;
  height: 34px;
  position: relative;
  width: 60px;
  cursor: pointer;
  flex-shrink: 0;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: background-color 0.4s;
}

.slider::before {
  background-color: #fff;
  bottom: 4px;
  content: "";
  height: 26px;
  left: 4px;
  position: absolute;
  transition: transform 0.4s;
  width: 26px;
}

input:checked + .slider {
  background-color: var(--color-accent);
}

input:checked + .slider::before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round::before {
  border-radius: 50%;
}

/* Download button */
.cv-controls__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 34px;
  border-radius: 34px;
  background-color: #ccc;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background-color 0.2s;
}

.cv-controls__btn svg path,
.cv-controls__btn svg polyline,
.cv-controls__btn svg line {
  transition: stroke 0.2s;
}

.cv-controls__btn:hover {
  background-color: var(--color-accent);
}

.cv-controls__btn:hover svg path,
.cv-controls__btn:hover svg polyline,
.cv-controls__btn:hover svg line {
  stroke: #ffffff !important;
}

/* Scroll to top */
.scroll-top {
  display: none;
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #ccc;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: background-color 0.2s, opacity 0.3s;
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
}

.scroll-top:hover {
  background-color: var(--color-accent);
}

.scroll-top:hover svg polyline {
  stroke: #ffffff !important;
}

.scroll-top svg polyline {
  transition: stroke 0.2s;
}

@media (max-width: 575px) {
  .header-layout {
    flex-direction: column;
  }

  .header-content {
    position: static;
  }

  .photo {
    max-width: 100%;
    margin-top: 0;
  }

  .experience {
    display: block;
  }

  .contact__type {
    min-width: 75px;
  }

  .contact {
    flex-direction: column;
  }

  .scroll-top {
    display: flex;
  }
}

@media print {
  .cv-controls {
    display: none;
  }
}

html.transition,
html.transition * {
  transition:
    color 750ms,
    background-color 750ms !important;
  transition-delay: 0 !important;
}