:root {
  --bg: #0b0b0f;
  --text: #eaeaf0;
  --muted: #9a9a9a;
  --accent: #ff0066;
  --balance: #20C498;
  --counter: #6600ff;
  --cursor-normal: url('../cursors/cursor-normal.png') 16 4, auto;
  --cursor-click: url('../cursors/cursor-click.png') 16 5, pointer;
}

html {
  font-size: 18px;
}

@media (max-width: 600px) {
  .project-preview {
    flex-direction: column;
  }
  .project-preview img {
    max-width: 100%;
  }
}

@font-face {
  font-family: 'Bricolage';
  src: url('../fonts/Bricolage_Grotesque/BricolageGrotesque-Regular.ttf');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Bricolage';
  src: url('../fonts/Bricolage_Grotesque/BricolageGrotesque-Medium.ttf');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'DynaPuff';
  src: url('../fonts/DynaPuff/DynaPuff-Regular.ttf');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'DynaPuff';
  src: url('../fonts/DynaPuff/DynaPuff-SemiBold.ttf');
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'Silkscreen';
  src: url('../fonts/Silkscreen/Silkscreen-Regular.ttf');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Silkscreen';
  src: url('../fonts/Silkscreen/Silkscreen-Bold.ttf');
  font-weight: 700;
  font-display: swap;
}

body {
  margin: 0;
  font-family: 'Bricolage', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  cursor: var(--cursor-normal);
}

h1, h2 {
  font-family: 'Silkscreen', system-ui, sans-serif;
}

.projects-btn,
.main-heading-homepage,
.main-heading {
  font-family: 'DynaPuff', system-ui, sans-serif;
}

.container {
  max-width: 70%;
  margin: 0 auto;
  padding: 20px 100px;
}

.avatar-homepage {
  width: 168px;
  border-radius: 20px;
  margin-bottom: 20px;
  display: block;
}

.avatar {
  width: 64px;
  border-radius: 20px;
  margin-bottom: 20px;
  border-color: var(--counter);
  display: block;
}

.avatar:hover {
  animation: floaty 1s ease-in-out infinite;
  cursor: var(--cursor-click);
}

.back-btn {
  margin-top: 40px;
  border-color: var(--balance);
}

.back-btn::before {
  background: var(--balance);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.project-preview {
  display: flex;
  justify-content: space-between;
  margin-left: 20px;
  gap: 20px;
  align-items: center;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease;
  cursor: var(--cursor-click);

}

.project-preview p {
  flex: 2;
  margin: 0;
  padding-left: 20px;
  min-width: 0;
}

.project-preview img {
  flex: 1;
  width: 100%;
  height: auto;
  max-width: 400px;
  object-fit: contain;
  padding-right: 10px;
}

.project.active .project-preview {
  max-height: 600px;
  opacity: 1;
  margin-top: 10px;
}

.project:hover {
  border-left: 4px solid var(--balance);
  background: rgba(32,196,152,0.05);
}

p {
  color: var(--muted);
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 16px;
  padding-left: 8px;
  padding-right: 8px;
}

.project-preview .projects-btn {
  border-color: var(--accent);
  animation: font-color-btn 3s ease-in-out infinite;
}

.links {
  margin-top: 28px;
}

.links a {
  margin-right: 16px;
  text-decoration: none;
  color: var(--text);
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease-in-out;
}

.links a:hover {
  color: #fff;
  text-shadow: 
    1px 1px 6px var(--accent),
    -1px -1px 6px var(--counter);
    animation: glowyBorder 2s ease-in-out infinite;
  cursor: var(--cursor-click);
}

@keyframes glowyBorder {
  0%, 100% {
    border-top-color: var(--accent);
    border-bottom-color: var(--counter);
  }
  50% {
    border-top-color: var(--counter);
    border-bottom-color: var(--accent);
  }
}

.content {
  margin-top: 10px;
}

.main-heading-homepage,
.main-heading {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: inline-block;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 
    1px 1px 2px var(--counter),
    -1px -1px 2px var(--accent);
}

.main-heading-homepage:before {
  content: "\\（・。・）/\A";
  font-weight: 700;
  white-space: pre;
  color: var(--accent);
  display: block;
}
.main-heading:before {
  content: "\\（・。・）/\A";
  font-weight: 700;
  white-space: pre;
  color: var(--accent);
  display: inline-block;
}

.main-heading-homepage:hover,
.main-heading:hover {
  text-shadow: 
    1px 1px 2px var(--accent),
    -1px -1px 5px var(--balance);
  cursor: var(--cursor-click);
}

/* I love this */
@keyframes flap {
  0%, 100% {
    content: "\\（＾。＾）/\A";
  }
  50% {
    content: "/（＾。＾）\\\A";
  }
}

.main-heading-homepage:hover:before,
.main-heading:hover:before {
  animation: flap 0.2s ease-in-out infinite, floaty 0.4s ease-in-out infinite;
  color: #f39;
  filter: drop-shadow(0 0 4px var(--accent));
  cursor: var(--cursor-click);
}

@keyframes floaty {
  0%, 100% {transform: translateY(0) scale(1); }
  50% {transform: translateY(-2px) scale(1.05); }
}

/* Finalize this later*/
.projects-btn {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  margin-left: 20px;
  color: var(--text);
  margin-top: 12px;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--accent);
  border-radius: 6px;
  overflow: hidden;
  z-index: 0;
}

