/* wow cool fade in effect */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body {
  animation: fadeIn 0.5s ease-in-out;
}

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

html, body {
  margin: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh; /* fixes the mobile address bar jumping */
  padding: 1rem;      /* keeps content off the screen edges */

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

body {
    background-color: #232136;
    color: #e0def4;
    font-family: "Andika", sans-serif;
    font-weight: 400;
}

.content {
  max-width: 37rem; 
  width: 90%;
  min-height: 12rem; 
  text-align: center;
}

h1 {
    margin-bottom: 0.25px;
}

h2 {
    margin-top: 0;
}

.switcher {
  display: flex;
  gap: 4px;
  margin-top: 1rem;
}

.switcher .button {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e0def4;
  text-decoration: none;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  transition: background 0.15s; 
}

.switcher .button:hover {
  background: #2a2839;
}

.switcher svg {
  width: 1.1rem;
  height: 1.1rem;
}

p {
  align-items: center;
  text-align: center;
}

.content a::before {
  content: "";
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.25em;
  background-color: currentColor;
  -webkit-mask: var(--icon) no-repeat center / contain;
  mask: var(--icon) no-repeat center / contain;
}

.title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.pfp {
  width: 3rem;
  height: 3rem;
  object-fit: cover;
}

.title h1 {
  margin: 0;
}

.socials {
  display: flex;
  gap: 4px;
  margin-top: 0.5rem;
}

.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 6px;
  transition: background 0.15s;
}
.socials a:hover { background: #2a2839; }
.socials a::before {
  content: "";
  width: 1.1rem;
  height: 1.1rem;
  background-color: #e0def4;
  -webkit-mask: var(--icon) no-repeat center / contain;
  mask: var(--icon) no-repeat center / contain;
}

a,
a:visited,
a:hover,
a:active {
  color: #9f94f5; 
}

.heatmap { 
  width: min(560px, 100%); 
  margin: 1.5rem auto; 
  text-align: center; 
  padding: 0 1rem;
}

.heatmap-grid {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
}

.heatmap-grid { gap: 1px; }

@media (min-width: 600px) {
  .heatmap-grid { gap: 3px; }
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 25%;
  background: rgba(192,132,252,.12);
}

.heatmap-cell[data-level="1"] { 
  background: rgba(192,132,252,.3); 
}

.heatmap-cell[data-level="2"] { 
  background: rgba(192,132,252,.55); 
}

.heatmap-cell[data-level="3"] { 
  background: rgba(192,132,252,.8); 
}

.heatmap-cell[data-level="4"] { 
  background: #c084fc; 
}

#heatmap-total { 
  margin-top: .5rem; 
  font-size: .7rem; 
  opacity: .5; 
}

.divider {
  width: 1px;
  height: 2rem;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
}

/* Icons next to links: */
.content a { --icon: url("/assets/globe.svg"); } /* for most websites this should work */
.content a[href*="github.com"]     { --icon: url("/assets/github.svg"); } 
.content a[href*="x.com"]     { --icon: url("/assets/x.svg"); }
.content a[href*="mailto:"]     { --icon: url("/assets/mail.svg"); }
.content a[href*="devmatei.com/blog"]     { --icon: url("/assets/book.svg"); }