:root {
  --bg: #0b0b0f;
  --bg-code: #000000;
  --text: #eaeaf0;
  --muted: #b0b0b0;
  --accent: #ff0066;
  --balance: #20C498;
  --counter: #99ccff;
  --refresh: #DDEE22;
  --peach: #FF8FAB;
  --cursor-normal: url('../cursors/cursor-normal.png') 16 4, auto;
  --cursor-click: url('../cursors/cursor-click.png') 16 5, pointer;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

@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: 100%;
  margin: 0 auto;
  padding: 20px;
}

@media (min-width: 601px) {
  .container {
    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;
  align-items: center;
  justify-content: space-between;
  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: 1;
  margin: 0;
  min-width: 0;
  padding: 0 12px;
}

.project-preview img {
  flex: 0 0 350px;
  width: 350px;
  height: auto;
  max-width: 350px;
  object-fit: contain;
  padding: 0 12px;
}

.project-text {
  text-indent: 1em;
}

.project.active .project-preview {
  max-height: 2000px;
  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.5;
  letter-spacing: 0.02em;
  max-width: none;
  margin-bottom: 16px;
  padding-left: 8px;
  padding-right: 8px;
}

section {
  line-height: 1.5;
  letter-spacing: 0.025em;
}

.project-preview .projects-btn {
  border-color: var(--accent);
  color: var(--counter);
  transition: color 0.4s cubic-bezier(0.48, -0.6, 0.32, 1.6);
}

.project-preview .projects-btn:hover {
  border-color: var(--accent);
  color: var(--balance);
}

.links {
  margin-top: 28px;
  clear: both;
}

.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);
}

.links2 {
  text-decoration: none;
  color: var(--balance);
  border-top: 1px solid transparent;
  border-bottom: 1px solid var(--text);
  animation: links2underline 4s ease-in-out infinite;
}

@keyframes links2underline {
  0%,100% {
    border-bottom-color: var(--refresh);
    text-shadow: 0 0 0px transparent;
  }
  50% {
    border-bottom-color: var(--counter);
    text-shadow: 0 0 0px transparent;
  }
}

.links2:hover {
  color: #fff;
  text-shadow: 
    1px 1px 6px var(--accent),
    -1px -1px 6px var(--counter);
  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);
  padding-left: 12px;
}

.main-heading-homepage:before {
  content: "\\（・。・）/\A";
  font-weight: 700;
  white-space: pre;
  color: var(--accent);
  display: block;
  padding-left: 8px;
}
.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;
  text-indent: 0px;
  padding: 8px 14px;
  margin-left: 20px;
  color: var(--text);
  margin-top: 12px;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid var(--accent);
  border-radius: 6px;
  overflow: hidden;
  z-index: 0;
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.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: 100%;
  background: var(--accent);
  z-index: 9999;
  pointer-events: none;
  animation: drain 1s forwards;
}

@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);
  flex-shrink: 0;
}

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);
  flex-shrink: 0;
}

.container h2 {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  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);}
}

.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;
}

.quick-summary {
  font-size: 1rem;
  width: 70%;
}

.quick-summary:before {
  color: var(--accent);
  font-size: 1.2rem;
  content: "// overview // "
}

.project-details /*> p:first-of-type*/ {
  /*text-indent: 3em;*/
}

.project-details {
  width: 70%;
}

.haiku {
  font-family: 'DynaPuff', system-ui, sans-serif;
  /*font-style: ; /*change*/*/
  font-size: 1.2rem;
  color: var(--text);
  line-height: 1.6;
  text-align: center;
  padding-left: 20px;
  padding-right: 20px;
  position: relative;
  border-left: 3px solid var(--balance);
  border-right: 3px solid var(--balance);
  margin: auto 0;
  max-width: 70%;
}

