/* ============================
   FONT
   ============================ */
@import url('https://fonts.googleapis.com/css2?family=Jersey+10&display=swap');

/* ============================
   RESET & BASE
   ============================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #000000;
  --color-text: #ffffff;
  --color-text-muted: #b7c4d1;
  --color-steel-blue: #4682b4;
  --color-steel-blue-tint: rgba(70, 130, 180, 0.12);
  --color-steel-blue-border: rgba(70, 130, 180, 0.5);
  --nav-height: 88px;
  --content-max-width: 1200px; /* controls how wide the centered content is */
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Jersey 10", sans-serif;
  font-weight: 400;
  font-style: normal;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Offsets scroll targets so the fixed navbar doesn't cover the section title */
section {
  scroll-margin-top: var(--nav-height);
}

/* ============================
   PIXEL FRAME (reusable)
   Small square "nubs" at each corner, steel-blue tinted background.
   ============================ */
.pixel-frame {
  position: relative;
  background-color: var(--color-steel-blue-tint);
  border: 1px solid rgba(70, 130, 180, 0.65);
}

.pixel-frame::before {
  content: "";
  position: absolute;
  inset: -4px;
  pointer-events: none;
  background:
    linear-gradient(var(--color-steel-blue), var(--color-steel-blue)) top left / 10px 10px no-repeat,
    linear-gradient(var(--color-steel-blue), var(--color-steel-blue)) top right / 10px 10px no-repeat,
    linear-gradient(var(--color-steel-blue), var(--color-steel-blue)) bottom left / 10px 10px no-repeat,
    linear-gradient(var(--color-steel-blue), var(--color-steel-blue)) bottom right / 10px 10px no-repeat;
}

/* ============================
   NAVBAR
   ============================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-steel-blue-border);
  z-index: 100;
}

/* The bar itself stays full-width (so the blur/border reach the screen edges),
   but its content is centered and capped at the same width as the rest of the page. */
.nav-inner {
  max-width: var(--content-max-width);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
}

/* Hamburger button — hidden on desktop, shown by the mobile breakpoint */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 24px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Animates into an "X" once the menu is open */
.nav-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-name {
  font-size: 2.1rem;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  display: inline-block;
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  position: relative;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: var(--color-steel-blue);
  transform: scale(1.15);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background-color: var(--color-steel-blue);
  transition: width 0.2s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ============================
   HERO / ABOUT
   ============================ */
.hero {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 4rem) 3rem 4rem;
}

.role-badge {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  margin-bottom: 2rem;
  animation: badge-glow-pulse 3s ease-in-out infinite;
}

/* A slow, subtle "breathing" glow in the same steel-blue used everywhere else
   on the site — keeps the badge feeling cohesive with the rest of the design
   rather than introducing a new accent color, while still making it pop. */
@keyframes badge-glow-pulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(70, 130, 180, 0.35), 0 0 22px rgba(70, 130, 180, 0.16);
  }
  50% {
    box-shadow: 0 0 16px rgba(70, 130, 180, 0.55), 0 0 32px rgba(70, 130, 180, 0.28);
  }
}

.role-badge span {
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}

.bio-text {
  font-size: 1.3rem;
  color: var(--color-text-muted);
  max-width: 700px;
}

/* ============================
   PROJECTS
   ============================ */
.projects {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 4rem 3rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.section-header h2 {
  font-size: 2rem;
  letter-spacing: 0.05em;
}

.entries-count {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.section-divider {
  height: 1px;
  background-color: var(--color-steel-blue-border);
  margin: 1rem 0 3rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  justify-items: center;
  gap: 2.5rem 2rem;
}

.project-card {
  display: block;
  width: 100%;
  max-width: 420px; /* about 2/3 of the previous 640px card size */
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-steel-blue);
}

.project-image-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3; /* matches the reference screenshot's proportions */
  overflow: hidden;
  border-bottom: 1px solid var(--color-steel-blue-border);
}

.project-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover; /* crops the image to fill the box without stretching it */
}

/* Fallback tint shown behind the image while it loads, or if the file path is wrong.
   Swap the src on the <img> tag in index.html to use your real screenshots. */
.project-image-dream {
  background-color: #3f5170;
}
.project-image-loop7 {
  background-color: #5a2f22;
}
.project-image-kava {
  background-color: #332766;
}
.project-image-nightvision {
  background-color: #2a4661;
}

.project-info {
  padding: 1rem 1.25rem 1.25rem;
  transition: opacity 0.25s ease;
}

.project-info h3 {
  font-size: 1.25rem; /* 20px — bumped up from 18px for better readability,
                          still a whole-pixel size so the pixel-styled font stays crisp */
  margin-bottom: 0.35rem;
}

.project-info p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Hides the title/description box while the hover overlay is showing,
   so the two don't compete for attention at the same time. */
.project-card:hover .project-info {
  opacity: 0;
}

/* ---- Hover-only overlay: covers the WHOLE card (image + info box),
   so the info box's own background doesn't peek out underneath it.
   Darkens from the bottom up, moves the title toward the middle,
   and reveals game details. ---- */
.hover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.97) 0%, rgba(0, 0, 0, 0.93) 55%, rgba(0, 0, 0, 0) 100%);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.project-card:hover .hover-overlay {
  opacity: 1;
  transform: translateY(0);
}

.hover-title {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

.hover-meta {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

.hover-meta li {
  display: flex;
  gap: 0.6rem;
  font-size: 0.8rem;
}

.hover-meta-label {
  width: 4.5rem;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.hover-meta-value {
  color: var(--color-text);
}

.press-start {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--color-steel-blue);
}

/* A small CSS-drawn triangle instead of a unicode "▶" character — this
   guarantees it always renders as a crisp geometric shape and never gets
   swapped out for a colorful emoji glyph by a phone's font/OS, which is
   what a text symbol like ▶ risks doing on some mobile devices. */
.press-start::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--color-steel-blue);
}

.project-card:hover .press-start {
  animation: press-start-blink 1.8s steps(1, start) infinite;
}

@keyframes press-start-blink {
  50% {
    opacity: 0.25;
  }
}

/* ============================
   CONTACT
   ============================ */
.contact {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 4rem 3rem 6rem;
  text-align: center;
  border-top: 1px solid var(--color-steel-blue-border);
}

.contact-heading {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.contact-links {
  font-size: 1.2rem;
}

.contact-email:hover,
.contact-linkedin:hover {
  color: var(--color-steel-blue);
}

.contact-separator {
  margin: 0 0.75rem;
  color: var(--color-text-muted);
}
