@keyframes typing {
  from{width: 0}
  to{width: 100%}
}

@keyframes blinking
{
  from, to{border-color: transparent}
  50%{border-color: var(--font-color-secondary)}
}

:root {
  --font-primary: "Poppins", sans-serif;
  --font-secondary: "Fira Code", monospace;

  /* Light Theme */
  --color-primary-light: #FFFFFF;
  --color-secondary-light: #F5F5F5;
  --font-color-primary-light: #2E2E2E;
  --font-color-secondary-light: #4A4A4A;
  --accent-color-light: #00a6ff;

  /* Dark Theme */
  --color-primary-dark: #121212;
  --color-secondary-dark: #1E1E1E;
  --font-color-primary-dark: #E0E0E0;
  --font-color-secondary-dark: #A0A0A0;
  --accent-color-dark: #FF5252;

  /* Default Theme*/
  --color-primary: var(--color-primary-dark);
  --color-secondary: var(--color-secondary-dark);
  --font-color-primary: var(--font-color-primary-dark);
  --font-color-secondary: var(--font-color-secondary-dark);
  --accent-color: var(--accent-color-dark);
}

body {
  margin: 0;
  min-height: 100svh;
  width: 100%;
}

body * {
  transition: background-color 0.3s ease;
}

.card picture.dark
{
  transition: filter 0.3s ease;
}

#change-theme {
  position: relative;
  height: 20px;
  width: 60px;
}

#change-theme::after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  height: 20px;
  width: 60px;
  border-radius: 10px;
  background-color: var(--font-color-secondary);
  padding: 1px;
}

#change-theme::before {
  content: "";
  display: block;
  position: absolute;
  top: 1px;
  left: 2px;
  height: 20px;
  width: 20px;
  border-radius: 100%;
  background-color: var(--color-secondary);
  z-index: 1;
  transition: transform 0.3s ease-out;
}

#change-theme.active::before {
  transform: translateX(38px);
}

.triangle
{
  background-color: var(--accent-color);
  clip-path: polygon(50% 100%, 0 0, 100% 0);

  height: 15px;
  width: 15px;

  margin-bottom: 5px;
  margin-top: 5px;
}

.reverse
{
  transform: rotate(180deg);
}

.container {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

#greeter
{
  overflow-x: hidden;
  border-right: var(--color-secondary) 3px solid;
  animation: blinking 1s infinite, typing 1s steps(6);
  letter-spacing: .05em;
}

header,
main,
footer,
footer address {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

header,
footer {
  background-color: var(--color-secondary);
  color: var(--font-color-secondary);
  font-family: var(--font-secondary), monospace;
}

header {
  flex-direction: row;
  justify-content: space-evenly;
}

footer {
  padding-bottom: 5px;
}

#main-header,
#others-header {
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

footer address {
  flex-direction: row;
  justify-content: space-evenly;
  gap: 2rem;
}

main {
  background-color: var(--color-primary);
  color: var(--font-color-primary);
  font-family: var(--font-primary), monospace;
  flex: 1;
  box-sizing: border-box;
  justify-content: flex-start;
  text-align: center;
}

p {
  font-size: 1em;
  max-width: 95%;
}

h1 {
  font-size: 2.5em;
}

main h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-secondary), monospace;
}

.skills-slider{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  width: 100%;
  height: 380px;
}

.card
{
  width: 240px;
  height: 300px;

  transition: transform 0.2s ease-in-out, margin 0.2s ease-in;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));

  overflow: hidden;
}

.card.active
{
  margin-right: 15px;
  margin-left: 15px;
}

.card.light
{
  background: url("../images/SVGs/card-image-light.svg") center center no-repeat;
}

.card.dark
{
  background: url("../images/SVGs/card-image-dark.svg") center center no-repeat;
}

.card .title
{
  margin-top: 30px;
}

.card .experience, .card .description
{
  padding: 20px;
  word-break: break-word;
}

.card img
{
  height: 30%;
  object-fit: contain;

  user-select: none;
  -webkit-user-drag: none;
}

.manage-button {
  position: absolute;
  background: var(--color-secondary);
  border: none;
  padding: 8px 12px;
  font-size: 18px;
  font-weight: bold;
  color: var(--font-color-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease-in-out, transform 0.2s ease-out;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.manage-button:hover {
  background: var(--font-color-secondary);
}

.manage-button:active, .dot:active{
  transform: scale(0.9);
}

.manage-button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  box-shadow: none;
}

.left-button {
  left: 10px;
}

.right-button {
  right: 10px;
}

.dots-wrapper {
  display: flex;
  flex-direction: row;

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

  width: 100%;

  user-select: none;
  gap: 1rem;
}

.dot
{
  font-weight: bold;
  font-size: 2em;

  transition: font-size 0.2s ease-in, color 0.2s ease;
  user-select: none;

  width: auto;
  height: auto;
}

.dot:active
{
  font-size: 1.5em;
}

.dot.active
{
  color: var(--accent-color);
}

.card.loading
{
  transition: none !important;
}

.cards-wrapper
{
  display: flex;
  position: relative;
}

#skills-showcase .cards-wrapper{
  transform: translateX(calc(240px * 6.5));
}

.projects-wrapper
{
  position: relative;
  display: flex;
}

#projects-slider .card
{
    cursor: pointer;
}

.contact-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: var(--font-primary), monospace;
  color: var(--font-color-secondary);
  border: 3px solid var(--color-primary);
  border-radius: 10px;

  width: 150px;
}

.contact-link img {
  max-width: 50px;
  aspect-ratio: 3/4;
  object-fit: contain;
}

.contact-link p {
  word-break: break-word;
  margin: 5px;
}

a:has(.contact-link) {
  text-decoration: none;
}

.copy-click {
  cursor: pointer;
  min-width: 100px;
}

@media (max-width: 768px) {
  #change-theme {
    height: 16px;
    width: 48px;
  }
  #change-theme::after {
    height: 16px;
    width: 48px;
    border-radius: 8px;
    padding: 1px;
  }
  #change-theme::before {
    top: 1px;
    left: 2px;
    height: 16px;
    width: 16px;
  }
  #change-theme.active::before {
    transform: translateX(30px);
  }
  header {
    flex-direction: column;
    padding-bottom: 3%;
  }

  header *
  {
    margin: 5px;
  }

  footer address {
    flex-wrap: wrap;
    gap: 1rem;
  }

  p {
    font-size: 0.9em;
  }

  .dot
  {
    font-size: 3em;
  }
}

@media (max-width: 480px) {
  main {
    font-size: 0.85em;
  }
  h1 {
    font-size: 2em;
  }
  .contact-link {
    padding: 4px;
    gap: 0.5rem;
  }
  .contact-link p {
    margin: 3px;
    font-size: 0.8em;
  }

  .dot
  {
    font-size: 2.7em;
  }
}
