:root {
  --main-color: #1e1e1e;
  --secondary-color: #2e2e2e;
  --secondary-color-transparent: #2e2e2ee2;
  --text-color: #ffffff;
  --footer-color: #131313;
  --footer-color-transparent: #131313e2;
  --transition: 0.3s;
  --side-line-dot-transition: 1.5s;
  --button-color: #3e3d3da1;
  --side-line-dot-x: -0.85rem;
  --side-line-dot-y: calc(8rem + 0.2rem);
}

html{
  font-size: min(1.6vw, 20px);
  line-height: 3rem;
}

.logo {
  height: 2rem;
  aspect-ratio: 122/68;
}

div.side-line-dot {
  height: 1.4rem;
  aspect-ratio: 1;
  border: 0.1rem solid #ffffff;
  border-radius: 50%;
  background-color: var(--main-color);
  position: absolute;
  left: var(--side-line-dot-x);
  top: var(--side-line-dot-y);
  transition: background-color var(--side-line-dot-transition) cubic-bezier(0.66, 0, 0.24, 0.99);
}

div.active-side-line-dot {
  background-color: #ffffff;
}

h1{
  font-size: 2.5rem;
  font-weight: 700;
}

h2{
  font-size: 2rem;
  font-weight: 700;
}

h3{
  font-size: 1.2rem;
  font-weight: 700;
}

b{
  font-weight: 500;
}

body {
  background-color: var(--main-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
}

main {
  width: 100%;
  max-width: 2560px;
}

header {
  display: flex;
  flex-direction: column;
  background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2)), url("../imgs/cover2560.webp");
  background-size:cover;
  background-position: center;
  background-attachment: fixed; /* https://www.w3schools.com/howto/howto_css_parallax.asp */
  background-repeat: no-repeat;
  height: min(100vh, 100svh); /* https://www.youtube.com/watch?v=Wet2WECg0oM */
  min-height: 450px;
} 

header nav img {
  transition: transform var(--transition);
}

header-navbar {
  height: 5rem;
  width: 100%;
  font-size: 1.3rem;
  position: relative;
} 

header-navbar nav {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding: 0 1.6rem;
  box-sizing: border-box;
}

header-navbar nav ul {
  width: 100%;
  display: flex;
  justify-content: right;
  align-items: center;
  height: 100%;
}

header-navbar nav ul.text-page-links {
  display: flex;
  gap: 1.6rem;
}

header-navbar nav > ul li:first-child{
  margin-right: auto;
  position: relative;
  z-index: 2;
}

nav ul li a {
  cursor: pointer;
  position: relative;
}

nav ul li a::after { /* underline effect https://www.youtube.com/watch?v=UpJyCDEXEtc&t=15s*/
  content: '';
  position: absolute;
  height: 0.12rem;
  width: 0;
  background-color: #ffffff;
  bottom: -0.2rem;
  left: 0;
  transition: width var(--transition);
}

nav ul li a:hover::after, nav ul li a:focus::after {
  width: 100%;
}

header-navbar nav > ul > li:first-child a::after {
  display: none;
}

main article{
  display: flex;
  flex-direction: column;
  padding:0 7rem;
}

section.main-section-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  text-align: left;
  gap: 2.3rem;
  padding: 8rem 0 8rem 2.3rem;
  border-left: #ffffff 0.13rem solid;
  position: relative;
}

section.text-buttons {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
  width: 100%;
  max-width: 26rem;
}

section.text-buttons p {
  font-size: 1.2rem;
  line-height: 1.7rem;
  letter-spacing: 0.02rem;
  font-weight: 300;
}

article#contact-form section.text-buttons {
  width: 100%;
  max-width: 50rem;
}

main > article {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

article#portrait-article {
  background-image: linear-gradient(90deg, var(--main-color), rgba(0, 0, 0, 0.33)), url("../imgs/portrait.webp");
}

article#marketing-arcticle {
  background-image: linear-gradient(90deg, var(--main-color), rgba(0, 0, 0, 0.33)), url("../imgs/marketing.webp");
}

article#street-article {
  background-image: linear-gradient(90deg, var(--main-color), rgba(0, 0, 0, 0.33)), url("../imgs/street.webp");
}

article#about-article {
  background-image: linear-gradient(270deg, var(--main-color), rgba(0, 0, 0, 0.33)), url("../imgs/me.webp");
}

article#about {
  background-image: linear-gradient(90deg, var(--main-color), rgba(0, 0, 0, 0.33)), url("../imgs/me-right.webp");
}

