/* ============================================================================
   THE NATIVE CREATIVE — REBRAND 2026
   B&W Design System
   Pure vanilla CSS. Zero build step.
   Principle: Weight 400 carries hierarchy. Size = emphasis, not bold.
   ============================================================================ */

/* ---------------------------------------------------------------------------
   1. LOCKED DESIGN TOKENS — do not change these values
   --------------------------------------------------------------------------- */
:root {
  /* Greyscale palette ONLY — zero chroma */
  --ink: #0a0a0a;          /* primary dark */
  --paper: #f4f4f4;         /* primary light */
  --grey-900: #141414;
  --grey-800: #1e1e1e;
  --grey-700: #2a2a2a;      /* pewter — borders */
  --grey-600: #3a3a3a;
  --grey-500: #555555;
  --grey-400: #888888;
  --grey-300: #b0b0b0;
  --grey-200: #d0d0d0;
  --grey-100: #e8e8e8;

  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Type scale (1.250 ratio) */
  --text-display: clamp(3rem, 8vw, 6rem);
  --text-h1: clamp(2rem, 5vw, 3rem);
  --text-h2: 1.75rem;
  --text-h3: 1.25rem;
  --text-body: 1rem;
  --text-body-sm: 0.875rem;
  --text-mono: 0.875rem;
  --text-mono-sm: 0.75rem;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  /* Layout */
  --max-width: 1280px;
  --border-hairline: 1px solid var(--grey-300);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;

  /* Derived layout helpers */
  --header-height: 64px;
}

/* ---------------------------------------------------------------------------
   2. RESET & BASE
   --------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

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

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ---------------------------------------------------------------------------
   3. TYPOGRAPHY
   --------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-h1);
}

h2 {
  font-size: var(--text-h2);
}

h3 {
  font-size: var(--text-h3);
}

p {
  margin-bottom: var(--space-sm);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 500;
}

/* ---------------------------------------------------------------------------
   4. LAYOUT PRIMITIVES
   --------------------------------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

.section-header {
  margin-bottom: var(--space-lg);
  max-width: 60rem;
}

.section-title {
  font-size: var(--text-h2);
  font-family: var(--font-display);
  font-weight: 400;
  margin-bottom: var(--space-xs);
}

.section-subtitle {
  font-size: var(--text-body-sm);
  font-family: var(--font-mono);
  color: var(--grey-500);
}

/* ---------------------------------------------------------------------------
   5. FILM GRAIN OVERLAY — analog texture layer
   --------------------------------------------------------------------------- */
.grain-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  mix-blend-mode: difference;
  background-repeat: repeat;
}

/* ---------------------------------------------------------------------------
   6. NAVIGATION
   --------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color var(--transition-base),
              border-color var(--transition-base);
}

.site-header.scrolled {
  background-color: var(--paper);
  border-bottom: var(--border-hairline);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h3);
  letter-spacing: -0.01em;
}

.nav-brand img {
  height: 32px;
  width: auto;
  filter: invert(33.3%);
}

.nav-brand .wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--grey-500);
}

.nav-brand:hover .wordmark {
  color: var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-500);
  position: relative;
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--paper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

/* Default (transparent nav over the dark hero): active/hover + underline = white */
.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  color: var(--paper);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

/* Scrolled (white nav): active/hover + underline -> soft grey, lighter than the
   #555 base links but >=25% black so it still reads on white (~5:1, AA). */
.site-header.scrolled .nav-links a:hover,
.site-header.scrolled .nav-links a:focus-visible,
.site-header.scrolled .nav-links a.active {
  color: #6a6a6a;
}
.site-header.scrolled .nav-links a::after {
  background-color: #6a6a6a;
}

/* Pages whose top section is light (white behind the transparent nav): the
   active/hover + underline are soft grey from the top, not white. */
.site-header--on-light:not(.scrolled) .nav-links a:hover,
.site-header--on-light:not(.scrolled) .nav-links a:focus-visible,
.site-header--on-light:not(.scrolled) .nav-links a.active {
  color: #6a6a6a;
}
.site-header--on-light:not(.scrolled) .nav-links a::after {
  background-color: #6a6a6a;
}

.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: var(--ink);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ---------------------------------------------------------------------------
   7. HERO
   --------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--ink);
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-md);
  max-width: var(--max-width);
}

