@import "https://unpkg.com/open-props/easings.min.css";

[data-theme="dark"] {
  background-color: #000;
  color: #eee;
  --home-bg-color: #000;
  --header-bg: rgba(0, 0, 0, 0.9);
  --icon-fill: #eee;
  --icon-fill-hover: #ccc;
  --text-color: #eee;
  --text-color-hover: #fff;
}

[data-theme="light"] {
  background-color: #fff;
  color: #111;
  --home-bg-color: #f8f9fa;
  --header-bg: rgba(255, 255, 255, 0.9);
  --icon-fill: #111;
  --icon-fill-hover: #444;
  --text-color: #111;
  --text-color-hover: #000;
}

body {
  margin: 0;
  font-family: 'Helvetica Neue', sans-serif;
  scroll-behavior: smooth;
  transition: background-color 0.3s, color 0.3s;
  background: var(--home-bg-color);
  color: var(--text-color)
}

a, .nav-link, .navbar-brand {
  color: var(--text-color)!important;
  transition: color 0.3s;
}

a:hover, .nav-link:hover, .navbar-brand:hover {
  color: var(--text-color-hover)!important;
  text-decoration: underline;
}

.custom-toggler {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.chevron-down {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--icon-fill);
  border-bottom: 2px solid var(--icon-fill);
  transform: rotate(45deg);
  margin: auto;
  transition: transform 0.3s ease;
}

.navbar-toggler:not(.collapsed) .chevron-down {
  transform: rotate(-135deg);
}


.contact-cards .contact-card {
  padding: 2rem 1rem;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--icon-fill); /* <-- добавленная строка */
  transition: transform 0.3s, background-color 0.3s, border-color 0.3s;
  color: inherit;
}

.contact-card a {
  display: inline-block;
  text-align: center;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}





.contact-cards .contact-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.1);
}

.contact-cards .icon {
  font-size: 2.5rem;
  color: var(--icon-fill);
  margin-bottom: 1rem;
  font-family: Arial, sans-serif;
}

.contact-cards h5 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.contact-cards a {
  text-decoration: none;
  font-weight: 600;
  color: var(--icon-fill);
}

.contact-cards a:hover {
  color: var(--icon-fill-hover);
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--header-bg);
  padding: 0 2rem;
  z-index: 1000;
  transition: background-color 0.3s;
  color: inherit;
}

header .navbar-brand,
header .nav-link {
  color: inherit;
  transition: color 0.3s;
}

header .nav-link:hover,
header .navbar-brand:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.section {
  /* min-height: 100vh; */
  padding: 80px 50px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: inherit;
  background-color: transparent;
}

/* home */
#home {
  position: relative;
  width: 100%;
  height: 95vh;
  overflow: hidden;
  background-color: black;
}

#bg-video {
    object-fit: cover;
    object-position: left center;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}

.overlay-name {
  position: absolute;
  left: 5%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  text-align: left;
  white-space: normal;
}

@media (max-width: 768px) {
  .overlay-name h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
}

.home-text {
  background-color: rgba(0, 0, 0, 0.4);
  color: white!important;
  padding: 2rem;
  border-radius: 10px;
  color: inherit;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
  align-self: flex-start;
}

.project-image {
  max-width: 90%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.contact-list li {
  margin: 0.5rem 0;
}

.contact-list a {
  color: inherit;
  text-decoration: none;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
}

#scrollToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--icon-fill);
  color: var(--home-bg-color);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  z-index: 999;
}

.theme-toggle {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  
  transition: color 0.3s;
}

#navbarNav {
  max-width: 400px;
}

.sun-and-moon > :is(.moon, .sun, .sun-beams) {
  transform-origin: center;
}

.sun-and-moon > :is(.moon, .sun) {
  fill: var(--icon-fill);
}

.sun-and-moon > .sun-beams {
  stroke: var(--icon-fill);
  stroke-width: 2px;
}

.sun-and-moon:hover > :is(.moon, .sun) {
  fill: var(--icon-fill);
}

.sun-and-moon:hover > .sun-beams {
  stroke: var(--icon-fill);
  stroke-width: 2px;
}

.theme-toggle:is(:hover, :focus-visible) > .sun-and-moon > :is(.moon, .sun) {
  fill: var(--icon-fill-hover);
}


.theme-toggle:is(:hover, :focus-visible) .sun-and-moon > .sun-beams {
  stroke: var(--icon-fill-hover);
}

[data-theme="dark"] .sun-and-moon > .sun {
  transform: scale(1.75);
}

[data-theme="dark"] .sun-and-moon > .sun-beams {
  opacity: 0;
}

[data-theme="dark"] .sun-and-moon > .moon > circle {
  transform: translateX(-7px);
}

@supports (cx: 1) {
  [data-theme="dark"] .sun-and-moon > .moon > circle {
    cx: 17;
    transform: translateX(0);
  }
}

