@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&display=swap");

:root {
  --bg: #0d0f14;
  --surface: #191d26;
  --surface-soft: rgba(16, 20, 30, 0.72);
  --text: #f4f6fb;
  --muted: #c5ccd8;
  --accent: #ffca28;
  --accent-strong: #ffd95d;
  --highlight: #59ff8d;
  --paper-base: #191d26;
  --paper-mid: #121720;
  --paper-shadow: #0d121a;
  --ink: #f4f6fb;
  --ink-soft: #d8deea;
  --line: rgba(255, 255, 255, 0.16);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
  --hud: rgba(14, 22, 31, 0.86);
  --hud-line: rgba(165, 240, 189, 0.22);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.site-header,
main,
footer {
  position: relative;
  z-index: 1;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 12% 20%, #1f2531 0%, var(--bg) 42%);
  line-height: 1.7;
  letter-spacing: 0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.35;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Silkscreen", sans-serif !important;
  font-weight: 400;
  letter-spacing: 0.45px;
  line-height: 1;
}

.silkscreen-regular {
  font-family: "Silkscreen", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.silkscreen-bold {
  font-family: "Silkscreen", sans-serif;
  font-weight: 700;
  font-style: normal;
}

a {
  color: inherit;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 15, 22, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
}

.brand-block h1 {
  font-size: clamp(2rem, 2.8vw, 2.6rem);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

#subtitle {
  color: var(--muted);
  font-size: 0.96rem;
  letter-spacing: 0.2px;
  margin: 0;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.34);
  white-space: nowrap;
}

.hud-stats {
  display: flex;
  gap: 8px;
  align-items: center;
}

.hud-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--hud-line);
  border-radius: 10px;
  background: var(--hud);
  font-size: 0.76rem;
  color: #d7f3de;
  letter-spacing: 0.2px;
}

.hud-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #79f28f;
  box-shadow: 0 0 8px rgba(121, 242, 143, 0.8);
}

.hud-dot-warn {
  background: #f7d85c;
  box-shadow: 0 0 8px rgba(247, 216, 92, 0.8);
}

#navbar,
#contact-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
}

.nav-item a {
  display: inline-block;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background-color: rgba(255, 255, 255, 0.03);
  padding: 9px 15px;
  border-radius: 0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.25px;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nav-item a:hover,
.nav-item a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 13, 20, 0.6), rgba(7, 10, 16, 0.92));
  transform: scale(1.02);
}

.hero-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.2;
}

#hero-pixel-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: clamp(34px, 4.6vw, 58px);
  align-items: end;
  min-height: 78vh;
  padding: clamp(64px, 10vw, 108px) 0;
}

.hero-grid-single {
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: start;
}

.hero-copy {
  display: grid;
  gap: 20px;
  max-width: 78ch;
  width: 100%;
}

.hero-terminal {
  position: relative;
  border: 1px solid rgba(121, 242, 143, 0.55);
  background: rgba(7, 10, 16, 0.82);
  padding: 18px 20px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 24px rgba(121, 242, 143, 0.12);
}

.hero-terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.05) 0,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.14;
}

.terminal-line {
  position: relative;
  margin: 0;
  text-transform: uppercase;
  line-height: 1.2;
}

.terminal-title {
  color: #ffd95d;
  font-size: clamp(2rem, 4.4vw, 3rem);
  letter-spacing: 1.5px;
}

.terminal-title::after {
  content: "_";
  margin-left: 6px;
  color: #72ffa8;
  animation: terminalBlink 0.9s steps(1, end) infinite;
}

.terminal-role {
  margin-top: 14px;
  color: #dfffe8;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  letter-spacing: 1px;
}

.terminal-stack {
  margin-top: 10px;
  color: #7ea1ff;
  font-size: clamp(0.9rem, 1.6vw, 1.06rem);
  letter-spacing: 0.9px;
}

.terminal-menu {
  margin-top: 20px;
  display: grid;
  gap: 8px;
  max-width: 420px;
}

