@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
  --bg-color: #101010;
  --text-color: #ffffff;
  --link-color: #51A1FF;
  --hr-color: #2a2a2a;
  --light-color: #ffffff80;
  --code-color: #1a1a1a;
  --project-card-bg: #1a1a1a;
  --project-card-border: #2a2a2a;
  --project-card-text: inherit;
}

[data-theme="light"] {
  --bg-color: #ffffff;
  --text-color: #181818;
  --link-color: #1a73e8;
  --hr-color: #e0e0e0;
  --light-color: #00000080;
  --code-color: #f5f5f5;
  --project-card-bg: #f8f9fa;
  --project-card-border: #e0e0e0;
  --project-card-text: #181818;
}


html {
  height: 100%;
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  margin-top: 50px;
  overflow-x: hidden;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Nunito Sans', sans-serif;
  transition: background-color 0.3s, color 0.3s;
  display: block;
  align-items: center;
  flex-direction: column;
  letter-spacing: -0.5px;
}

.header {
  text-align: center;
  user-select: none;
}

.header-logo {
    width: 250px;
    filter: drop-shadow(0px 0px 7px rgba(255, 255, 255, 0.2));
    transition: transform 0.3s ease-out;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

.header h1 {
    margin-top: 15px;
    font-weight: 400;
    text-align: center;
    font-size: 40px;
    margin-bottom: 0px;
}

p a {
    color: #51A1FF;
    text-decoration: none;
    font-size: 20px;
    position: relative;
    display: inline-block;
}

p a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

p a:hover::after {
    transform: scaleX(1);
}

.footer {
  width: 100%;
  max-width: 100vw;
  text-align: center;
  margin-top: 50px;
  color: var(--light-color);
  padding-bottom: 5px;
  position: relative;
}

.footer hr {
  width: 96vw;
  margin-left: auto;
  margin-right: auto;
  margin-top: 40px;
  left: 0;
  right: 0;
  position: relative;
  height: 2px;
  border: none;
  background-color: var(--hr-color);
}

.footer-links a {
  color: #51A1FF !important;
  font-size: 20px;
  text-decoration: none;
}

.page-content {
  width: 90%;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.page-content h1 {
  font-weight: 400;
  margin-bottom: 10px;
}

.code-large {
  font-family: 'Space Mono', monospace;
  background-color: var(--code-color);
  padding: 10px;
  border-radius: 5px;
}

.code-mini {
  font-family: 'Space Mono', monospace;
  background-color: var(--code-color);
  padding: 4px;
  border-radius: 5px;
}

.badge.featured {
  background-color: #CAA0FF;
  color: var(--bg-color);
  font-size: 13px;
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.badge.custom {
  background-color: #51A1FF;
  color: var(--bg-color);
  font-size: 13px;
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.badge.date {
  color: var(--light-color);
}

.show-more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 18px;
  text-decoration: none;
  color: var(--link-color);
  transition: opacity 0.2s ease;
  position: relative;
}

.show-more-link .pop-out {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.show-more-link:hover .pop-out {
  opacity: 1;
  transform: translateX(0);
}

.show-more-link::after {
  display: none !important;
}

.project-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  margin-top: 20px;
  margin-bottom: 10px;
}

.project-card {
  background: var(--project-card-bg);
  border: 1px solid var(--project-card-border);
  border-radius: 8px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--project-card-text);
  transition: border-color 0.2s;
}

.project-card:hover {
  border-color: #3a3a3a;
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.project-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.project-desc {
  margin-top: 4px;
  font-size: 15px;
  color: var(--light-color);
  line-height: 1.4;
}

::-moz-selection {
  background: #51A1FF;
  color: var(--text-color);
}

::selection {
  background: #51A1FF;
  color: var(--text-color)
}

.header p a:nth-child(1) {
  color: #51A1FF;
}
.header p a:nth-child(2) {
  color: #CAA0FF;
}
.header p a:nth-child(3) {
  color: #DC51FF;
}
.header p a:nth-child(4) {
  color: #E439C9;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.7s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.pre-fade {
  opacity: 0;
  transform: translateY(40px);
}

#theme-toggle {
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  margin-left: 12px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  position: absolute;
  top: 18px;
  right: 32px;
  z-index: 10;
  transition: background 0.2s;
}

.theme-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-icon svg {
  width: 24px;
  height: 24px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#theme-toggle:active .theme-icon svg {
  transform: scale(0.92) rotate(-20deg);
}

@media screen and (max-width: 600px) {
  .page-content {
    width: 95%;
    padding: 0 10px;
  }

  .header-logo {
    width: 200px;
  }

  .header h1 {
    font-size: 30px;
  }

  .project-header h2 {
    font-size: 16px;
  }

  .project-desc {
    font-size: 13px;
  }

  .show-more-link {
    font-size: 16px;
    display: flex;
    justify-content: center;
    margin: 18px auto 0 auto;
  }

  .footer {
    display: block;
    position: relative;
    padding-bottom: 20px;
  }
  #theme-toggle {
    display: block;
    position: static;
    margin: 0 auto 10px auto;
    align-self: center;
  }
  .footer-links {
    margin-bottom: 0;
    text-align: center;
  }
  .theme-icon, .theme-icon svg {
    width: 30px;
    height: 30px;
  }
}

.update-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.update-overlay.hidden {
  display: none;
}

.update-popup {
  background-color: var(--bg-color);
  color: var(--text-color);
  border: 1px solid var(--hr-color);
  border-radius: 12px;
  padding: 2rem 2.5rem;
  max-width: 90%;
  width: 500px;
  font-family: 'Nunito Sans', sans-serif;
  text-align: center;
  box-shadow: 0 0 30px #00000070;
  animation: fadeInUp 0.5s ease forwards;
}

.update-popup h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.update-version {
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  color: var(--light-color);
  margin-bottom: 1rem;
}

.update-date {
  font-size: 0.9rem;
  color: var(--light-color);
  margin-bottom: 1rem;
}

.update-popup ul {
  text-align: left;
  margin: 0 auto 1.5rem auto;
  padding: 0;
  list-style: disc;
  max-width: 400px;
}

.update-popup li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.update-popup button {
  background-color: var(--link-color);
  border: none;
  color: #fff;
  font-family: inherit;
  padding: 10px 20px;
  font-size: 0.95rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.update-popup button:hover {
  background-color: #3e7ed9;
}