/* about me  */
.about-container {
  display: flex;
  align-items: flex-start;
  justify-self: center;
  gap: 4vw;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Фото — больше */
.about-image {
  flex: 1 1 45%;
  max-width: 40%;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.about-text {
  flex: 1 1 50%;
  max-width: 50%;
  line-height: 1.6;
  font-size: 1.1rem;
  text-align: center;
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
  }

  .about-image,
  .about-text {
    max-width: 100%;
    flex: 1 1 100%;
  }
}

/*Projects */

.project-card {
  margin-bottom: 3rem;
  padding: 1.5rem;
  border-radius: 16px;
  width:100%;
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
  backdrop-filter: blur(6px);
}

[data-theme="light"] .project-card {
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.05),
    0 4px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .project-card {
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow:
    0 20px 60px rgba(255, 255, 255, 0.08),
    0 0 100px rgba(255, 255, 255, 0.1);
}


.project-card h3 {
  font-weight: 700;
}

.project-card p {
  line-height: 1.6;
}


.project-image {
  flex: 1 1 40%;
  max-width: 400px;
  cursor: pointer;
}

.project-image img {
  width: 100%;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.project-image img:hover {
  transform: scale(1.02);
}

.project-description {
  flex: 1 1 55%;
  max-width: 400px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  height: 90%;
  background-color: #fff;
  border-radius: 10px;
  padding: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-content iframe {
  flex-grow: 1;
  width: 100%;
  height: 100%;
  border: none;
}

.modal .close {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 32px;
  font-weight: bold;
  color: #000;
  cursor: pointer;
}

@media (max-width: 768px) {
  .project-card {
    flex-direction: column;
  }

  .project-image,
  .project-description {
    max-width: 100%;
  }
}

.paragraph-spaced {
  margin-top: 0.5rem;
}

.gallery {
    display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.artwork {
  cursor: pointer;
  text-align: center;
  /* flex: 0 0 auto;*/
  max-width: 500px;
  width: 100%; 
  flex: 0 0 calc(28% - 1rem); 
  max-width: calc(28% - 1rem);
  box-sizing: border-box;
}

.artwork.portrait {
  flex: 0 0 calc(24% - 1rem);
  max-width: calc(24% - 1rem);
}

.artwork.portrait2 {
  flex: 0 0 calc(20% - 1rem);
  max-width: calc(20% - 1rem);
}

.artwork.portrait3 {
  flex: 0 0 calc(26% - 1rem);
  max-width: calc(26% - 1rem);
}

.artwork img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  transition: transform 0.3s;
}

.artwork img:hover {
  transform: scale(1.03);
}

@media (max-width: 576px) {
  .artwork {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .artwork.portrait {
    flex: 0 0 100%;
    max-width: 100%;
  }
    .artwork.portrait2 {
    flex: 0 0 100%;
    max-width: 100%;
  }

      .artwork.portrait3 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Модальное окно */
#modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1050;
}

#modal.hidden {
  display: none !important;
}

.modal-content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  overflow: visible;
}

.image-wrapper {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

#modal-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0.5rem;
  display: block;
  z-index: 1;
}


.navbar-nav .nav-link {
  white-space: nowrap;
}

.nav-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20%;
  z-index: 3;
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0); 
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.nav-zone:hover {
  background-color: rgba(0, 0, 0, 0.15); 
}

.arrow {
  color: white;
  font-size: 3rem;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.nav-zone:hover .arrow {
  opacity: 1;
}

.nav-left {
  left: 0;
  justify-content: left;
}

.nav-right {
  right: 0;
  justify-content: right;
}

.nav-left .arrow {
  margin-left: 1rem;
}

.nav-right .arrow {
  margin-right: 1rem;
}

.modal-close {
  align-self: flex-end;
  padding-bottom: 50px;
  background-color: transparent;
  color: white;
  font-size: 2.5rem;
  border: none;
  cursor: pointer;
  z-index: 4;
  opacity: 0.6;
  transition: background-color 0.3s, opacity 0.3s;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  opacity: 1;
}


@media (max-width: 768px) {
  .nav-zone {
    width: 30%;
  }
}


@media (prefers-reduced-motion: no-preference) {
  .sun-and-moon > .sun {
    transition: transform .5s var(--ease-elastic-3);
  }

  .sun-and-moon > .sun-beams {
    transition: transform .5s var(--ease-elastic-4), opacity .5s var(--ease-3);
  }

  .sun-and-moon .moon > circle {
    transition: transform .25s var(--ease-out-5);
  }

  @supports (cx: 1) {
    .sun-and-moon .moon > circle {
      transition: cx .25s var(--ease-out-5);
    }
  }

  [data-theme="dark"] .sun-and-moon > .sun {
    transition-timing-function: var(--ease-3);
    transition-duration: .25s;
    transform: scale(1.75);
  }

  [data-theme="dark"] .sun-and-moon > .sun-beams {
    transition-duration: .15s;
    transform: rotateZ(-25deg);
  }

  [data-theme="dark"] .sun-and-moon > .moon > circle {
    transition-duration: .5s;
    transition-delay: .25s;
  }
}

