@import "./reset.css";
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Poppins:wght@400;500;700&display=swap');

/*
font-family: 'DM Sans', sans-serif;
font-family: 'Poppins', sans-serif;
*/

/* * {
    border: 1px solid red;
} */

:root {
    --blackpure: #000;
    --black: #171718;
    --black-border: #26292D;
    --white: #fcfcfc;
    --purple: #546493;

    --text-color: var(--black);

    --dark-bg: var(--black);
    --dark-border: var(--black-border);
    --header-text: var(--white);
    --accent: var(--purple);

    /* Light mode */
    --page-bg: var(--white);
    --text-color: var(--black);

    --title-1: var(--accent);

    --project-card-bg: var(--white);
    --project-card-text: var(--black);
    --box-shadow: 0px 5px 35px rgba(0, 0, 0, 0.25);
}

.dark {
     /* Dark mode */
    --page-bg: #252526;
    --text-color: var(--white);

    --title-1: var(--white);

    --project-card-bg: var(--black);
    --project-card-text: var(--white);
    --box-shadow: 0px 5px 35px rgba(0, 0, 0, 0.8);
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Цю стрічку краще залишити */
    
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.5px;

    background-color: var(--page-bg);
    color: var(--text-color);
}

main {
    flex: 1 0 auto; /* Щоб main займав весь простір */
}

/* General */

.container {
    margin: 0 auto;
    padding: 0 15px;
    max-width: 3000px;
}

.none {
    display: none !important;
}

.section {
    padding: 70px 0;
}

.title-1 {
    margin-bottom: 60px;

    font-size: 60px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--title-1);
    text-align: center;
}

.title-2 {
    margin-bottom: 20px;

    font-size: 40px;
    font-weight: 700;
    line-height: 1.3;
}
.title-3 {
    margin-bottom: 20px;

    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
}

/* Nav */

.nav {
    padding: 20px 0;
    border-bottom: 1px solid var(--dark-border);
    background-color: var(--dark-bg);
    color: var(--header-text);
    letter-spacing: normal;
}

.nav-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    column-gap: 30px;
    row-gap: 20px;
    flex-wrap: wrap;
}

.logo {
    margin-right: auto;
    color: var(--header-text);
    font-size: 24px;
    font-family: 'Poppins', sans-serif;
}

.logo strong {
    font-weight: 700;
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    row-gap: 10px;
    align-items: center;
    column-gap: 40px;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.nav-list__link {
    color: var(--header-text);
    transition: opacity 0.2s ease-in;
}

.nav-list__link:hover {
    opacity: 0.8;
}

.nav-list__link--active {
    position: relative;
}

.nav-list__link--active::before {
    content: "";

    position: absolute;
    left: 0;
    top: 100%;

    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--accent);
}

/* Dark mode btn */

.dark-mode-btn {
    order: 9;

    position: relative;
    display: flex;
    justify-content: space-between;

    width: 51px;
    height: 26px;
    padding: 5px;

    border-radius: 50px;
    background-color: #272727;
}

.dark-mode-btn::before {
    content: "";

    position: absolute;
    top: 1px;
    left: 1px;

    display: block;
    width: 24px;
    height: 24px;

    border-radius: 50%;
    background-color: var(--white);

    transition: left 0.2s ease-in;
}

.dark-mode-btn--active::before {
    left: 26px;
}

.dark-mode-btn__icon {
    position: relative;
    z-index: 9;
}

/* Header */

.header {
    position: relative;
    padding: 40px 0;
    min-height: 695px;

    display: flex;
    justify-content: center;
    align-items: center;

    background-color: var(--dark-bg);
    overflow: hidden;
    color: var(--header-text);
    text-align: center;
}

.header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    background-color: rgba(0, 0, 0, 0.4); /* затемнення 40% */
    backdrop-filter: blur(5px); /* розмиття фону */
    z-index: 1;
    pointer-events: none; /* Щоб не заважало клікам */
}

.header__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.header > *:not(.header__video) {
    position: relative;
    z-index: 2;
}

.header__wrapper {
    padding: 0 15px;
    max-width: 750px;
}

.header__title {
    margin-bottom: 20px;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.4;
}

.header__title strong {
    font-size: 60px;
    font-weight: 700;
}

.header__title em {
    font-style: normal;
    color: var(--accent);
}

.header__text {
    margin-bottom: 40px;
    font-size: 24px;
    line-height: 1.333;
}

.header__text p + p {
    margin-top: 0.5em;
}


/* Btn */

