:root {
  --black-color: #231f20;
  --white-color: #ffffff;

  --fw-regular: 300;
  --fw-medium: 500;
  --fw-bold: 700;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;

  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
}

html,
body {
  font-family: "Outfit", sans-serif;
  font-weight: var(--fw-medium);
}

h1 {
  font-size: clamp(2rem, 5rem, 6vw);
  font-family: "Outfit", sans-serif;
  font-weight: 900;
}

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

section {
  padding: 2em;
  /* min-height: 20vh; */
}

:focus {
  caret-color: transparent;
  outline: 2px solid transparent;
}

.phone-only {
  display: none; /* Skryje všude */
}

.pc-only {
  display: none;
}

@media (max-width: 768px) { /* Definujte breakpoint pro telefony */
  .phone-only {
    display: inline; /* Zobrazí pouze na telefonech */
  }
}
@media (min-width: 769px) {
  .pc-only {
    display: inline;
  }
}

.pre-loader {
  position: fixed;
  width: 100vw;
  height: 100vh;
  z-index: 999;
  display: flex;
  background-color: var(--black-color);
}

.counter {
  position: fixed;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  z-index: 10000;
  color: var(--white-color);
  padding: 0.2em 0.4em;
  font-size: 20vw;
}

.website-content {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: var(--white-color);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-title {
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  height: 100vh;
  justify-content: center;
  z-index: -1;
}


/* PC ONLY */
@media only screen and (min-width: 768px) {
  .hero-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #title-name {
    transition: transform 0.5s cubic-bezier(0.075, 0.82, 0.165, 1);
  }

  #title-name:hover {
    transform: scale(1.15);
  }

  #title-surname {
    transition: transform 0.3s cubic-bezier(0.075, 0.82, 0.165, 1),
      letter-spacing 0.3s ease;
  }

  #title-name:hover + #title-surname {
    transform: translateX(1.8vw);
    transition: transform 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
  }

  #title-surname:hover {
    letter-spacing: 0.075em;
  }
}

/* PHONE ONLY */
@media only screen and (max-width: 768px) {
  .hero-title {
    flex-direction: column;
    align-items: center;
  }

  #title-surname {
    margin-left: 0;
  }
}

.hero-title h1 {
  color: var(--black-color);
  margin-top: 0;
  letter-spacing: 2px;
  font-size: clamp(3rem, 10vw, 10rem);
  text-align: center;
}

nav {
  position: fixed;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5em 2em;
  mix-blend-mode: difference;
  z-index: 2;
}

nav > div {
  flex: 1;
}

.info {
  color: #f5fbef;
  text-align: center;
}

.toggle-btn {
  display: flex;
  justify-content: flex-end;
}

.burger {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.75em 2em 1.5em 2em;
  background: var(--black-color);
  outline: none;
  border: none;
  width: 28px;
  height: 20px;
  transition: all 250ms ease-out;
  cursor: pointer;
}

.burger::before,
.burger::after {
  content: "";
  width: 40px;
  height: 2px;
  position: absolute;
  background-color: var(--white-color);
  transition: all 250ms ease-out;
  will-change: transform;
}

.burger::before {
  transform: translateY(-3px);
}

.burger::after {
  transform: translateY(3px);
}

.active.burger:before {
  transform: translateY(0) rotate(45deg);
}

.active.burger::after {
  transform: translateY(0) rotate(-45deg);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  background: var(--black-color);
  clip-path: polygon(0% 0%, 100% 0%, 0% 0%);
  opacity: 0.9; /* added */
  will-change: transform;
}

.overlay-menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  gap: 1em;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.menu-item {
  display: flex;
  cursor: pointer;
}

.menu-item p {
  position: relative;
  text-align: center;
  font-family: "grotesk-bold", sans-serif;
  font-weight: 800;
  font-style: normal;
  font-size: 10vw;

  color: var(--white-color);

  line-height: 80%;
  will-change: transform;
  transition: letter-spacing 0.3s;
}

.menu-item p:hover {
  letter-spacing: 0.075em;
}

.sub-nav {
  display: block;
  position: absolute;
  bottom: 2%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--white-color);

  gap: 1em;
  opacity: 0;
}

.sub-nav a:hover {
  text-decoration: underline;
}

@media only screen and (max-width: 768px) {
  .sub-nav {
    display: none;
  }
}