.hero-label {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--grey-400);
  margin-bottom: var(--space-sm);
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-display);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--paper);
  margin-bottom: var(--space-sm);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-body);
  color: var(--grey-300);
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------------------
   8. BUTTONS
   --------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: var(--border-hairline);
  transition: background-color var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast);
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--grey-900);
  border-color: var(--grey-900);
}

.btn--outline {
  background-color: transparent;
  color: var(--ink);
  border-color: var(--grey-500);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background-color: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn--mono {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Light-on-dark variant for buttons inside dark sections (hero) */
.hero .btn--outline {
  color: var(--paper);
  border-color: var(--grey-400);
}

.hero .btn--outline:hover,
.hero .btn--outline:focus-visible {
  background-color: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

/* ---------------------------------------------------------------------------
   9. PROJECT GRID
   --------------------------------------------------------------------------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.project-card {
  border: var(--border-hairline);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  transition: transform var(--transition-base);
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--grey-200);
}

.project-card__body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex-grow: 1;
}

.project-card__category {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  color: var(--grey-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h3);
  line-height: 1.2;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}

.tag {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  padding: 0.125rem var(--space-xs);
  border: 1px solid var(--grey-300);
  color: var(--grey-500);
}

/* ---------------------------------------------------------------------------
   10. SERVICES GRID
   --------------------------------------------------------------------------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.service-card {
  border: var(--border-hairline);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.service-card__number {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  color: var(--grey-400);
  letter-spacing: 0.1em;
}

.service-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h3);
}

.service-card__description {
  font-size: var(--text-body-sm);
  color: var(--grey-500);
  line-height: 1.6;
}

/* ---------------------------------------------------------------------------
   11. SKILLS
   --------------------------------------------------------------------------- */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.skill-category {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.skill-bar {
  width: 100%;
  height: 4px;
  background-color: var(--grey-200);
  position: relative;
  overflow: hidden;
}

.skill-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--skill-level, 0%);
  background-color: var(--grey-700);
}

.skill-bar__fill {
  height: 100%;
  background-color: var(--grey-700);
  transition: width var(--transition-base);
}

/* ---------------------------------------------------------------------------
   12. TIMELINE
   --------------------------------------------------------------------------- */
.timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: var(--space-md);
  border-left: var(--border-hairline);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-lg);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-md) - 5px);
  top: 0.25rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--ink);
  border: 2px solid var(--paper);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  color: var(--grey-500);
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xs);
}

.timeline-content {
  font-size: var(--text-body);
}

.timeline-content h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h3);
  margin-bottom: 0.25rem;
}

.timeline-content .timeline-org {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  color: var(--grey-400);
  margin-bottom: var(--space-xs);
}

.timeline-content p {
  font-size: var(--text-body-sm);
  color: var(--grey-500);
}

/* ---------------------------------------------------------------------------
   13. CONTACT FORM
   --------------------------------------------------------------------------- */
.contact-form {
  max-width: 48rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-channels {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.contact-channel {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.contact-channel__label {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-400);
}

.contact-channel__value {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  color: var(--ink);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.contact-channel__value:hover,
.contact-channel__value:focus-visible {
  color: var(--grey-500);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-label {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-500);
}

.form-input,
.form-textarea,
.form-select {
  padding: var(--space-xs) var(--space-sm);
  border: var(--border-hairline);
  background-color: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  transition: border-color var(--transition-fast);
}

.form-textarea {
  resize: vertical;
  min-height: 8rem;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--grey-400);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: 2px solid var(--ink);
  outline-offset: -1px;
  border-color: var(--ink);
}

/* Safety net — hidden attribute overrides form-group layout */
.form-group[hidden] {
  display: none;
}

/* ---------------------------------------------------------------------------
   14. GAMES GRID
   --------------------------------------------------------------------------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.game-card {
  border: var(--border-hairline);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  transition: transform var(--transition-base);
}

.game-card:hover {
  transform: translateY(-4px);
}

.game-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: var(--grey-200);
}

.game-card__body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex-grow: 1;
}

.game-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h3);
}

.game-card__description {
  font-size: var(--text-body-sm);
  color: var(--grey-500);
  flex-grow: 1;
}

.game-card__play {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  margin-top: var(--space-xs);
}

.game-card__play::after {
  content: ' →';
}

.game-card__play:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------------------
   15. FOOTER
   --------------------------------------------------------------------------- */
.site-footer {
  border-top: var(--border-hairline);
  padding: var(--space-lg) 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-500);
  transition: color var(--transition-fast);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--ink);
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}