.btn {
  position: relative;
  display: inline-flex; /* було flex, змінив на inline-flex */
  align-items: center;
  justify-content: center;

  width: 200px;
  height: 60px;
  margin: 0 auto; /* дозволяє центрувати */

  text-decoration: none;
  border-radius: 5px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
}

.btn__title {
  position: relative;
  z-index: 3;

  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #fff;
  font-size: 20px;
  letter-spacing: 2px;

  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  backdrop-filter: blur(20px);
  will-change: backdrop-filter;
}

.btn__bg {
  position: absolute;
  z-index: 2;

  width: 30%;
  height: 105%;
  border-radius: 100px;

  background-color: #546493;
  box-shadow: 
    0 0 5px #546493,
    0 0 30px #546493,
    0 0 60px #546493;

  transition: width 0.3s;
}

.btn:hover .btn__bg {
  width: 100%;
}

.btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.btn:active {
    top: 1px;
}

/* Світіння золотими променями */
.btn.glow::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250%;
    height: 250%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 215, 0, 0.25) 0%, transparent 70%);
    filter: blur(60px);
    opacity: 0.7;
    z-index: -1;
    border-radius: 50%;
    animation: goldenPulse 3.5s ease-in-out infinite;
}

@keyframes goldenPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
}

/* Btn outline */
.btn-outline {
    display: flex;
    column-gap: 10px;
    align-items: center;

    height: 48px;
    padding: 12px 20px;

    border-radius: 5px;
    border: 1px solid var(--blackpure);
    background-color: var(--white);
    color: var(--blackpure);

    transition: opacity 0.2s ease-in;
}

.btn-outline:hover {
    opacity: 0.8;
}

.btn-outline:active {
    position: relative;
    top: 1px;
}

.projects-wrapper {
  overflow-x: auto; /* дозволяє прокрутку, якщо ширина недостатня */
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 в ряд */
  gap: 15px;
  padding: 20px;
}

/* адаптація під мобільні пристрої */
@media (max-width: 1024px) {
  .projects {
    grid-template-columns: repeat(2, 1fr); /* 2 в ряд */
  }
}

@media (max-width: 600px) {
  .projects {
    grid-template-columns: 1fr; /* 1 в ряд */
  }
}

.project {
  background-color: var(--project-card-bg);
  box-shadow: var(--box-shadow);
  border-radius: 2px;
  transition: transform 0.1s ease;
  position: relative;
  overflow: hidden;
}

.project:hover {
  transform: scale(1.05);
}

.project img {
  width: 100%;
  display: block;
  border-radius: 2px;
}

.project__text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-size: 24px;
  font-weight: 700;
  color: black;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project:hover .project__text-overlay {
  opacity: 1;
}

.project__text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-size: 24px;
  font-weight: 700;
  color: black;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project:hover .project__text-overlay {
  opacity: 1;
}

/* Картинка та відео — однакові */
.project__img,
.project__video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

/* Відео зверху, але приховане */
.project__video {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1;
}

/* Показує відео при наведенні */
.project:hover .project__video {
  opacity: 1;
}

.project__title {
    padding: 15px 20px 15px;
    font-weight: 700;
    font-size: 30px;
    line-height: 1.3;
    color: var(--project-card-text);
    text-align: center; /* Додаємо центрування */
}



/* Project details */

.project-details {
    margin: 0 auto;
    max-width: 865px;

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;
}
.mask-wrap{
  width: 600px;              /* свій розмір */
  display: inline-block;

  /* ВАЖЛИВО: шлях відносно файлу CSS! */
  -webkit-mask-image: url("../img/alpha-braincore.png");
  mask-image: url("../img/alpha-braincore.png");

  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;

  -webkit-mask-position: 0 0;
  mask-position: 0 0;

  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;

  -webkit-mask-mode: alpha;
  mask-mode: alpha;
}

.masked-video{
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.project-details__cover {
  max-width: 100%;
  margin-bottom: 10px;

  box-shadow: 0px 5px 35px rgba(0, 0, 0, 0.05);
  border-radius: 3px;

}

.project-details__desc {
    margin-bottom: 10px;

    font-weight: 700;
    font-size: 24px;
    line-height: 1.3;
}

/* Content list */

.content-list {
    margin: 0 auto;
    max-width: 570px;
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 40px;
    text-align: center;
}

.content-list a {
    color: var(--accent);
}

.content-list__item {
    font-size: 18px;
    line-height: 1.5;
}

.content-list__item p + p {
    margin-top: 0.5em;
}

/* Footer */

.footer {
    margin-top: auto;
    padding: 60px 0 50px;
    background-color: var(--dark-bg);
    color: var(--header-text);
}

.footer__wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 27px;
}