.terminal-menu a {
  display: block;
  text-decoration: none;
  color: #f4f6fb;
  border: 1px solid rgba(126, 161, 255, 0.5);
  background: rgba(20, 28, 42, 0.68);
  padding: 8px 12px;
  font-family: "Silkscreen", sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.terminal-menu a::before {
  content: "> ";
  color: #72ffa8;
}

.terminal-menu a:hover,
.terminal-menu a:focus-visible {
  border-color: #72ffa8;
  color: #72ffa8;
  background: rgba(15, 32, 25, 0.8);
  transform: translateX(4px);
}

.terminal-loading {
  margin-top: 16px;
}

.terminal-loading p {
  margin: 0;
  color: #bcd5f2;
  font-size: 0.78rem;
  letter-spacing: 0.9px;
}

.loading-dots::after {
  content: "";
  animation: loadingDots 1.3s steps(4, end) infinite;
}

.loading-bar {
  margin-top: 8px;
  height: 8px;
  border: 1px solid rgba(126, 161, 255, 0.4);
  background: rgba(9, 12, 20, 0.9);
  overflow: hidden;
}

.loading-bar span {
  display: block;
  height: 100%;
  width: 32%;
  background: linear-gradient(90deg, #72ffa8, #ffd95d);
  animation: loadingSweep 1.8s ease-in-out infinite;
}

@keyframes terminalBlink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes loadingDots {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75%,
  100% {
    content: "...";
  }
}

@keyframes loadingSweep {
  0% {
    transform: translateX(-120%);
  }
  50% {
    transform: translateX(95%);
  }
  100% {
    transform: translateX(260%);
  }
}

.hero-specialties {
  margin-top: -6px;
}

.hero-build-panel {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(126, 161, 255, 0.35);
  background: rgba(9, 12, 20, 0.62);
  padding: 12px 14px;
  max-width: 58ch;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.hero-build-panel p {
  margin: 0;
  color: #d8deea;
  font-size: 0.92rem;
  letter-spacing: 0.2px;
}

.hero-build-panel span {
  color: #7ea1ff;
  font-weight: 700;
}

.eyebrow {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
}

#welcome-heading {
  font-size: clamp(2.8rem, 6vw, 5rem);
  max-width: 11ch;
  text-wrap: balance;
}

.hero-description {
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.16rem);
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.hero-reel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 8px;
  max-width: 96ch;
}

.hero-reel-tile {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(126, 161, 255, 0.32);
  background: rgba(9, 12, 20, 0.62);
  padding: 12px;
}

.hero-reel-tile img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.14);
}

.hero-reel-tile span {
  font-size: 0.9rem;
  color: #c8d7ff;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.button {
  display: inline-block;
  text-decoration: none;
  border-radius: 0;
  padding: 10px 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.26) 40%, transparent 72%);
  transform: translateX(-130%);
  transition: transform 0.45s ease;
}

.button:hover::after,
.button:focus-visible::after {
  transform: translateX(130%);
}

.button-primary {
  background: linear-gradient(90deg, #f0b90f, var(--accent-strong));
  color: #1f1c10;
}

.button-secondary {
  border-color: var(--line);
  background: rgba(10, 12, 16, 0.5);
}

.button-cv {
  border-color: rgba(121, 242, 143, 0.45);
  background: rgba(22, 49, 33, 0.56);
  color: #cbf6d5;
}

.button-cv:hover,
.button-cv:focus-visible {
  border-color: rgba(160, 255, 186, 0.8);
  box-shadow: 0 0 16px rgba(121, 242, 143, 0.35);
}

.featured-project-box {
  justify-self: stretch;
  width: 100%;
  max-width: none;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  background: rgba(7, 10, 16, 0.86);
  border: 1px solid rgba(121, 242, 143, 0.45);
  color: #f4f6fb;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 24px rgba(121, 242, 143, 0.12);
  display: grid;
}

.featured-project-box::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.05) 0,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.12;
}

.featured-project-wrap {
  justify-self: end;
  width: min(390px, 100%);
  display: grid;
  gap: 0;
}

.featured-project-banner {
  display: block;
  width: 100%;
  position: relative;
  overflow: hidden;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #ffd95d;
  text-shadow: 0 0 8px rgba(114, 255, 168, 0.35);
  background:
    linear-gradient(180deg, rgba(12, 18, 24, 0.98), rgba(6, 8, 12, 0.98));
  border: 1px solid rgba(121, 242, 143, 0.55);
  border-bottom: none;
  box-shadow:
    0 0 14px rgba(121, 242, 143, 0.18),
    inset 0 0 0 1px rgba(166, 255, 196, 0.12);
  padding: 9px 12px;
}