.projects-btn::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  height: 0%;
  background: var(--accent);
  transition: height 0.5s ease;
  z-index: -1;
  border-top-left-radius: 40% 20%;
  border-top-right-radius: 40% 20%;
}

.projects-btn:hover::before {
  height: 100%;
  animation: wave 1s linear infinite;
}

.projects-btn:hover {
  color: #000;
  cursor: var(--cursor-click);
}

/* this is insane, can't believe i am finally gonna write some js*/

.liquid-overlay {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0%;
  background: var(--accent);
  z-index: 9999;
  pointer-events: none;
}

@keyframes liquidFill {
  0%   { height: 0%; }
  100%  { height: 100%; }
}

@keyframes liquidDrain {
  0%   { height: 100%; }
  100%  { height: 0%; }
}

@keyframes wave {
  0% {transform: translateX(0);}
  100% {transform: translateX(-50%)}
}

.liquid-overlay.fill { animation: liquidFill 0.4s cubic-bezier(0.22,1,0.36,1) forwards;}
.liquid-overlay.drain { animation: liquidDrain 0.4s cubic-bezier(0.22,1,0.36,1) forwards;}

/* I love this too */
h2:before {
  content: "「";
  color: var(--accent);
  display: inline-block;
  font-size: 2.0rem;
  font-weight: 700;
  margin-right: 8px;
  opacity: 0.75;
  transform: translateY(-4px);
}

h2:after {
  content: "」";
  color: var(--accent);
  display: inline-block;
  font-size: 2.0rem;
  font-weight: 700;
  margin-left: 8px;
  opacity: 0.75;
  transform: translateY(4px);
}

.container h2 {
  font-size: 1.1rem;
  padding: 15px;
  border-left: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.container h2:hover {
  border-left: 4px solid var(--balance);
  padding-left: 25px;
  background: rgba(32, 196, 152, 0.05);
  color: #fff;
  transform: scale(1.02);
}

.project-header {
  cursor: var(--cursor-click);
}

.project-header:hover {
  cursor: var(--cursor-click);
}

@keyframes font-color-h2 {
  0%,100% {color: var(--accent);}
  25% {color: var(--balance);}
  50% {color: var(--counter);}
}

@keyframes font-color-btn {
  0%,100% {color: var(--counter);}
  50% {color: var(--balance);}
}

.container h2:hover:before {
  transform: translateY(-3px) translateX(-4px);
  opacity: 1;
  animation: floaty 1s ease-in-out infinite, font-color-h2 1s ease-in-out infinite;
}

.container h2:hover:after {
  transform: translateY(3px) translateX(4px);
  opacity: 1;
  animation: floaty 1s ease-in-out infinite, font-color-h2 1s ease-in-out infinite;
}
