:root {
  --pink: #D60270;
  --purple: #9B4F96;
  --blue: #0038A8;
  --bg-dark: #121212;
  --bg-card: #1e1e1e;
  --text-main: #f0f0f0;
  --accent: linear-gradient(90deg, var(--pink), var(--purple), var(--blue));
}

@font-face {
  font-family: 'ngnl';
  src: url('static/font/ngnl_font.ttf');
}

body {
  margin: 0;
  font-family: 'Atkinson Hyperlegible', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  /* Kill horizontal scroll because slide-in-from-right is stupid. I mean, I hate the horizontal scroll anyway so there's that. */
}

.color-header {
  display: flex;
  flex-direction: column;
  padding: 60px 20px 20px;
  background: var(--accent);
  width: 100%;
  height: min-content;
  padding: 0;
  -webkit-background-clip: text;
  align-items: center;
}

.color-header header {
  display: flex;
  width: min-content;
  text-align: center;
  padding: 60px 20px 20px;
  background: var(--accent);
  -webkit-background-clip: text;
}

.color-header>header>h1,
.color-header a {
  color: transparent;
  font-family: 'ngnl', sans-serif;
}

header,
header h1 a {
  color: transparent;
}

header h1 {
  font-size: 3rem;
  margin: 0;
}

.h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.intro {
  text-align: center;
  font-size: 1.1em;
  margin-bottom: 40px;
}

.mainlayout {
  display: grid;
  grid-template-columns: 2fr 4fr;
  gap: 2rem;
  max-width: 1000px;
  margin: auto;
  padding: 20px;
}

/* Media query for smaller screens */
@media (max-width: 768px) {
  .mainlayout {
    grid-template-columns: 1fr;
  }
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.right-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tile {
  background-color: var(--bg-card);
  border: 2px solid var(--pink);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  text-align: start !important;
  position: relative;
}

.tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 10px var(--purple);
}

.tooltip {
  display: block;
  position: relative;
  cursor: help;
}

.tooltip:hover {
  color: var(--purple);
}

.tooltip::after {
  content: attr(data-tooltip);
  display: none;
  position: absolute;
  background: #333;
  color: #fff;
  padding: 0.5em;
  border-radius: 5px;
  font-weight: normal;
  width: 300px;
  top: 120%;
  left: 0;
  z-index: 10;
}

.tooltip:hover::after {
  display: block;
}

/* a) Remove the text from data-tooltip */
.tooltip.tooltip--img::after {
  background: none;
  border: solid 3px var(--purple);
  border-radius: 16px;
  width: 300px;
  height: 248px;
  background-image: var(--tooltip-img);
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 10;
}

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

a:hover {
  color: var(--purple);
}


.list {
  list-style: none;
  padding: 0;
}

.list li {
  margin: 0.5rem 0;
  display: flex;
  justify-content: space-between;
}

#beliefs span {
  font-weight: bold;
}

#buttons img {
  width: 88px;
  height: 31px;
}

.right {
  color: #aaa;
}

.tile-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

footer {
  margin-top: 4rem;
  text-align: center;
  font-size: 0.9em;
  color: #888;
}

#prideflag img {
  position: absolute;
  top: 0;
  right: 0;
  transform-origin: 100% 0%;
  transition: transform .5s cubic-bezier(.32, 1.63, .41, 1.01);
  z-index: 8008135;
  width: 15vw;
}

#prideflag img:hover,
#prideflag img:active {
  transform: scale(110%);
}

@media screen and (min-width: 768px) {
  #prideflag img {
    width: 10vw;
  }
}

@media screen and (min-width: 1920px) {
  #prideflag img {
    width: 5vw;
  }
}

.main {
  margin: 2rem;
}

