*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'JetBrains Mono', monospace;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #eee8d5;
}

.scene {
  perspective: 60em;
  position: relative;
}

.card {
  width: 37.5em;
  aspect-ratio: 3.5 / 2;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.card.flipped {
  transform: rotateY(-180deg);
}

.card-front,
.card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 0.75em;
  border-radius: 0.75em;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 8px 30px rgba(0, 0, 0, 0.15);
  padding: 2em;
  display: flex;
}

.card-front {
  background-color: #002b36;
  background-image:
    url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEUAAAAAAAAAAAAAAAAAAAAAAAA6bm1sAAAABnRSTlMFBQUFBQVWBieyAAAAQklEQVQ4y2NgsAJhBgYGFiDJAGJAaGYGBkYQzcDIwMgAoplAYiCaiQFMMzEwsIBoRgYGJjDNDKKZGBgYQDQzABdaA98GN4t5AAAAAElFTkSuQmCC"),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.015) 0px,
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px,
      transparent 4px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.01) 0px,
      rgba(255, 255, 255, 0.01) 1px,
      transparent 1px,
      transparent 6px
    );
  color: #93a1a1;
  flex-direction: row;
  align-items: center;
  gap: 2em;
}

.card-back {
  background-color: #fdf6e3;
  background-image:
    url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEUAAAAAAAAAAAAAAAAAAAAAAAA6bm1sAAAABnRSTlMFBQUFBQVWBieyAAAAQklEQVQ4y2NgsAJhBgYGFiDJAGJAaGYGBkYQzcDIwMgAoplAYiCaiQFMMzEwsIBoRgYGJjDNDKKZGBgYQDQzABdaA98GN4t5AAAAAElFTkSuQmCC"),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.02) 0px,
      rgba(0, 0, 0, 0.02) 1px,
      transparent 1px,
      transparent 4px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.012) 0px,
      rgba(0, 0, 0, 0.012) 1px,
      transparent 1px,
      transparent 6px
    );
  color: #657b83;
  transform: rotateY(180deg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.8em;
}

.photo {
  width: 8em;
  height: 8em;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;

}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
}

.card-info h1 {
  font-size: 1.9em;
  font-weight: 700;
  line-height: 1.2;
  color: #b58900;
}

.card-info .title {
  font-size: 1.1em;
  font-weight: 500;
  color: #2aa198;
}

.card-info .location {
  font-size: 0.95em;
  font-weight: 400;
  color: #6c71c4;
}

.accent-red {
  color: #dc322f;
  font-weight: 700;
}

.accent-green {
  color: #859900;
  font-weight: 700;
}

.bio-title {
  font-size: 1.35em;
  font-weight: 600;
  text-align: center;
  color: #586e75;
  max-width: 28em;
}

.bio-sub {
  font-size: 0.75em;
  text-align: center;
  color: #93a1a1;
  white-space: nowrap;
  min-height: 1.5em;
}

.vim-select {
  background-color: #073642;
  color: #93a1a1;
}

.bio-sub.typing::after {
  content: "\00a0";
  background-color: #657b83;
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.card-back hr {
  width: 4em;
  border: none;
  border-top: 1px solid #eee8d5;
}

.socials {
  display: flex;
  gap: 1.5em;
}

.socials a {
  color: #657b83;
  transition: color 0.2s;
}

.socials a:hover {
  color: #d33682;
}

.socials svg {
  width: 1.6em;
  height: 1.6em;
}

.links {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1em;
  width: 100%;
}

.links li:first-child {
  text-align: right;
}

.links li:last-child {
  text-align: left;
}

.links .sep {
  color: #eee8d5;
  user-select: none;
}

.links a {
  text-decoration: none;
  font-size: 0.95em;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s;
}

.links li:first-child a {
  color: #6c71c4;
}

.links li:first-child a:hover {
  color: #268bd2;
}

.links li:last-child a {
  color: #2aa198;
}

.links li:last-child a:hover {
  color: #859900;
}


.flip-text {
  position: absolute;
  bottom: 0.6em;
  right: 0.8em;
  font-size: 0.7em;
  color: rgba(147, 161, 161, 0.35);
  transition: opacity 0.4s ease;
  pointer-events: none;
  user-select: none;
}

.flip-text.hidden {
  opacity: 0;
}


@media (max-width: 700px) {
  body {
    font-size: 11px;
  }

  .card {
    width: 95vw;
  }

  .card-front {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    align-items: center;
    gap: 1em;
    padding: 1.5em;
  }

  .photo {
    width: 5em;
    height: 5em;
  }

  .card-info {
    align-items: center;
  }

  .card-back {
    padding: 1.5em;
  }
}

@media (max-width: 400px) {
  body {
    font-size: 9px;
  }
}