.social {
    display: flex;
    column-gap: 80px;
    align-items: center;
}

.copyright {
    font-size: 16px;
}

.copyright p + p {
    margin-top: 0.5em;
}

@media (max-width: 620px) {

    /* Header */

    .header {
        min-height: 550px; 
        padding: 20px 0;
    }

    .header__video {
        object-fit: cover;
        width: 100%;
        height: 100%;
        transform: scale(1.34); /* Трішки збільшити відео */
        object-position: center center;
    }

    .header__title {
        font-size: 30px;
    }

    .header__title strong {
        font-size: 40px;
    }

    .header__text {
        font-size: 16px; /* Трохи менший розмір для телефону */
        padding: 0 10px; /* Щоб текст не липнув до країв */
    }

   

    /* Nav */

    .nav-row {
        justify-content: space-between;
    }

    .dark-mode-btn {
        order: 0;
    }

    /* General */

    .section {
        padding: 40px 0;
    }

    .title-1 {
        margin-bottom: 30px;
        font-size: 40px;
    }

    .title-2 {
        margin-bottom: 10px;
        font-size: 30px;
    }

    /* Projects */

    .project__title {
        font-size: 22px;
    }

    /* Project page */

    .project-details__desc {
        margin-bottom: 20px;
        font-size: 22px;
    }

    /* Content List */

    .content-list {
        row-gap: 20px;
    }

    .content-list__item {
        font-size: 16px;
    }

    /* Footer */

    .footer {
        padding: 40px 0 30px;
    }

    .footer__wrapper {
        row-gap: 20px;
    }

    /* Social */

    .social {
        column-gap: 20px;
    }

    .social__item {
        width: 28px;
    }

}
/* baner  */
.logos-marquee {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  padding: 15px 0; /* трохи більше, але не перебор */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center; /* ВИРІВНЮЄ логотипи по центру */
  min-height: 70px; /* Додаємо нормальну висоту */
}

.logos-marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 60s linear infinite;
}

.logos-marquee__item {
  flex: 0 0 auto;
  font-size: 24px; /* Розмір як у тебе був */
  font-weight: 600; /* Товщина як у тебе була */
  color: #333;
  padding: 0 40px;
  white-space: nowrap;
}

/* Анімація */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-3.5%);
  }
}

/* Ліве розмиття */
.fade-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 100px; /* ширина розмиття */
  height: 100%;
  background: linear-gradient(to right, #f5f5f5 0%, transparent 100%);
  z-index: 2;
}

/* Праве розмиття */
.fade-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100%;
  background: linear-gradient(to left, #f5f5f5 0%, transparent 100%);
  z-index: 2;
}

.project__subtitle {
    margin-top: -10px; /* підтягнути ближче */
    padding: 0 20px 15px; /* зменшити нижній відступ */
    font-size: 20px;
    color: #777;
    text-align: center;
    line-height: 1.3;
}

