/* ===== Retro Techwave Theme ===== */

:root {
  --bg-top: #2d006b;
  /* deep purple */
  --bg-bottom: #00081e;
  /* near-black navy */
  --text: #f8eaff;
  /* pale lavender white */
  --heading: #ff6ec7;
  /* neon pink */
  --link: #00f6ff;
  /* cyan */
  --link-hover: #fffb00;
  /* sun yellow */
  --code-bg: rgba(0, 0, 0, 0.5);
  --code-text: #fffb00;
  /* sun yellow */
  --blockquote-bg: rgba(255, 110, 199, 0.15);
  --blockquote-border: #ff6ec7;
  --blockquote-text: #f8eaff;
  --img-border: #00f6ff;
  --scrollbar-track: #00081e;
  --scrollbar-thumb: #ff6ec7;
  --scrollbar-thumb-hover: #fffb00;
}

/*#region Full-width neon glass header*/
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: fill-available;
  width: -webkit-fill-available;
  width: -moz-available;
  max-width: none;
  /* removes body width restriction */
  margin: 0;
  background: rgba(0, 0, 0, 0.6);
  /* transparent black for glass look */
  backdrop-filter: blur(8px);
  /* frosted glass effect */
  border-bottom: 2px solid var(--link);
  box-shadow: 0 0 10px var(--link), 0 0 20px var(--link);
  transition: transform 0.2s ease-in-out;
  z-index: 10;
}

.site-header.header-hidden {
  transform: translateY(-110%);
}

@keyframes headerGlow {
  0% {
    box-shadow: 0 0 10px var(--link), 0 0 20px var(--link);
  }

  40% {
    box-shadow: 0 0 20px var(--link-hover), 0 0 35px var(--link-hover);
  }

  60% {
    box-shadow: 0 0 20px var(--link-hover), 0 0 35px var(--link-hover);
  }

  100% {
    box-shadow: 0 0 10px var(--link), 0 0 20px var(--link);
  }
}

@keyframes hamburgerGlow {
  0% {
    background-color: var(--link);
  }

  40% {
    background-color: var(--link-hover);
  }

  60% {
    background-color: var(--link-hover);
  }

  100% {
    background-color: var(--link);
  }
}

.site-header.header-show {
  animation: headerGlow 3s ease forwards;
}

.site-header.header-show .hamburger span {
  animation: hamburgerGlow 3s ease forwards;
}

.header-content {
  max-width: 1100px;
  /* keeps content centered inside header */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.header-top {
  padding-bottom: 8px;
}

.header-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
}

.logo {
  font-family: "Orbitron", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--heading);
  text-shadow: 0 0 8px var(--heading), 0 0 12px var(--heading);
  transition: border-color 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
  margin: 0;
}

.logo:hover {
  text-shadow: 0 0 8px var(--link-hover), 0 0 12px var(--link-hover);
}

.nav-links a {
  display: inline-block;
  color: var(--link);
  padding-right: 16px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-links a:hover {
  color: var(--link-hover);
  /* text-shadow: 0 0 8px var(--link-hover), 0 0 16px var(--link-hover); */
  border-color: var(--link-hover);
}

.contact-links {
  color: var(--link);
  display: flex;
  align-items: center;
}

.contact-links a {
  color: var(--link);
  display: flex;
  align-items: center;
  padding-left: 16px;
}

.contact-links img {
  height: 16px;
  width: 16px;
  filter: drop-shadow(0 0 3px var(--link));
  transition: filter 0.2s ease;
  border: none;
  box-shadow: none;
}

.contact-links a:hover img {
  filter: drop-shadow(0 0 5px var(--link-hover));
}

.email-link {
  font-size: 0.8rem;
}

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  /* pushes it to the right of logo */
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--link);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--link);
  transition: all 0.3s ease;
}

.hamburger:hover span {
  background-color: var(--link-hover) !important;
  box-shadow: 0 0 8px var(--link-hover) !important;
  transition: all 0.2s ease;
}

/* Toggle animation */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
}

/* Slide-down animation for the menu */
.hamburger-menu {
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease;
  display: contents;
  flex-direction: row;
  width: 100%;
}

/*#endregion */

/*#region Content Elements*/
body {
  background: linear-gradient(to bottom, var(--bg-top), var(--bg-bottom));
  color: var(--text);
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-weight: 500;
  letter-spacing: 0.4px;
  /* subtle spacing */
  line-height: 1.7;
  margin: 0;
  padding-top: 120px;
  /* equal to header height */
  padding-bottom: 20px;
  padding-left: 40px;
  padding-right: 40px;
}