.footer-contact a {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-500);
  transition: color var(--transition-fast);
}

.footer-contact a:hover,
.footer-contact a:focus-visible {
  color: var(--ink);
}

.footer-copyright {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  color: var(--grey-400);
}

/* ---------------------------------------------------------------------------
   16. UTILITIES & MISC
   --------------------------------------------------------------------------- */
.mono-label {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-400);
}

.text-center {
  text-align: center;
}

.text-mono {
  font-family: var(--font-mono);
}

.divider {
  border: none;
  border-top: var(--border-hairline);
  margin: var(--space-md) 0;
}

/* Skip link — visually hidden until focused */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-sm);
  z-index: 10000;
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-sm);
}

/* Screen-reader-only content */
.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;
}

/* ---------------------------------------------------------------------------
   17. DARK SECTION UTILITY
   --------------------------------------------------------------------------- */
.section--dark {
  background-color: var(--ink);
  color: var(--paper);
}

.section--dark .section-title {
  color: var(--paper);
}

.section--dark .section-subtitle,
.section--dark .mono-label {
  color: var(--grey-400);
}

/* --- Dark section element overrides --- */
.section--dark .service-card {
  border-color: var(--grey-700);
}

.section--dark .service-card__number {
  color: var(--grey-400);
}

.section--dark .service-card__title {
  color: var(--paper);
}

.section--dark .service-card__description {
  color: var(--grey-300);
}

/* --- Dark section card inversions (project + game grids) --- */
.section--dark .project-card,
.section--dark .game-card {
  background-color: var(--grey-900);
  border-color: var(--grey-700);
}

.section--dark .project-card__image,
.section--dark .game-card__image {
  background-color: var(--grey-800);
}

/* Subtle dark scrim over thumbnail image areas so they sit on the dark ground */
.section--dark .project-card__image::after,
.section--dark .game-card__image::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.35);
}

.section--dark .project-card__title,
.section--dark .game-card__title {
  color: var(--paper);
}

.section--dark .project-card__category {
  color: var(--grey-400);
}

.section--dark .project-card__tags .tag {
  border-color: var(--grey-600);
  color: var(--grey-300);
}

.section--dark .game-card__description {
  color: var(--grey-300);
}

.section--dark .game-card__play {
  color: var(--paper);
}

.section--dark .btn--primary {
  background-color: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.section--dark .btn--primary:hover,
.section--dark .btn--primary:focus-visible {
  background-color: var(--grey-100);
  border-color: var(--grey-100);
}

.section--dark .btn--outline {
  color: var(--paper);
  border-color: var(--grey-400);
}

.section--dark .btn--outline:hover,
.section--dark .btn--outline:focus-visible {
  background-color: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.section--dark .process-steps li {
  color: var(--grey-300);
  border-bottom-color: var(--grey-700);
}

.section--dark .process-steps li::before {
  color: var(--grey-400);
}

.section--dark .process-steps strong {
  color: var(--paper);
}

/* ---------------------------------------------------------------------------
   18. FOCUS STATES — accessibility
   --------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Light-on-dark focus (hero, dark sections) */
.hero a:focus-visible,
.hero button:focus-visible,
.section--dark a:focus-visible,
.section--dark button:focus-visible,
.section--dark input:focus-visible,
.section--dark textarea:focus-visible {
  outline-color: var(--paper);
}

/* ---------------------------------------------------------------------------
   19. RESPONSIVE BREAKPOINTS
   --------------------------------------------------------------------------- */

/* Tablet */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(20rem, 80vw);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-xl) var(--space-lg);
    background-color: var(--paper);
    border-left: var(--border-hairline);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    z-index: 1000;
  }

  .nav-links.nav-open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: var(--text-body);
    color: var(--ink);
  }

  /* Grids reduce columns */
  .project-grid,
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skill-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

  .section {
    padding: var(--space-lg) 0;
  }

  .hero-subtitle {
    margin-bottom: var(--space-md);
  }
}