.main>h1 {
  color: var(--pink);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.link-logo {
  display: flex;
}

.logo-small {
  height: 30px !important;
  width: 30px !important;
}

.link-logo .logo-small {
  margin-right: 5px;
}

.purple {
  color: var(--purple);
}

.subheader {
  font-size: 1.2rem;
  color: #ccc;
}

code {
  font-size: 1.3em;
  background-color: #121212;
  padding-inline: 4px;
  border-radius: 5px;
  padding-block: 2px;
}

pre {
  overflow-x: auto;
  margin: 1.5em 0;
  background: none;
}

pre code.code-block {
  display: block;
  font-family: Menlo, Consolas, 'Courier New', monospace;
  font-size: 0.85em;
  line-height: 1.5;
  background-color: #121212;
  color: #e0e0e0;
  padding: 1em;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  white-space: pre;
  word-break: normal;
  border-left: 4px solid var(--purple);
}

.slide-in-left,
.slide-in-right {
  position: relative;
  animation-duration: 0.81s;
  animation-fill-mode: forwards;
}

.slide-in-left {
  transform: translateX(-50%);
  animation-name: slide-in-from-left;
}

/* Wait, why is this different from the left one? For you see, if I did it the other way, the transform would break the open cards in recommendations. But why does this happen? Apparently any element with a transform makes all descendants have a new containing block, so you can't use the viewport normally because they are fixed to some bullshit. And so, 50% stops meaning "50% of the viewport" and instead means "50% of the containing block". Thus we come to the conclussion that we cannot use a transform to make this animation work. Do I like this solution? No, because now the tiles in portfolio and bookmarks look weird when opening if I don't kill the horizontal scrollbar or it will show up for 0.81 seconds, but that's better than the cards in recommendations going to wherever they want. */
.slide-in-right {
  left: 40%;
  animation-name: slide-in-from-right;
}

@keyframes slide-in-from-left {
  to {
    transform: translateX(0);
  }
}

/* Everyone is valid, I say. But not you, you stupid slide-in-from-right, I don't like you. You were destined to be a transform. Outrageous.*/
@keyframes slide-in-from-right {
  to {
    left: 0;
  }
}

.container {
  max-width: 1000px;
  margin: auto;
  padding: 20px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 300px));
  justify-content: center;
  gap: 20px;
}

.card {
  background-color: var(--bg-card);
  border-radius: 10px;
  width: 260px;
  padding: 20px;
  margin-bottom: 0!important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  text-align: center;
  transition: transform 0.3s;
}

.w-50 {
  width: 50%;
}

.w-93 {
  width: 93%;
}

.grid-2,
.grid-3,
.grid-5 {
  display: grid;
  justify-items: center;
  row-gap: 1.5rem;
}

.grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* Media query for smaller screens */
@media (max-width: 768px) {
  .cards {
    justify-items: center;
  }

  .card {
    width: 90%;
  }
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 10px var(--purple);
}

.card h3 {
  margin-top: 10px;
  font-size: 1.4em;
}

.card p {
  font-size: 0.95em;
  color: #ccc;
}

.cards details.card[open] {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  max-width: 900px;
  max-height: 90vh;
  overflow: auto;
  z-index: 1000;
}

.cards details.card[open] summary::after {
  content: "×";
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  line-height: 1;
}

.cards details.card:not([open]) summary,
.cards details.card[open] summary::after {
  cursor: pointer;
}

.card summary {
  position: relative;
  list-style: none;
}

.card summary::-webkit-details-marker {
  display: none;
}

.card summary .card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
}

.card img {
  height: 88px;
  object-fit: cover;
}

.card-header h3 {
  margin: 0.75rem 0 0.25rem;
  font-size: 1.2rem;
  color: var(--text-main);
}

.card-header .short-desc {
  color: var(--text-main);
  margin: 0;
}

.card .more-info {
  padding: 0 1rem 1rem;
  color: var(--text-main);
  line-height: 1.5;
  text-align: justify;
}

.links {
  margin-bottom: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
  font-family: sans-serif;
}

thead {
  border-bottom: solid 1px white;
}

table th,
table td {
  vertical-align: top;
  padding: 0.3em 1em;
  text-align: left;
}

table th {
  font-weight: bold;
}


/* Not used for now */
.card-notes {
  border: solid 1px aliceblue;
  padding: 5px;
}

.card-notes p {
  margin: 0;
}

.card-logo,
.card-logo img {
  width: 31px;
  height: 31px;
}

.card-logo img {
  object-fit: contain;
}

.card-logo,
.card-notes {
  position: absolute;
  width: 95px;
  font-size: 0.75em;
  border-radius: 16px;
}

/*
.card p a,
.tile p a,
.card li a,
.tile li a,
.card table a,
.tile table a {
  color: #ffafc8!important;
}
*/