.sub-nav p {
  font-family: "grotesk-extrabold", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(1rem, 1.5vw, 2.5rem);
}

/* ABOUT */
#about {
  background-color: var(--black-color);
  color: var(--white-color);
  padding-bottom: 120px;
}

@media only screen and (max-width: 768px) {
  #about {
    height: 620px;
  }
}

#about h1 {
  position: relative;
  top: 100px;
  line-height: 0.85;
  opacity: 0;
}

#webmaster {
  letter-spacing: normal;
  transition: letter-spacing 0.3s ease;
}

#webmaster:hover {
  letter-spacing: 0.075em;
}

#btn {
  opacity: 0;
  position: relative;
  margin-top: 125px;
  background-color: var(--black-color);
  color: var(--white-color);
  font-size: 1.8em;
  font-family: "grotesk-medium", sans-serif;
  font-weight: 700;
  font-style: normal;
  border: 5px solid var(--white-color);
  border-radius: 50px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

#btn:hover {
  background-color: var(--white-color);
  color: var(--black-color);
  border: 5px solid var(--white-color);
}

#about #cont1 {
  position: relative;
  top: 20px;
  max-width: fit-content;
  opacity: 0;

  word-break: break-all;
  word-wrap: normal;
  padding: 2em;
  border: 5px solid var(--white-color);
  background-color: var(--white-color);
  border-radius: 50px;
}

#about #cont1 p {
  color: var(--black-color);
  word-break: break-all;
  margin-left: -10px;
  word-wrap: normal;
  font-size: 1.8em;
}

.about_hover {
  display: none;
}

@media only screen and (min-width: 738px) {
  .about_hover {
    z-index: 499;
    display: block;
    position: absolute;
    top: 50%;
    transform: scale(0); /* Start scaled down */
    width: 800px;
    /* height: 400px; */
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--black-color);
    font-size: 1.5em;
    padding: 2em;
    text-wrap: auto;
    border-radius: 5px;
    pointer-events: none;
    opacity: 0; /* Initially hidden */
    transition: opacity 0.4s ease, transform 0.4s ease;
    filter: grayscale(0.5);
  }
  
  #cont1:hover + .about_hover {
    /* Ensure .about_hover shows up on #cont1 hover if JS fails */
    opacity: 1;
    transform: scale(1);
  }
}

@media only screen and (max-width: 738px) {
  #btn {
    font-size: 1.2em;
  }

  #about #cont1 p {
    font-size: 1.2em;
  }
}

/* WORK */
#work {
  background-color: var(--white-color);
  color: var(--black-color);
  padding-top: 20px;
  /* padding-bottom: 100px; */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#work h1 {
  margin: 0;
  padding: 10px 0;
  display: flex;
  align-items: center;
}

.select-options {
  display: flex;
}

.select-option {
  opacity: 0.3;
  margin: 5px;
  font-size: 1em;
  border: 1px solid var(--black-color);
  padding: 5px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.select-option:hover {
  opacity: 0.6;
}

.active {
  opacity: 1;
}

.itembox {
  gap: 2em;
  width: 100%;
  padding: 2em;
}

.item a {
  color: var(--black-color);
  background: var(--white-color);
  font-size: 3rem;
  justify-content: left;
  padding: 5px;
}

.item a:hover {
  color: var(--white-color);
  background: var(--black-color);
  text-decoration: underline;
}

.cursor-image {
  display: none;
}

@media only screen and (min-width: 738px) {
  .cursor-image {
    z-index: 499;
    display: block;
    position: absolute;
    transform: scale(0); /* Použití transform místo scale pro lepší přechod */
    width: 350px; /* Nastav ideální velikost pro kurzorový efekt */
    height: 350px; /* Kulatý efekt */
    border-radius: 10%;
    pointer-events: none; /* Zabránění interakci s kurzorem */
    opacity: 0; /* Skryto ve výchozím stavu */
    transition: opacity 0.4s ease, transform 0.4s ease; /* Hladší přechody */
    filter: grayscale(0.8);
  }
}

@media only screen and (max-width: 738px) {
  .select-option:active {
    opacity: 1;
  }

  .select-option:hover {
    opacity: 1;
  }

  .item {
    margin-top: 0px;
  }

  .item a{
    text-decoration: underline;
    margin-left: -2.3rem;
    font-size: 1.5rem;
    padding: 10px;
  }
}

/* SKILLS */
#skills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background-color: var(--black-color);
  color: var(--white-color);
}