article#gear {
  background-image: linear-gradient(90deg, var(--main-color), rgba(0, 0, 0, 0.33)), url("../imgs/gear.webp");
}

article#motivation {
  background-image: linear-gradient(90deg, var(--main-color), rgba(0, 0, 0, 0.33)), url("../imgs/motivation.webp");
}

form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
  width: 100%;
}

section#email-name {
  display: flex;
  gap: 1.2rem;
  width: 100%;
}

section#email-name section {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  width: 100%;
}

input, textarea {
  width: 100%;
  gap: 0.1rem;
  height: 2.5rem;
  font-size: 1rem;
  background-color: var(--button-color);
  border: none;
  border-radius: 0;
  border-bottom: #c1c1c1 0.1rem solid;
  padding: 0.3rem 0.8rem;
  box-sizing: border-box;
  color: var(--text-color);
  transition: var(--transition);
}

textarea {
  height: 10rem;
  resize: none;
  padding: 0.8rem;
}

input::placeholder, textarea::placeholder {
  color: #ffffff7f;
  font-size: 1rem;
  font-family: 'Roboto', sans-serif;
}

input:hover, textarea:hover, input:focus, textarea:focus {
  background-color: #ffffff43;
}

/* https://medium.com/stackanatomy/form-validation-using-javascripts-constraint-validation-api-fd4b70720288  https://web.dev/articles/user-valid-and-user-invalid-pseudo-classes */
input:user-valid, textarea:user-valid{
  border-bottom: #9bcc9b 0.1rem solid;
}

input:user-invalid, textarea:user-invalid{
  border-bottom: #da8888 0.1rem solid;
}

button {
  width: min-content;
  /* align-self: flex-end; */
}

section.text-buttons a, button {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.7rem 1.7rem;
  border: 0.15rem solid #ffffff;
  transition: var(--transition);
  background-color: var(--button-color);
}

section.text-buttons a:hover, button:hover, section.text-buttons a:focus, button:focus {
  background-color: #ffffff;
  color: #000000;
  cursor: pointer;
}

article#about-article section.main-section-content, header section.main-section-content {
  padding-right: 2.3rem;
  align-items: flex-end;
  text-align: right;
  border-left: none;
  border-right: #ffffff 0.13rem solid;
}

article#about-article section.main-section-content {
  border-top: #ffffff 0.13rem solid;
}

article#about-article div.side-line-dot {
  left: auto;
  right: var(--side-line-dot-x);
  top: var(--side-line-dot-y);
} 

article#about-article section.text-buttons {
  align-items: flex-end;
}

header article{
  height: 100%;
  justify-content: flex-end;
}

header section.main-section-content {
  justify-content: flex-start;
  height: fit-content;
  border-bottom: #ffffff 0.13rem solid;
  padding-top: 1.7rem;
  padding-bottom: 27vh;
}

header section.text-buttons p {
  font-size: 1.2rem;
  font-weight: 300;
}

header section.text-buttons section {
  display: flex;
  justify-content: flex-end;
  gap: 1.2rem;
  width: 100%;
}

header div.side-line-dot {
  right: var(--side-line-dot-x);
  left: auto;
  top: calc(1.7rem + 1.3rem - 0.7rem);
}

footer {
  padding: 4rem 8rem;
  background-color: var(--footer-color);
}

footer-nav-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

footer-nav-links nav {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
}

footer-nav-links nav ul {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.6rem;
}

footer-nav-links nav ul li {
  width: fit-content;
}

footer-nav-links nav ul li a::after {
  height: 0.01rem;
  bottom: -0.05rem;
}

footer-nav-links nav ul li:first-child a::after {
  height: 0.12rem;
  bottom: -0.2rem;
}

footer-nav-links nav ul li a img.logo {
  height: 3rem;
}

footer-nav-links nav ul:first-child li:first-child a::after {
  display: none;
}

footer-nav-links nav ul:first-child li:nth-child(2) a::after {
  height: 0.12rem;
  bottom: -0.2rem;
}

footer-nav-links hr {
  width: 100%;
  border: 0.01rem solid #ffffff;
  box-sizing: border-box;
}

section.socials{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
}

section.socials nav {
  display: flex;
  justify-content: center;
}

section.socials nav ul {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 5rem;
}

section.socials nav ul li a::after {
  display: none;
}

section.socials nav ul li a:hover i, section.socials nav ul li a:focus i, header-navbar nav > ul li:first-child:hover img, header-navbar nav > ul li:first-child:focus img, i.fa-solid.fa-bars:hover, i.fa-solid.fa-bars:focus, i.fa-solid.fa-bars.fa-xmark:hover, i.fa-solid.fa-bars.fa-xmark:focus {
  transform: scale(1.13);
}