/* Mobile */
@media (max-width: 480px) {
  .container {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  .section {
    padding: var(--space-md) 0;
  }

  /* Single column */
  .project-grid,
  .game-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .nav-brand .wordmark {
    font-size: var(--text-body);
  }
}

/* ---------------------------------------------------------------------------
   19b. PROJECT DETAIL PAGE — styles for project.html template
   --------------------------------------------------------------------------- */
.project-header {
  margin-bottom: var(--space-lg);
}

.project-banner {
  width: 100%;
  margin-bottom: var(--space-lg);
  border: var(--border-hairline);
  overflow: hidden;
}

.project-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.project-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.project-main p {
  line-height: var(--leading-body, 1.6);
  color: var(--grey-600);
}

.project-meta {
  border-left: var(--border-hairline);
  padding-left: var(--space-md);
}

.project-meta__item {
  margin-bottom: var(--space-md);
}

.project-meta__item .mono-label {
  margin-bottom: var(--space-xs);
  color: var(--grey-400);
}

.project-gallery {
  margin-bottom: var(--space-xl);
}

.project-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 4px;
  grid-auto-flow: dense;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.project-gallery__item {
  margin: 0;
  border: var(--border-hairline);
  overflow: hidden;
}

.project-gallery__item img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity var(--transition-fast);
}

.project-gallery__item img:hover {
  opacity: 0.85;
}

.project-next {
  border-top: var(--border-hairline);
  padding-top: var(--space-md);
}

.project-next__link {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  text-decoration: none;
  color: var(--ink);
  transition: opacity var(--transition-fast);
}

.project-next__link:hover {
  opacity: 0.6;
}

.project-error {
  padding: var(--space-xl) 0;
  text-align: center;
}

/* ---------------------------------------------------------------------------
   19c. PROCESS STEPS — contact page
   --------------------------------------------------------------------------- */
.process-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: var(--space-md) 0;
}

.process-steps li {
  counter-increment: step;
  padding: var(--space-sm) 0 var(--space-sm) 3rem;
  position: relative;
  border-bottom: var(--border-hairline);
  color: var(--grey-600);
  line-height: 1.6;
}

.process-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  color: var(--grey-400);
}

.process-steps strong {
  color: var(--ink);
  font-weight: 500;
}

/* ---------------------------------------------------------------------------
   19d. RESPONSIVE — project detail
   --------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .project-layout {
    grid-template-columns: 1fr;
  }

  .project-meta {
    border-left: none;
    border-top: var(--border-hairline);
    padding-left: 0;
    padding-top: var(--space-md);
  }

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

/* ---------------------------------------------------------------------------
   20. REDUCED MOTION — disable all transitions and animations
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .grain-overlay {
    animation: none;
  }

  .project-card:hover,
  .game-card:hover {
    transform: none;
  }
}

/* ==========================================================================
   SELECTED WEBSITES — browser-frame cards
   ========================================================================== */
.web-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
.web-card {
  display: flex;
  flex-direction: column;
  border: var(--border-hairline);
  background: var(--paper);
  overflow: hidden;
  transition: transform var(--transition-base);
}
.web-card:hover {
  transform: translateY(-4px);
}
.web-card__browser {
  display: flex;
  flex-direction: column;
}
.web-card__bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  border-bottom: var(--border-hairline);
  background: var(--grey-100);
}
.web-card__dots {
  display: inline-flex;
  gap: 5px;
}
.web-card__dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--grey-300);
  display: block;
}
.web-card__url {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  color: var(--grey-500);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.web-card__shot {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--grey-200);
}
.web-card__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(1);
  transition: filter var(--transition-base);
}
.web-card:hover .web-card__shot img {
  filter: grayscale(0);
}
.web-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-top: var(--border-hairline);
}
.web-card__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h3);
}
.web-card__visit {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.web-card__visit:hover {
  text-decoration: underline;
}
@media (max-width: 768px) {
  .web-grid {
    grid-template-columns: 1fr;
  }
}


/* Click-to-reveal contact (anti-scrape) */
.reveal{font-family:var(--font-mono);font-size:var(--text-mono-sm);color:var(--grey-500);background:none;border:0;padding:0;cursor:pointer;text-decoration:underline;letter-spacing:0.06em;display:inline;}
.reveal:hover,.reveal:focus-visible{color:var(--ink);}
.reveal:focus-visible{outline:2px solid var(--ink);outline-offset:2px;}
.reveal.contact-channel__value{font-family:var(--font-display);font-size:var(--text-h3);color:var(--ink);text-decoration:none;}
.reveal.contact-channel__value:hover,.reveal.contact-channel__value:focus-visible{color:var(--grey-500);}