.haiku:before {
  content: "「";
  white-space: pre;
  color: var(--accent);
  display: block;
  text-align: left;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.haiku:after {
  content: "」";
  color: var(--accent);
  display: block;
  text-align: right;
  font-size: 1.5rem;
}

.mii-chat {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  float: right;
  width: 25%;
  clear: right;
  margin: 20px 0;
  background: none;
}
.mii-chat .chat-avatar {
  width: 60px;
  margin-bottom: 0;
  border-radius: 12px;
  border-color: var(--counter);
}

.chat-bubble {
  background: rgba(255, 255, 255, 0.05);
  padding: 0 10px;
  border-radius: 12px;
  border-right: 4px solid var(--accent);
  max-width: 100%;
  margin-left: 0;
}

.project-image {
  width: 70%;
}

code {
  background-color: var(--bg-code);
  color: var(--counter);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Bricolage', monospace;
  font-size: 0.95em;
  border: 1px solid #333;
  text-shadow: 1px 1px 6px var(--bg);
  overflow-wrap: break-word;
}

mark {
  background: transparent;
  color: var(--peach);
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.5px;
}

ul li::marker {
  content: "🢩 ";
  color: var(--accent);
  font-size: 0.9rem;
}

ul {
  padding-left: 20px;
  line-height: 1.5;
}

ol {
  line-height: 1.5;
  list-style: none;
  counter-reset: counter;
  padding-left: 10px;
  padding-left: 0;
  margin: 2rem 0;
}

ol li {
  counter-increment: counter;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  color: var(--muted);
}

ol li::before {
  content: counter(counter);
  position: absolute;
  left: 0;
  top: 0;
  
  width: 2rem;
  height: 2rem;
  
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-code);
  color: var(--accent);
  border: 1px solid #333;
  border-radius: 6px;
}

ol li:hover::before {
  border-color: var(--peach);
}

.toc-list {
  list-style-type: none;
  padding-left: 0;
}

video.doc,
img.doc {
  max-width: 90%;
  height: auto;
  max-height: 500px;
  display: block;
  margin: 1.5rem auto;
  border-radius: 4px;
  border: 1px solid rgba(255, 0, 102, 0.5);
  box-shadow: 0 0 25px rgba(255, 0, 102, 0.3);
}

.video-wrapper {
  max-width: 90%;
  margin: 1.5rem auto;
}

.video-iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  display: block;
  border-radius: 4px;
  border: 1px solid rgba(255, 0, 102, 0.5);
  box-shadow: 0 0 25px rgba(255, 0, 102, 0.3);
}

h3 {
  color: var(--text);
  text-shadow: 
    2px 2px 4px var(--counter),
    -2px -2px 6px var(--balance);
}



@media (max-width: 600px) {
  .container {
    padding: 15px;
  }
  .project-preview {
    flex-direction: column;
    margin-left: 0;
  }
  .project-preview p {
    width: 95%;
  }
  .project-preview img {
    flex: none;
    width: 90%;
    max-width: none;
    height: auto;
  }
  html {
    font-size: 16px;
  }
  p {
    max-width: 100%;
    line-height: 1.8;
  }
  .projects-btn {
  }
  .main-heading,
  .main-heading-homepage {
    font-size: 1.3rem;
    padding-left: 0;
  }
  .links {
    display: flex;
    justify-content: center;
    gap: 36px;
    flex-wrap: wrap;
  }
  .quick-summary,
  .project-image,
  .project-details {
    width: 100%;
    max-width: 100%;
    margin-left: 0px;
    margin-right: 0px;
  }
  .quick-summary {
    font-size: 1.1rem;
  }
  .mii-chat {
    float: none;
    width: 100%;
    margin: 30px 0;
  }
  .mii-chat .chat-avatar {
    width: 40px;
    margin-bottom: 0;
    border-radius: 8px;
    border-color: var(--counter);
  }
  .chat-bubble {
    background: rgba(255, 255, 255, 0.05);
    padding: 0 8px;
    border-radius: 8px;
    border-right: 4px solid var(--accent);
    max-width: 100%;
    margin-left: 0;
  }
  .chat-bubble p {
    margin: 2;
    line-height: 1.2;
    font-size: 0.95rem;
  }
  .links2 {
  }
  .links2:active {
    color: #fff;
    text-shadow: 
      1px 1px 6px var(--accent),
      -1px -1px 6px var(--counter);
  }
  .container h2:hover {
    transform: scale(1.075);
  }
}