section.socials nav i{
  font-size: 3.5rem;
  transition: var(--transition);
}

section.socials nav i:hover, section.socials nav i:focus {
  color: #ffffff;
}

section.socials p {
  font-size: 0.9rem;
  font-weight: 200;
  filter: opacity(0.);
}

header.subpage-header {
  background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2)), url(../imgs/subCover.webp);
  height: 20vh;
  min-height: 15rem;
  background-attachment: scroll;
}

header.subpage-header article section.main-section-content{
  padding-bottom: 2.5rem;
}

article#gear h3{
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 2rem;
}

.gallery-filters {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
}

.gallery-filters button {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.7rem;
}

.gallery-filters button i {
  display: none;
}

.active-filter {
  background-color: #ffffff;
  color: #000000;
}

.photo-gallery {
  width: 100%;
  column-count: 3;
  column-gap: 1.2rem;
}

.photo-gallery img {
  width: 100%;
  object-fit: cover;
  margin-bottom: 1.2rem;
  cursor: pointer;
}

i.fa-solid.fa-bars {
  font-size: 2rem;
  cursor: pointer;
  display: none;
  position: relative;
  z-index: 2;
  transition: transform var(--transition);
}

i.fa-solid.fa-bars.fa-xmark {
  font-size: 2.5rem;
} 

ul.text-page-links.active {
  transform: translateY(0);
}

#fullsize-photo {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: var(--footer-color-transparent);
  display: none;
  justify-content: space-between;
  align-items: center;
  flex-direction: column;
}

#fullsize-photo img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
  margin: auto 0;
}

#fullsize-photo section.image-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  padding: 1rem;
  box-sizing: border-box;
  background-color: var(--secondary-color-transparent);
  gap: 2rem;
}

#fullsize-photo section.image-info section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

#fullsize-photo button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0;
  border: none;
  background-color: transparent;
  font-size: 2rem;
  cursor: pointer;
}

#fullsize-photo button:hover, #fullsize-photo button:focus {
  scale: 1.2;
  color: #ffffff;
}

/* Jak stylovat scrollbar jsem se dozvěděl zde https://youtu.be/v_8CmC6cwUs?si=cYsrz0IlJKBydpuY */
html::-webkit-scrollbar { 
  width: 0.55vw;
}

html::-webkit-scrollbar-thumb {
  background-color: #ffffff27;
  border-radius: 0.3vw;;
}

html::-webkit-scrollbar-track {
  background-color: #ffffff00;
}

html::-webkit-scrollbar-thumb:hover {
  background-color: #ffffff39;
}

html::-webkit-scrollbar-track:hover {
  background-color: #ffffff11;
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  footer {
    padding: 3rem 3rem;
  }

  footer-nav-links nav {
    grid-template-columns: repeat(3, 1fr);
  }

  footer-nav-links nav ul:first-child {
    grid-row: span 2;
  }

  .photo-gallery {
    columns: 2;
  }

  .gallery-filters {
    flex-wrap: wrap;
  }
}

@media (max-width: 666px) {
  section#email-name {
    flex-direction: column;
  }

  section.socials nav ul {
    width: 100%;
    gap: 0.5rem;
  }

  main article {
    padding: 0 1.3rem;
  }
}

@media (max-width: 500px) {
  .photo-gallery {
    columns: 1;
  }

  header {
    background-attachment: scroll;
  }

  i.fa-solid.fa-bars {
    display: block;
  }

  header-navbar nav ul.text-page-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    padding: 4rem 0;
    background-color: var(--footer-color-transparent);
    gap: 1.2rem;
    left: 0;
    top: 0;
    transform: translateY(-120%);
    position: absolute;
    z-index: 1;
    transition: transform var(--transition);
  }

  header-navbar nav ul.text-page-links li:first-child {
    margin: 0;
  }

  header section.main-section-content {
    padding-left: 0;
  }
}

@media (max-width: 375px) {

  header section.text-buttons a {
    padding: 0.7rem 1.3rem;
  }

  footer-nav-links nav {
    grid-template-columns: repeat(2, 1fr);
  }

  footer-nav-links nav ul:first-child {
    grid-row: initial;
    grid-column: span 2;
  }

  section.socials nav i {
    font-size: 3rem;
  }

  div.h-captcha {
    scale: 0.8;
    transform: translateX(-2.6rem);
  }
}

@media (max-height: 500px) {
  header section.main-section-content {
    padding-bottom: 3rem;
  }
}