.featured-project-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
    to bottom,
    rgba(194, 255, 212, 0.1) 0,
    rgba(194, 255, 212, 0.1) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.26;
}

.featured-project-banner::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 1px;
  background: rgba(121, 242, 143, 0.85);
  box-shadow: 0 0 8px rgba(121, 242, 143, 0.4);
}

.featured-project-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.featured-project-image iframe,
.featured-project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.featured-project-box:hover .featured-project-image img,
.featured-project-box:hover .featured-project-image iframe {
  transform: scale(1.04);
}

.featured-project-tag {
  justify-self: start;
  margin: 14px 16px 8px;
  font-size: 0.72rem;
  color: #1f1c10;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: var(--accent);
  border-radius: 999px;
  padding: 4px 10px;
}

.featured-project-box h3 {
  font-size: 1.75rem;
  margin: 0 16px;
  color: #ffd95d;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.featured-project-box p {
  margin: 10px 16px 0;
  color: #d8deea;
}

.video-fallback {
  margin: 10px 16px 0;
  font-size: 0.8rem;
  color: #bcd5f2;
}

.video-fallback a {
  color: #72ffa8;
  text-decoration: none;
  font-weight: 700;
}

.video-fallback a:hover,
.video-fallback a:focus-visible {
  color: #f4f6fb;
}

.project-link {
  margin: 14px 16px 20px;
  text-decoration: none;
  color: #72ffa8;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.project-link:hover,
.project-link:focus-visible {
  color: #f4f6fb;
}

.hero-section,
.content-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.section-neon-divider {
  width: min(1100px, 92vw);
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(89, 255, 141, 0), rgba(89, 255, 141, 0.95), rgba(89, 255, 141, 0));
  box-shadow: 0 0 16px rgba(89, 255, 141, 0.55), 0 0 26px rgba(89, 255, 141, 0.28);
}

.hero-section.is-visible,
.content-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.content-section {
  padding: clamp(64px, 9vw, 108px) 0;
}

.content-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 24px;
}

.about-grid {
  display: grid;
  gap: 24px;
  justify-items: center;
}

.profile-text-container {
  display: grid;
  gap: 20px;
  max-width: 70ch;
  width: 100%;
}

.about-grid h2 {
  text-align: center;
}

#profile-text,
#profile-text-secondary {
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(11, 14, 21, 0.56);
  padding: 24px 26px;
  border-radius: 14px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

#profile-text p + p,
#profile-text-secondary p + p {
  margin-top: 12px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.software-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.games-grid .project-tile:nth-child(2n) {
  margin-top: 0;
}

.software-grid .project-tile:nth-child(3n + 2) {
  margin-top: 0;
}

.software-grid .project-tile:nth-child(3n) {
  margin-top: 0;
}

.section-subheading {
  display: block;
  width: 100%;
  padding-bottom: 14px;
  margin: 14px 0 26px;
  border-bottom: 2px solid var(--accent);
}

.more-projects-wrap {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.more-projects-dropdown {
  width: min(360px, 100%);
}

.more-projects-dropdown summary {
  list-style: none;
  width: 100%;
  text-align: center;
  cursor: pointer;
}

.more-projects-dropdown summary::-webkit-details-marker {
  display: none;
}

.more-projects-dropdown summary::after {
  content: " v";
  margin-left: 8px;
  font-weight: 700;
}

.more-projects-dropdown[open] summary::after {
  content: " ^";
}

.more-projects-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(11, 14, 21, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36);
}

.more-projects-list li + li {
  margin-top: 6px;
}