.project {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

/* Анімація */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Затримка для кожної колонки */
.project:nth-child(1) { animation-delay: 0.1s; }
.project:nth-child(2) { animation-delay: 0.2s; }
.project:nth-child(3) { animation-delay: 0.3s; }
.project:nth-child(4) { animation-delay: 0.4s; }
.project:nth-child(5) { animation-delay: 0.5s; }
.project:nth-child(6) { animation-delay: 0.6s; }
.project:nth-child(7) { animation-delay: 0.7s; }
.project:nth-child(8) { animation-delay: 0.8s; }
.project:nth-child(9) { animation-delay: 0.9s; }
.project:nth-child(10) { animation-delay: 1.0s; }
.project:nth-child(11) { animation-delay: 1.1s; }
.project:nth-child(12) { animation-delay: 1.2s; }
.project:nth-child(13) { animation-delay: 1.3s; }
.project:nth-child(14) { animation-delay: 1.4s; }
.project:nth-child(15) { animation-delay: 1.5s; }
.project:nth-child(16) { animation-delay: 1.6s; }
.project:nth-child(17) { animation-delay: 1.7s; }
.project:nth-child(18) { animation-delay: 1.8s; }
.project:nth-child(19) { animation-delay: 1.9s; }
.project:nth-child(20) { animation-delay: 2.0s; }
.project:nth-child(21) { animation-delay: 2.1s; }
.project:nth-child(22) { animation-delay: 2.2s; }
.project:nth-child(23) { animation-delay: 2.3s; }
.project:nth-child(24) { animation-delay: 2.4s; }

.header__title, .header__text, .btn {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.header__title.animate {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.header__text.animate {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}

.btn.animate {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.6s;
}
/* Анімація для тексту опису */
.project-details__desc {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

/* Анімація коли видно */
.project-details__desc.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Анімація для картинок */
.project-details__cover {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.project-details__cover.animate {
  opacity: 1;
  transform: translateY(0);
}

.project:nth-of-type(1),
.project:nth-of-type(10) {
  position: relative;
  z-index: 1;
}

.project:nth-of-type(1)::before,
.project:nth-of-type(2)::before,
.project:nth-of-type(3)::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 160%;
  background: radial-gradient(circle at 30% 30%, #d4b06acc, transparent 70%),
              radial-gradient(circle at 70% 70%, #c9a85cbb, transparent 70%);
  animation: animatedGoldGlow 2.5s ease-in-out infinite alternate;
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
  border-radius: 25px;
  opacity: 0.6;
}

@keyframes animatedGoldGlow {
  0% {
    transform: translate(0%, 0%) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: translate(-8%, -8%) scale(1.15);
    opacity: 1;
  }
  100% {
    transform: translate(0%, 0%) scale(1);
    opacity: 0.6;
  }
}

.project-inner {
  display: block;
  transform-style: preserve-3d;
  transition: transform 0.1s ease, filter 0.3s ease;
  will-change: transform, filter;
  perspective: 1000px;
  backface-visibility: hidden;
}

.project-inner:hover {
  transform: rotateX(0deg) rotateY(0deg) scale(0.95) translateY(2mm);
  filter: brightness(1) saturate(1.1);
}

.stats {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  color: #111;
  border-radius: 4px;
  padding: 30px 20px;
  gap: 40px;
  max-width: 2000px;         /* було 1100px — ЗБІЛЬШЕНО */
  width: calc(100% - 40px);  /* трохи менше за ширину екрана */
  margin: -5px auto -25px;
  flex-wrap: wrap;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.stat-item {
  text-align: center;
  padding: 0 20px;
  flex: 1 1 160px;
  min-width: 140px;
}

.stat-number {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 20px;
  color: #555;
}

/* Адаптивність */
@media (max-width: 768px) {
  .stats {
    gap: 20px;
  }
  .stat-item {
    flex: 1 1 45%;
  }
}

@media (max-width: 480px) {
  .stat-item {
    flex: 1 1 100%;
  }
}

.bio-section {
  background-color: #fafafa;
  margin: 0 auto;
  padding: 70px 20px;
  max-width: 1000px;
}

.container {
    margin: 0 auto;
    padding: 0 15px;
    max-width: 1600px;
}


.title-1 {
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  color: #4a4a8a;
  margin-bottom: 50px;
}

.title-3 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 30px;
  color: #111;
}

.subhead {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #444;
}

.bio-content p {
  margin-bottom: 20px;
  line-height: 1.7;
  color: #333;
}

.bio-content ul {
  margin-top: 10px;
  margin-bottom: 30px;
  padding-left: 20px;
}

.bio-content li {
  margin-bottom: 10px;
  line-height: 1.6;
  color: #333;
}

.bio-content strong {
  font-weight: 600;
}

.bio-content em {
  font-style: italic;
}
.bio-content a {
  color: #4a4a8a;
  text-decoration: underline;
  transition: 0.2s;
}

.bio-content a:hover {
  color: #2d2d66;
}
.bio-layout {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.bio-portrait img {
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Адаптивність */
@media (max-width: 768px) {
  .bio-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .bio-content {
    margin-top: 20px;
    text-align: left;
  }
}

.bio-portrait-centered {
  text-align: center;
  margin: 40px 0;
}

.bio-portrait-centered img {

  object-fit: cover;
  border-radius: 5px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}


.container-contact {
  flex: 1;
  min-width: 300px;
  max-width: 500px;             /* 🔒 Обмежує максимум */
  margin: 40px auto;            /* Центрує форму */
  background-color: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.container-contact input {
  width: 100%;
  padding: 10px;
  border: none;
  border-bottom: 2px solid #777777;
  margin-bottom: 20px;
  font-size: 16px;
  outline: none;
}
.btn-contact {
 border: none !important;
 cursor: pointer;
 background-color: #546493;
 color: white;
 margin: 15px 0;
 font-size: 16px;
 width: 100%;
 padding: 14px;
}
.btn-contact:hover {
 background-color: #1f7d5f;
 color: white;
}

textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical; /* дозволяє користувачу збільшувати висоту вручну */
  padding: 10px;
  font-size: 16px;
  border: none;
  border-bottom: 2px solid #777777;
  margin-bottom: 20px;
  outline: none;
}