#skills li:first-of-type{
  margin-top: 15px;
}

#skills li {
  margin-top: 2px;
  color: var(--black-color);
  background: var(--white-color);
  position: relative;
  font-size: 2rem;
  padding: 20px;
  list-style: none;
  transition: 0.3s ease-in-out;
}

.highlight-skill {
  color: var(--white-color) !important;
  background-color: var(--black-color) !important;
}

@media only screen and (max-width: 1100px) {
  #skills {
    grid-template-columns: 1fr;
  }

  #skills li {
    font-size: clamp(0.5rem, 1rem, 1.5rem);
  }
}


/* CONTACT */
#contact {
  background-color: var(--white-color);
  color: var(--black-color);
  /* height: 350px; */
}

.contact-div {
  display: flex; /* Aligns the icons and data in a row */
  margin-top: 15px;
}

.contact-data {
  display: flex;
  flex-direction: column; /* Aligns the contact items in a column */
  margin-left: 0px; /* Space between icons and text */
}

.contact-data a:first-of-type {
  margin-top: 10px;
}

.contact-data a {
  font-size: 1.1rem;
  color: var(--black-color);
}

.contact-data a:hover {
  text-decoration: underline;
}

.contact-data h1 {
  margin-top: -20px;
}

.contact-item {
  position: relative; /* Needed for the absolute positioning of the pseudo-element */
  margin-top: 15px;
  padding-left: 35px; /* Space for the icon */
}

.contact-item::before {
  content: ""; /* This will be used to display the icon */
  position: absolute; /* Allows positioning relative to the .contact-item */
  left: 0; /* Align to the left */
  top: 50%; /* Center it vertically */
  transform: translateY(-50%); /* Adjust for exact center alignment */
  width: 25px; /* Width of the icon */
  height: 25px; /* Height of the icon */
  background-size: cover; /* Ensure background scales correctly */
}

/* Specific icons for each contact item */
#address::before {
  background-image: url('/assets/images/icons/location.svg'); /* Replace with your address icon path */
}

#tel::before {
  background-image: url('/assets/images/icons/phone.svg'); /* Replace with your phone icon path */
}

#email::before {
  background-image: url('/assets/images/icons/email.svg'); /* Replace with your email icon path */
}

.contact-socials {
  margin-top: 30px;
  display: flex;
  flex-direction: column; /* Aligns the social links in a column */
}

.social-link {
  position: relative; /* Needed for the absolute positioning of the pseudo-element */
  font-size: 1.1rem;

  color: var(--black-color);
  margin-top: 10px;
  padding-left: 35px; /* Space for the icon */
}

.social-link:hover {
  text-decoration: underline;
}

/* Pseudo-element for the SVG icon */
.social-link::before {
  content: ""; /* This will be used to display the icon */
  position: absolute; /* Allows positioning relative to the .contact-item */
  left: 0; /* Align to the left */
  top: 50%; /* Center it vertically */
  transform: translateY(-50%); /* Adjust for exact center alignment */
  width: 25px; /* Width of the icon */
  height: 25px; /* Height of the icon */
  background-size: cover; /* Ensure background scales correctly */
}

/* Specific icons for each social link */
#dribbble::before {
  background-image: url('/assets/images/icons/dribbble.svg');
}

/* CONTACT FOR PC */
@media only screen and (min-width: 738px) {
  #contact {
    padding-bottom: 40px;
  }

  .contact-data a {
    font-size: 2.5rem;
  }

  .contact-item {
    padding-left: 55px; /* Space for the icon */
  }

  .contact-item::before {
    width: 45px; /* Width of the icon */
    height: 45px; /* Height of the icon */
  }

  .social-link {
    font-size: 2.5rem;
    padding-left: 55px; /* Space for the icon */
  }

  .social-link::before {
    width: 45px; /* Width of the icon */
    height: 45px; /* Height of the icon */
  }
}

/* FOOTER */
footer {
  display: flex;
  justify-content: space-around;
  padding: 5px;
  background-color: var(--black-color);
  color: var(--white-color);
}

#rights {
  margin-top: 2px;
}

@media only screen and (max-width: 738px) {
  footer {
    display: none;
  }
}