/* Neon grid overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 246, 255, 0.15) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 246, 255, 0.15) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

/* Content wrapper */
body>* {
  background-color: rgba(0, 0, 0, 0.5);
  /* solid but slightly transparent */
  border-radius: 10px;
  padding: 20px 30px;
  box-shadow: 0 0 20px rgba(0, 246, 255, 0.3);
  position: relative;
  z-index: 1;
  /* sits above grid */
  max-width: 1100px;
  margin: 0 auto;
}

b {
  font-weight: 1000;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading);
  margin-top: 24px;
  margin-bottom: 16px;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  text-shadow: 0 0 3px var(--heading), 0 0 12px var(--heading);
  z-index: 1;
}

a {
  color: var(--link);
  text-decoration: none;
  /* border-bottom: 2px solid transparent; */
  transition: border-color 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
  color: var(--link-hover);
  border-color: var(--link-hover);
  text-shadow: 0 0 8px var(--link-hover);
}

a.active {
  color: var(--link-hover);
  border-color: var(--link-hover);
  text-shadow: 0 0 8px var(--link-hover);
}

h1 img,
h2 img,
h3 img,
h4 img,
h5 img,
h6 img,
a img {
  height: 16px;
  width: 16px;
  filter: drop-shadow(0 0 3px var(--link));
  transition: filter 0.2s ease;
  border: none;
  box-shadow: none;
  vertical-align: sub;
}

a:hover img {
  filter: drop-shadow(0 0 3px var(--link-hover));
  transition: filter 0.2s ease;
}

code {
  background-color: var(--code-bg);
  color: var(--code-text);
  border-radius: 4px;
  padding: 0.3em 0.5em;
  font-family: "Share Tech Mono", monospace;
}

pre {
  background-color: var(--code-bg);
  border-radius: 6px;
  padding: 1em;
  overflow-x: auto;
  box-shadow: 0 0 10px var(--link);
}

blockquote {
  background-color: var(--blockquote-bg);
  border-left: 4px solid var(--blockquote-border);
  padding: 0.5em 1em;
  margin: 1em 0;
  color: var(--blockquote-text);
  font-style: italic;
}

img {
  max-width: 100%;
  /* height: auto; */
  border-radius: 4px;
  border: 2px solid var(--img-border);
  box-shadow: 0 0 10px var(--img-border);
}

iframe {
  width: fill-available;
  width: -webkit-fill-available;
  width: -moz-available;
  aspect-ratio: 16/9;
  border-radius: 6px;
  border: 2px solid var(--img-border);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 6px;
  border: 3px solid var(--scrollbar-track);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

table {
  width: 100%;
  table-layout: fixed;
  /* lock column widths */
  border-collapse: collapse;
}

table th,
table td {
  padding: 0.6em;
  text-align: left;
}

h1 img.inline-img,
h2 img.inline-img,
h3 img.inline-img,
h4 img.inline-img,
h5 img.inline-img,
h6 img.inline-img,
td img.inline-img,
ul img.inline-img,
ol img.inline-img,
p img.inline-img {
  display: inline-block;
  vertical-align: middle;
  width: 40px;
  height: 40px;
  object-fit: cover;
  margin-right: 0.5rem;
}

.row {
  display: flex;
}

.forced-row {
  display: flex;
}

.column {
  flex: 50%;
  padding: 0px 16px 0px 16px;
}

section {
  padding-bottom: 66px;
}

/* Make tables scroll on small screens */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* smooth iOS scroll */
}

.table-wrapper table {
  min-width: 500px;
  /* prevents columns from collapsing too much */
}

.banner-img {
  width: 100%;
  /* Ensure it can scale horizontally */
  height: 100%;
  /* Allow the image to scale vertically */
  object-fit: cover;
  /* Crop the image to cover the container */
  border-radius: 8px;
  /* Rounded corners (optional) */
  box-shadow: 0 0 20px rgba(0, 246, 255, 0.3);
  /* Glowing border (optional) */
  overflow: hidden;
  /* Prevent anything outside the container from showing */
  margin-bottom: 20px;
  /* Space below the image, useful for some padding */
}


/*#endregion */

/*#region Footer*/
.site-footer {
  background: rgba(0, 0, 0, 0.6);
  border-top: 2px solid var(--link);
  margin-top: 40px;
  padding: 30px 20px 15px 20px;
  text-align: center;
  backdrop-filter: blur(8px);
}

.footer-nav {
  margin-bottom: 20px;
}

