/* Reset & Base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  overflow: hidden;
  height: 100%;
  --page-pad: 1.5rem;
  touch-action: pinch-zoom;
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: #0a0a0a;
  color: #f0f0f0;
  overflow: hidden;
  height: 100%;
  touch-action: pinch-zoom;
  opacity: 0; /* hidden until JS intro is ready — prevents pre-animation flash */
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Header nav — minimap ===== */
.header-nav {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 1200px;
  padding: 0 16px;
  height: 20px;
  z-index: 1;
  pointer-events: auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
}

/* Section bar — width set by JS proportional to section height */
.nav-section {
  height: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  flex: none;
  cursor: pointer;
  transition: background 0.15s ease, height 0.15s ease, box-shadow 0.15s ease;
  margin-right: 3px;
  position: relative;
}

/* Section tinting — matches strip debug colors */
.nav-section:nth-child(1) { background: rgba(200, 140, 90, 0.2); }    /* header — warm amber */
.nav-section:nth-child(2) { background: rgba(190, 110, 75, 0.25); }   /* gameplay — espresso */
.nav-section:nth-child(3) { background: rgba(80, 160, 170, 0.2); }    /* tools — slate teal */
.nav-section:nth-child(4) { background: rgba(130, 90, 170, 0.2); }    /* graphics — plum */
.nav-section:nth-child(5) { background: rgba(80, 150, 100, 0.2); }    /* multiplayer — forest */
.nav-section:nth-child(6) { background: rgba(180, 130, 75, 0.2); }    /* prototyping — umber */
.nav-section:nth-child(7) { background: rgba(75, 110, 180, 0.2); }    /* consulting — navy */
.nav-section:nth-child(8) { background: rgba(255, 255, 255, 0.08); }  /* footer — charcoal */

/* Expanded vertical hit area for accessibility */
.nav-section::before {
  content: "";
  position: absolute;
  top: -14px;
  bottom: -14px;
  left: 0;
  right: 0;
}

.nav-section:last-of-type {
  margin-right: 0;
}

.nav-section:hover {
  height: 10px;
  filter: brightness(1.5);
}

.nav-section.active {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

/* Viewport head */
.nav-head {
  position: absolute;
  top: 50%;
  height: 16px;
  transform: translateY(-50%);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.1);
  pointer-events: auto;
  box-sizing: border-box;
  min-width: 4px;
  cursor: grab;
}

/* Expanded grab area for the head */
.nav-head::before {
  content: "";
  position: absolute;
  top: -12px;
  bottom: -12px;
  left: -4px;
  right: -4px;
}

/* ===== Site Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: 50px;
  pointer-events: none;
}

.header-bar {
  pointer-events: auto;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}


.header-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
  padding: 2rem 1.5rem;
  text-align: center;
}

.site-header:not(.active) .header-hero {
  pointer-events: none;
}

.header-hero h1 {
  font-size: 2rem;
  font-weight: 200;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(240, 240, 240, 0.5);
  margin-bottom: 1.5rem;
}

.hero-bio {
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(240, 240, 240, 0.55);
  max-width: 440px;
}

/* Note: .header-bar base styles are above with site-header.
   This block adds layout-specific properties. */
.header-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(240, 240, 240, 0.7);
}