.more-projects-list a {
  display: block;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  padding: 9px 12px;
  text-align: center;
  letter-spacing: 0.25px;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.more-projects-list a:hover,
.more-projects-list a:focus-visible {
  border-color: #7ea1ff;
  color: #c8d7ff;
  background: rgba(126, 161, 255, 0.12);
}

.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.screenshot-gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.screenshot-gallery img:hover {
  transform: scale(1.03);
  border-color: var(--accent, #7dd3fc);
}

/* Lightbox Modal */
.image-lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.image-lightbox-modal.is-open {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lightbox-image-container {
  width: 100%;
  max-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  overflow: hidden;
}

.lightbox-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.lightbox-nav-button {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 10px 16px;
  border-radius: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.lightbox-nav-button:hover {
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(255, 202, 40, 0.5);
}

.lightbox-nav-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: scale(1);
}

.lightbox-counter {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
  min-width: 80px;
  text-align: center;
}

.lightbox-close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 0;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: 700;
}

.lightbox-close-button:hover {
  transform: scale(1.12);
  box-shadow: 0 0 16px rgba(255, 202, 40, 0.5);
}

@media (max-width: 768px) {
  .lightbox-content {
    gap: 12px;
    padding: 0 16px;
  }

  .lightbox-nav-button {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .lightbox-counter {
    font-size: 0.8rem;
  }

  .lightbox-close-button {
    width: 36px;
    height: 36px;
    font-size: 20px;
    top: 12px;
    right: 12px;
  }
}

.project-tile {
  border: 1px solid rgba(89, 255, 141, 0.78);
  background:
    linear-gradient(180deg, rgba(21, 28, 39, 0.96), rgba(12, 17, 25, 0.96)),
    var(--surface);
  border-radius: 0;
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 14px;
  position: relative;
  overflow: hidden;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-tile::before {
  content: none;
}

.project-tile::after {
  content: none;
}

.project-tile:hover {
  transform: none;
  border-color: rgba(89, 255, 141, 0.78);
  box-shadow: none;
}

.project-tile[data-project-url] {
  cursor: pointer;
  border-color: rgba(89, 255, 141, 0.92);
}

.project-tile[data-project-url]:focus-visible {
  outline: 2px solid rgba(255, 202, 40, 0.9);
  outline-offset: 2px;
}

.project-tile[data-project-url]::after {
  content: "View Project";
  position: absolute;
  right: 0;
  top: 0;
  padding: 5px 9px;
  font-size: 0.68rem;
  letter-spacing: 0.35px;
  font-weight: 700;
  color: #122016;
  background: #59ff8d;
  border-left: 1px solid rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.project-tile[data-project-url]:hover,
.project-tile[data-project-url]:focus-visible {
  border-color: #7dffaa;
  box-shadow: 0 0 0 1px rgba(125, 255, 170, 0.35);
}

.project-tile[data-project-url]:hover .project-tile-image img,
.project-tile[data-project-url]:focus-visible .project-tile-image img {
  filter: brightness(1.06);
}

.project-tile-image {
  width: 100%;
  height: 190px;
  border-radius: 0;
  border: 4px solid var(--accent);
  overflow: hidden;
}

.project-tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-tile h3 {
  font-size: 1.45rem;
  margin-top: 2px;
}

.level-label {
  font-size: 0.78rem;
  letter-spacing: 1.1px;
  color: #7ea1ff;
  margin-top: 6px;
}

.level-year {
  margin: 2px 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.8px;
  color: #bcd5f2;
}

.level-role {
  margin: 2px 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.8px;
  color: #d8deea;
}

.level-rating {
  margin: -4px 0 0;
  color: #ffd95d;
  font-size: 1rem;
  letter-spacing: 1px;
}

/* Color-coded project titles for quick visual scanning */
.games-grid .project-tile:nth-child(1) h3 {
  color: #ffca28;
}

.games-grid .project-tile:nth-child(2) h3 {
  color: #72ffa8;
}

.games-grid .project-tile:nth-child(3) h3 {
  color: #7ea1ff;
}

.games-grid .project-tile:nth-child(4) h3 {
  color: #ff8fb1;
}

.project-tile > h3:first-child {
  margin-top: 14px;
}

.project-tile p {
  color: #d8deea;
  line-height: 1.65;
}

.project-tile p + p {
  margin-top: 2px;
}

.project-tech-heading {
  font-size: 1rem;
  letter-spacing: 0.35px;
  color: #9fb4d9;
}

.project-tech-list {
  margin-left: 20px;
  color: #d8deea;
  display: grid;
  gap: 5px;
}

.mission-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.mission-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(142, 205, 255, 0.24);
  background: rgba(13, 18, 27, 0.72);
  color: #bcd5f2;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.hero-specialties .mission-chip {
  border-color: rgba(121, 242, 143, 0.35);
  background: rgba(20, 35, 28, 0.7);
  color: #bdf7cb;
}

.project-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 9px;
  margin-top: 14px;
}

.project-box-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
  border-radius: 0;
  padding: 8px 10px;
  min-height: 40px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    background-color 0.2s ease;
}

.project-box-button:hover,
.project-box-button:focus-visible {
  transform: none;
}

.github-button {
  color: #d8deea;
  background: rgba(20, 24, 35, 0.95);
}

.github-button:hover,
.github-button:focus-visible {
  border-color: #7ea1ff;
  color: #c8d7ff;
}

.itch-button {
  color: #ffd9df;
  background: rgba(61, 20, 34, 0.86);
}

.itch-button:hover,
.itch-button:focus-visible {
  border-color: #ff6b93;
  color: #ffe3ea;
}

footer {
  border-top: 1px solid var(--line);
  padding: 42px 0;
  background-color: rgba(10, 12, 16, 0.9);
}

#contact-heading {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.xp-hud {
  position: fixed;
  left: 14px;
  top: auto;
  bottom: 12px;
  z-index: 140;
  display: flex;
  align-items: center;
  gap: clamp(4px, 1vw, 8px);
  padding: clamp(6px, 1vw, 8px) clamp(8px, 1.5vw, 10px);
  border-radius: 999px;
  border: 1px solid var(--hud-line);
  background: rgba(10, 17, 24, 0.84);
  backdrop-filter: blur(8px);
}

.xp-label {
  font-size: clamp(0.6rem, 2vw, 0.72rem);
  letter-spacing: 1px;
  font-weight: 700;
  color: #a3ffd0;
}

.xp-track {
  width: clamp(80px, 20vw, 230px);
  height: clamp(6px, 1vw, 8px);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.xp-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #72ffa8, #ffd95d);
  box-shadow: 0 0 14px rgba(114, 255, 168, 0.6);
  transition: width 0.12s linear;
}

.achievement-toast {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 150;
  max-width: min(82vw, 320px);
  border-radius: 12px;
  border: 1px solid rgba(255, 217, 93, 0.5);
  background: rgba(22, 17, 9, 0.92);
  color: #ffecb0;
  padding: 10px 12px;
  font-size: 0.86rem;
  letter-spacing: 0.4px;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.achievement-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cursor-dot,
.cursor-ring {
  display: none;
}

@media (pointer: fine) {
  body.game-cursor {
    cursor: none;
  }

  body.game-cursor a,
  body.game-cursor button,
  body.game-cursor [role="button"] {
    cursor: none;
  }

  .cursor-dot,
  .cursor-ring {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 180;
  }

  .cursor-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffd95d;
    box-shadow: 0 0 12px rgba(255, 217, 93, 0.8);
  }

  .cursor-ring {
    width: 26px;
    height: 26px;
    border: 1px solid rgba(163, 255, 208, 0.82);
    border-radius: 50%;
    box-shadow: 0 0 14px rgba(114, 255, 168, 0.45);
    transition: width 0.14s ease, height 0.14s ease, border-color 0.14s ease;
  }

  .cursor-ring.is-hot {
    width: 40px;
    height: 40px;
    border-color: rgba(255, 217, 93, 0.92);
  }
}

@media (max-width: 1280px) {
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .xp-hud {
    top: auto;
    bottom: 12px;
    left: 12px;
  }

  .featured-project-wrap {
    justify-self: start;
    width: min(420px, 100%);
  }

  .software-grid {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }

  .games-grid .project-tile:nth-child(2n),
  .software-grid .project-tile:nth-child(3n + 2),
  .software-grid .project-tile:nth-child(3n) {
    margin-top: 0;
  }

  .hud-stats {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .xp-hud {
    gap: 4px;
    padding: 6px 8px;
  }

  .xp-label {
    font-size: 0.6rem;
  }

  .xp-track {
    width: clamp(60px, 15vw, 140px);
    height: 6px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  #subtitle {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.34);
    padding-top: 6px;
    white-space: normal;
  }

  #welcome-heading {
    max-width: 16ch;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-reel {
    grid-template-columns: 1fr;
  }

  .hero-reel-tile img {
    height: 190px;
  }

  .button {
    width: 100%;
    text-align: center;
  }

  #profile-text,
  #profile-text-secondary {
    padding: 18px;
  }

  .xp-hud {
    display: none;
  }

  .project-grid,
  .software-grid {
    grid-template-columns: 1fr;
  }

  .games-grid .project-tile:nth-child(2n),
  .software-grid .project-tile:nth-child(3n + 2),
  .software-grid .project-tile:nth-child(3n) {
    margin-top: 0;
  }

  .project-links {
    grid-template-columns: 1fr;
  }
}