.footer-nav a {
  text-transform: uppercase;
  margin: 0 12px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.footer-contacts {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-contacts a {
  color: var(--link);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.footer-contacts a:hover {
  color: var(--link-hover);
  text-shadow: 0 0 6px var(--link-hover);
}

.footer-contacts img {
  height: 18px;
  width: 18px;
  filter: drop-shadow(0 0 3px var(--link));
}

.footer-contacts a:hover img {
  filter: drop-shadow(0 0 5px var(--link-hover));
}

.footer-bottom {
  font-size: 0.8rem;
  color: var(--text);
  opacity: 0.8;
  border-top: 1px solid rgba(0, 246, 255, 0.2);
  padding-top: 10px;
}

/* Responsive tweaks */
@media only screen and (max-width: 615px) {
  .footer-contacts {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .footer-nav a {
    display: block;
    margin: 6px 0;
  }
}

/*#endregion */

/*#region Neon GitHub Buttons ==========================================================================================================*/
.fancy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid var(--link);
  color: var(--link);
  font-family: "Orbitron", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 0 10px rgba(0, 246, 255, 0.4);
  transition: all 0.25s ease-in-out;
}

.fancy-btn img {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 0 4px var(--link));
  transition: filter 0.25s ease;
}

.fancy-btn:hover {
  border-color: var(--link-hover);
  color: var(--link-hover);
  box-shadow: 0 0 12px var(--link-hover), 0 0 20px var(--link-hover);
  transform: translateY(-2px);
}

.fancy-btn:hover img {
  filter: drop-shadow(0 0 6px var(--link-hover));
}

.fancy-btn:active {
  transform: translateY(1px);
  box-shadow: 0 0 6px var(--link), inset 0 0 8px rgba(0, 246, 255, 0.6);
}

/* Variant: Full-width for call-to-action */
.fancy-btn.full {
  display: flex;
  justify-content: center;
  width: 100%;
}

/*#endregion */

/*#region Screen Size Rules*/
/* Extra small devices (phones, up to 615px) */
@media only screen and (max-width: 615px) {

  /*#region Header*/
  .header-top {
    display: flex;
    margin-bottom: 0;
    align-items: center;
    width: 100%;
  }

  .header-bottom {
    flex-direction: column;
    width: 100%;
    padding-top: 4px;
  }

  .header-bottom.show {
    display: flex;
  }

  .nav-links a {
    margin: 8px 0;
    font-size: 0.9rem;
  }

  .contact-links {
    margin-top: 8px;
    display: block;
  }

  .hamburger {
    display: flex;
  }

  .hamburger-menu {
    opacity: 0;
    max-height: 0;
    display: flex;
    flex-direction: column;
  }

  .hamburger-menu.open {
    opacity: 1;
    max-height: 500px;
  }

  /* Individual links styling */
  .hamburger-menu .nav-links a,
  .hamburger-menu .contact-links a {
    display: block;
    padding: 8px 0;
  }

  /*#endregion */

  /*#region Body*/
  body {
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 100px;
    /* slightly less to fit smaller header */
  }

  body>* {
    padding: 15px 20px;
  }

  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .nav-links a {
    display: block;
    padding: 8px 0;
    font-size: 0.9rem;
  }

  .contact-links {
    margin-top: 8px;
  }

  .row {
    display: block;
  }

  .column {
    flex: 100%;
    padding: 0;
  }

  body::before {
    background-size: 30px 30px;
    /* tighter grid for small screens */
  }

  /*#endregion*/
}

/* Small devices (portrait tablets and large phones, 600px–768px) */
@media only screen and (min-width: 601px) and (max-width: 767px) {
  .row {
    display: block;
  }

  .column {
    flex: 100%;
    padding: 0;
  }
}

/* Medium devices (landscape tablets, 768px–991px) */
@media only screen and (min-width: 768px) and (max-width: 991px) {
  .row {
    display: flex;
  }

  .column {
    flex: 50%;
    padding: 0 8px;
  }
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
  .row {
    display: flex;
  }

  .column {
    flex: 50%;
    padding: 0 16px;
  }
}

/*#endregion*/

/* --- UNITY EMBED OVERRIDES --- */
#unity-container,
#unity-container.unity-desktop,
#unity-container.unity-mobile {
  position: relative !important;
  width: 100% !important;
  max-width: 960px;
  /* or any max width you want */
  margin: 2rem auto !important;
  height: auto !important;
}

#unity-canvas {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  /* maintains aspect ratio */
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#unity-footer,
#unity-loading-bar,
#unity-warning {
  position: static !important;
  width: 100%;
}