:root {
  --accent: #447dc5;
}

* {
  box-sizing: border-box;
  font-family: "Yu Gothic UI Light", sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: url("images/stars.png") no-repeat center center fixed;
  background-size: cover;
  display: flex;
  flex-direction: column;
  color: #fff;
  position: relative;
}

header, footer {
  position: relative;
  z-index: 2;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: #00000080;
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #ffffff1a;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  height: 25px;
  width: auto;
}

.nav-tabs {
  display: flex;
  gap: 10px;
}

.nav-tabs a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
  font-weight: normal;
}

.nav-tabs a:hover {
  background: #ffffff1a;
  border-color: #ffffff33;
  color: #fff;
}

.nav-tabs a.active {
  border-color: #ffffff59;
  background: #ffffff14;
}

main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 70px 24px 24px;
  opacity: 1;
  transition: opacity 0.25s ease;
}

main.fading {
  opacity: 0.05;
}

main.no-center {
  align-items: flex-start;
}

.content-box {
  background: #0000008c;
  border: 1px solid #ffffff2e;
  border-radius: 14px;
  padding: 24px 30px;
  width: clamp(95%, 90vw, 1200px);
  display: flex;
  flex-direction: column;
  max-width: 100%;
  text-align: center;
  box-shadow: 0 6px 25px #00000066;
}

h1,
.content-box h1 {
  color: #fff;
  text-shadow: 1px 1px 6px #000000b3;
}

.project-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin: 18px auto 0;
  padding: 0 18px;
  width: 100%;
}

.project-card {
  flex: 1 1 calc(25% - 18px);
  max-width: 400px;
  min-width: 280px;
  background: #00000059;
  border: 1px solid #ffffff26;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  background: #00000080;
  transform: translateY(-1px);
}

.project-media,
.project-media-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  background: #000;
  border-bottom: 1px solid #ffffff1f;
  flex-shrink: 0;
}

.project-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.project-title {
  margin: 12px 0 4px;
  font-size: 1.2rem;
  font-weight: normal;
  color: #fff;
  text-shadow: 0 1px 2px #000000cc;
}

.project-desc {
  margin: 0 0 14px;
  padding: 0 12px;
  color: #d9d9d9;
  font-size: 0.96rem;
  line-height: 1.5;
  text-shadow: 0 1px 2px #00000066;
}

.project-actions {
  margin-top: auto;
  align-self: flex-start;
  margin-left: 12px;
  margin-bottom: 12px;
}

.project-link {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: normal;
  font-size: 1rem;
  color: #d3d3d3;
  background: #ffffff14;
  border: 1px solid #ffffff2e;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.project-link:hover {
  background: #ffffff24;
  border-color: #ffffff47;
  color: #fff;
}

.projects-heading {
  font-size: 1.8rem;
  color: #fff;
  font-weight: normal;
  text-align: center;
  margin: 0 auto 10px;
}

.projects-divider {
  width: 100%;
  height: 1px;
  background: #ffffff4d;
  margin: 0 auto 24px;
  border-radius: 1px;
}

.project-filter {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
}

#project-search {
  padding: 8px 12px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ffffff33;
  background: #ffffff0d;
  color: #fff;
  width: 100%;
  max-width: 400px;
}

#project-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px #609bd24d;
}

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.tag-filter button {
  padding: 4px 10px;
  border-radius: 6px;
  text-align: center;
  background: #ffffff1a;
  color: #fff;
  border: 1px solid #ffffff33;
  cursor: pointer;
  transition: background 0.2s;
}

.tag-filter button:hover {
  background: #ffffff33;
}

.tag-filter button.active {
  background: var(--accent);
  border-color: #ffffff33;
}

.overlay {
  position: fixed;
  inset: 0;
  background: #00000080;
  z-index: 1;
  pointer-events: none;
}

footer {
  padding: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
}

.social {
  display: flex;
  gap: 16px;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff26;
  transition: transform 0.2s, background 0.2s;
}

.social a:hover {
  background: #ffffff4d;
  transform: scale(1.08);
}

.social img {
  width: 22px;
  height: 22px;
  opacity: 0.85;
  filter: drop-shadow(0 0 2px #00000099);
}

.social img:hover {
  opacity: 1;
}

a {
  accent-color: var(--accent);
}

a.link {
  color: var(--accent);
  text-decoration: none;
}

a.link:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .project-card {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
  }
}

/* temp class for redirection */
.small-redirect {
  display: block;
  margin-top: 10px;
  font-size: 0.85rem;
  color: #aaa;
  text-decoration: none;
  text-align: center;
}

.small-redirect:hover {
  text-decoration: underline;
  color: #fff;
}

.mobile-scale-note {
  display: none;
  text-align: center;
  font-size: 0.7rem;
  color: #535353;
  margin-top: 6px;
}

.github-langs-card {
  width: 100%;
  max-width: 500px;
  height: auto;
  display: block;
  margin: 0 auto;
  overflow: hidden;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .mobile-scale-note {
    display: block;
  }

  .github-langs-card {
    max-width: 90%;
  }
}