/* ===== Accordion Page ===== */
.accordion-page {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

/* ===== Individual Strip ===== */
.accordion-strip {
  position: absolute;
  left: 0;
  right: 0;
  overflow: hidden;
  cursor: pointer;
  --st-l: 0px;
  --st-r: 0px;
  clip-path: polygon(0 var(--st-l), 100% var(--st-r), 100% 100%, 0 100%);
  will-change: transform;
}

.accordion-strip:first-child {
  clip-path: none;
}

/* Debug: distinct colors per section */
/* Refined dark palette — warm/cool alternating, strong enough to distinguish */
.accordion-strip:nth-child(1) { background: #1a1210; } /* deep espresso */
.accordion-strip:nth-child(2) { background: #0f1518; } /* slate teal */
.accordion-strip:nth-child(3) { background: #16111a; } /* muted plum */
.accordion-strip:nth-child(4) { background: #111614; } /* forest shadow */
.accordion-strip:nth-child(5) { background: #18140f; } /* burnt umber */
.accordion-strip:nth-child(6) { background: #0f1319; } /* deep navy */
.accordion-strip:nth-child(7) { background: #121212; } /* neutral charcoal */

/* ===== Footer strip ===== */
.strip-footer .strip-header {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}

.strip-footer .footer-collapsed {
  padding: 4rem 0 4rem;
}

.strip-footer .footer-meta {
  padding-top: 2rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.footer-links span {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: rgba(240, 240, 240, 0.6);
  text-transform: uppercase;
  color: rgba(240, 240, 240, 0.4);
  cursor: pointer;
}

.footer-links span:hover {
  color: rgba(240, 240, 240, 0.7);
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(240, 240, 240, 0.45);
  letter-spacing: 0.05em;
}

/* ===== Contact form ===== */
.strip-footer .strip-content-inner .content-body {
  padding: 2rem var(--page-pad) 3rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 500px;
}

.contact-form input,
.contact-form textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: #f0f0f0;
  outline: none;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(255, 255, 255, 0.2);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(240, 240, 240, 0.25);
}

.contact-form textarea {
  resize: vertical;
  min-height: 80px;
}

.contact-form button {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.6rem 2rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(240, 240, 240, 0.6);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.contact-form button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(240, 240, 240, 0.9);
}

/* ===== Strip Header ===== */
.strip-header {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 1200px;
  margin: 0 auto;
}

.strip-image {
  overflow: hidden;
}

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

.strip-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem var(--page-pad);
}

.strip-text h2 {
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.strip-text p {
  font-size: 0.75rem;
  line-height: 1.5;
  color: rgba(240, 240, 240, 0.6);
}

/* ===== Expandable Content ===== */
.strip-content {
  overflow: hidden;
  height: 0;
}

.strip-content-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.strip-content-inner .content-body {
  padding: var(--page-pad);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.accordion-strip.active .strip-content-inner .content-body {
  opacity: 1;
  transform: translateY(0);
}

.strip-content-inner p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(240, 240, 240, 0.55);
  margin-bottom: 1rem;
}

.content-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1rem 0;
  display: block;
}

.strip-content-inner p:last-child {
  margin-bottom: 0;
}

/* ===== Tablet (768px+) ===== */
@media (min-width: 768px) {
  html { --page-pad: 2.5rem; }

  .header-hero {
    min-height: 55vh;
    padding: 3rem 2rem;
  }

  .header-hero h1 {
    font-size: 3rem;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .hero-bio {
    font-size: 0.85rem;
    max-width: 480px;
  }

  .header-bar {
    /* height: 55px;
    padding: 0 2rem; */
    font-size: 0.8rem;
  }

  .accordion-strip {
    margin-top: 0;
    padding-top: 0;
  }

  .strip-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    flex-direction: row;
  }

  .accordion-strip:nth-child(even) .strip-header {
    direction: rtl;
  }

  .accordion-strip:nth-child(even) .strip-header > * {
    direction: ltr;
  }

  .strip-image {
    min-height: 0;
  }

  .strip-image img {
    height: 100%;
  }

  .strip-text {
    padding: 1.25rem var(--page-pad);
    min-height: 0;
  }

  .strip-text h2 {
    font-size: 1.15rem;
  }

  .strip-text p {
    font-size: 0.8rem;
    max-width: 500px;
  }

  .strip-content-inner .content-body {
    padding: 2rem var(--page-pad) 2.5rem;
  }

  .strip-content-inner p {
    font-size: 0.9rem;
  }

  .strip-footer .strip-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .strip-footer .footer-collapsed {
    padding-bottom: 2rem;
  }

  .strip-footer .footer-meta {
    padding-top: 2rem;
    text-align: right;
  }

  .footer-links {
    justify-content: flex-end;
  }
}

/* ===== Desktop (1024px+) ===== */
@media (min-width: 1024px) {
  html { --page-pad: 4rem; }
  .header-hero {
    min-height: 60vh;
    padding: 4rem;
  }

  .header-hero h1 {
    font-size: 4rem;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
  }

  .hero-tagline {
    font-size: 1.1rem;
    letter-spacing: 0.08em;
  }

  .hero-bio {
    font-size: 0.9rem;
    max-width: 520px;
  }

  .header-bar {
    /* height: 60px;
    padding: 0 4rem; */
    font-size: 0.85rem;
  }

  .accordion-strip {
    margin-top: 0;
    padding-top: 0;
  }

  .strip-text {
    padding: 1.5rem var(--page-pad);
  }

  .strip-text h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .strip-text p {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  .strip-content-inner .content-body {
    padding: 2rem var(--page-pad) 3rem;
  }

  .strip-content-inner p {
    font-size: 0.95rem;
    line-height: 1.8;
  }
}

/* ===== Focus indicators ===== */
.nav-section:focus-visible,
.nav-head:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
  border-radius: 4px;
}

.accordion-strip .strip-header:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.3);
  outline-offset: -2px;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
