/* ==========================================================================
   NM-TECH DESIGN SYSTEM -- main.css
   Philosophy: WHITE SPACE + BLACK INFORMATION + ONE ORANGE SIGNAL
   Typography: Space Grotesk (headings/UI) + IBM Plex Mono (labels/code)
   ========================================================================== */

/* ==========================================================================
   0. FONT FACES
   ========================================================================== */

@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk/SpaceGrotesk-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono/IBMPlexMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   1. CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
  /* --- Colors --- */
  --color-white:     #FFFFFF;
  --color-black:     #0F0F0F;
  --color-orange:    #FF6A00;

  --color-gray-100:  #F8F8F8;
  --color-gray-200:  #F0F0F0;
  --color-gray-300:  #E0E0E0;
  --color-gray-500:  #888888;
  --color-gray-700:  #444444;

  /* --- Typography --- */
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', Courier, monospace;

  /* --- Font Sizes --- */
  --text-xs:   0.6875rem;  /* 11px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.5rem;     /* 24px */
  --text-2xl:  2rem;       /* 32px */
  --text-3xl:  3rem;       /* 48px */
  --text-4xl:  4rem;       /* 64px */
  --text-5xl:  5rem;       /* 80px */

  /* --- Spacing --- */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* --- Layout --- */
  --container-max:     1200px;
  --container-wide:    1400px;
  --container-padding: 2rem;

  /* --- Transitions --- */
  --transition-fast:   150ms ease;
  --transition-base:   300ms ease;
  --transition-slow:   500ms ease;

  /* --- Header --- */
  --header-height:          72px;
  --header-height-scrolled: 56px;
}

/* ==========================================================================
   2. MODERN RESET
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-black);
  background-color: var(--color-white);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p {
  max-width: 70ch;
}

blockquote,
dl,
dd,
figure {
  margin: 0;
}

table {
  border-collapse: collapse;
}

/* Text Selection */
::selection {
  background-color: var(--color-orange);
  color: var(--color-white);
}

/* Focus Styles */
:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   3. ACCESSIBILITY
   ========================================================================== */

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 9999;
  padding: var(--space-3) var(--space-6);
  background: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
  outline: 2px solid var(--color-orange);
}

/* 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-width: 0;
}

/* Reduced Motion */
@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;
  }
}

/* ==========================================================================
   4. LAYOUT UTILITIES
   ========================================================================== */

.nm-container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.nm-container--wide {
  max-width: var(--container-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.nm-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.nm-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.nm-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

/* Standard Section */
.nm-section {
  padding: var(--space-24) 0;
}

.nm-section--dark {
  background-color: var(--color-black);
  color: var(--color-white);
}

.nm-section--gray {
  background-color: var(--color-gray-100);
}

/* ==========================================================================
   5. TYPOGRAPHY
   ========================================================================== */

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

/* Display Headline */
.nm-headline {
  font-family: var(--font-sans);
  font-size: clamp(3rem, 5.5vw, var(--text-4xl));
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.nm-headline--xl {
  font-size: clamp(3.5rem, 7vw, var(--text-5xl));
  line-height: 1.05;
}

.nm-headline--lg {
  font-size: clamp(2.5rem, 4.5vw, 3.5rem);
  line-height: 1.1;
}

.nm-headline--sm {
  font-size: clamp(1.75rem, 3vw, var(--text-2xl));
  line-height: 1.2;
}

/* Micro Label (IBM Plex Mono) */
.nm-micro-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gray-500);
  line-height: 1.4;
}

.nm-micro-label--orange { color: var(--color-orange); }
.nm-micro-label--white  { color: rgba(255, 255, 255, 0.5); }

/* Section Number (Outlined) */
.nm-section-number {
  font-family: var(--font-mono);
  font-size: clamp(6rem, 12vw, 10rem);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--color-gray-200);
  user-select: none;
  pointer-events: none;
}

/* Lead Text */
.nm-lead {
  font-size: clamp(var(--text-lg), 2vw, 1.25rem);
  line-height: 1.65;
  color: var(--color-gray-700);
  max-width: 580px;
}

/* Orange accent */
.nm-orange-dot,
.nm-orange {
  color: var(--color-orange);
}

/* Mono utility */
.nm-text-mono {
  font-family: var(--font-mono);
}

/* Inline code */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background-color: var(--color-gray-100);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--color-black);
}

/* Code block */
pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background-color: var(--color-black);
  color: rgba(255, 255, 255, 0.9);
  padding: var(--space-6);
  overflow-x: auto;
  line-height: 1.7;
  border-radius: 2px;
  tab-size: 2;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* ==========================================================================
   6. SPACING UTILITIES
   ========================================================================== */

.nm-mt-1  { margin-top: var(--space-1); }
.nm-mt-2  { margin-top: var(--space-2); }
.nm-mt-4  { margin-top: var(--space-4); }
.nm-mt-6  { margin-top: var(--space-6); }
.nm-mt-8  { margin-top: var(--space-8); }
.nm-mt-12 { margin-top: var(--space-12); }
.nm-mt-16 { margin-top: var(--space-16); }

.nm-mb-1  { margin-bottom: var(--space-1); }
.nm-mb-2  { margin-bottom: var(--space-2); }
.nm-mb-4  { margin-bottom: var(--space-4); }
.nm-mb-6  { margin-bottom: var(--space-6); }
.nm-mb-8  { margin-bottom: var(--space-8); }
.nm-mb-12 { margin-bottom: var(--space-12); }
.nm-mb-16 { margin-bottom: var(--space-16); }

/* ==========================================================================
   7. REVEAL ANIMATION
   ========================================================================== */

.nm-reveal {
  opacity: 0;
  transform: translateY(20px);
}

@media (prefers-reduced-motion: no-preference) {
  .nm-reveal {
    transition: opacity var(--transition-slow), transform var(--transition-slow);
  }
  .nm-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

.nm-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered group */
.nm-reveal-group > * {
  opacity: 0;
  transform: translateY(16px);
}

@media (prefers-reduced-motion: no-preference) {
  .nm-reveal-group > * {
    transition: opacity var(--transition-slow), transform var(--transition-slow);
  }
  .nm-reveal-group.is-visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0ms; }
  .nm-reveal-group.is-visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 80ms; }
  .nm-reveal-group.is-visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 160ms; }
  .nm-reveal-group.is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 240ms; }
  .nm-reveal-group.is-visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 320ms; }
}

.nm-reveal-group.is-visible > * {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   8. BUTTONS
   ========================================================================== */

.nm-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  border: 1.5px solid var(--color-black);
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-black);
  background-color: transparent;
  cursor: pointer;
  line-height: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .nm-btn {
    transition:
      background-color var(--transition-base),
      color var(--transition-base),
      border-color var(--transition-base);
  }
}

.nm-btn:hover {
  background-color: var(--color-black);
  color: var(--color-white);
}

.nm-btn:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 3px;
}

/* Ghost */
.nm-btn--ghost {
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.nm-btn--ghost:hover {
  background-color: transparent;
  color: var(--color-orange);
  text-decoration-color: var(--color-orange);
}

/* White (dark backgrounds) */
.nm-btn--white {
  border-color: var(--color-white);
  color: var(--color-white);
}

.nm-btn--white:hover {
  background-color: var(--color-white);
  color: var(--color-black);
}

/* Orange filled */
.nm-btn--orange {
  border-color: var(--color-orange);
  background-color: var(--color-orange);
  color: var(--color-white);
}

.nm-btn--orange:hover {
  background-color: transparent;
  color: var(--color-orange);
}

/* Small */
.nm-btn--sm {
  padding: 10px 20px;
  font-size: 11px;
}

/* ==========================================================================
   9. HEADER
   ========================================================================== */

.nm-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-gray-200);
}

@media (prefers-reduced-motion: no-preference) {
  .nm-header {
    transition:
      height var(--transition-base),
      box-shadow var(--transition-base),
      background-color var(--transition-base);
  }
}

.nm-header.is-scrolled {
  height: var(--header-height-scrolled);
  box-shadow: 0 1px 16px rgba(15, 15, 15, 0.08);
}

/* Inner */
.nm-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

/* Logo */
.nm-header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-black);
  flex-shrink: 0;
}

.nm-header__logo-mark {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nm-header__logo-text {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.nm-header__logo-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gray-500);
  display: block;
  margin-top: 2px;
}

/* Primary Nav */
.nm-header__nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nm-header__nav-link {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-black);
  position: relative;
  padding-bottom: 2px;
}

/* Underline animation */
.nm-header__nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1.5px;
  background-color: var(--color-orange);
  transform: scaleX(0);
  transform-origin: left center;
}

@media (prefers-reduced-motion: no-preference) {
  .nm-header__nav-link::after {
    transition: transform var(--transition-base);
  }
}

.nm-header__nav-link:hover { color: var(--color-orange); }

.nm-header__nav-link:hover::after,
.nm-header__nav-link.is-active::after,
.nm-header__nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nm-header__nav-link.is-active,
.nm-header__nav-link[aria-current="page"] {
  color: var(--color-black);
}

/* Language Switcher */
.nm-lang-switch {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.nm-lang-switch__item {
  color: var(--color-gray-500);
  text-decoration: none;
  padding: 2px 0;
}

.nm-lang-switch__item:hover,
.nm-lang-switch__item.is-active { color: var(--color-black); }

.nm-lang-switch__separator {
  color: var(--color-gray-300);
  font-size: 10px;
}

/* Controls wrapper */
.nm-header__controls {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-shrink: 0;
}

/* Hamburger */
.nm-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  flex-shrink: 0;
}

.nm-hamburger__line {
  display: block;
  height: 1.5px;
  background-color: var(--color-black);
  border-radius: 1px;
}

.nm-hamburger__line:nth-child(1) { width: 100%; }
.nm-hamburger__line:nth-child(2) { width: 70%; }
.nm-hamburger__line:nth-child(3) { width: 85%; }

@media (prefers-reduced-motion: no-preference) {
  .nm-hamburger__line {
    transition:
      transform var(--transition-base),
      opacity var(--transition-base),
      width var(--transition-base);
  }
}

.nm-hamburger.is-active .nm-hamburger__line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
  width: 100%;
}

.nm-hamburger.is-active .nm-hamburger__line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nm-hamburger.is-active .nm-hamburger__line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
  width: 100%;
}

/* ==========================================================================
   10. MOBILE NAVIGATION
   ========================================================================== */

.nm-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 999;
  background-color: var(--color-white);
  display: flex;
  flex-direction: column;
  padding: var(--space-8) var(--container-padding);
  transform: translateX(100%);
  visibility: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .nm-mobile-nav {
    transition:
      transform var(--transition-base),
      visibility var(--transition-base);
  }
}

.nm-mobile-nav.is-open {
  transform: translateX(0);
  visibility: visible;
}

.nm-mobile-nav__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-16);
}

.nm-mobile-nav__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 20px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--color-black);
}

.nm-mobile-nav__list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  list-style: none;
}

.nm-mobile-nav__link {
  display: block;
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--color-black);
  text-decoration: none;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-gray-200);
}

@media (prefers-reduced-motion: no-preference) {
  .nm-mobile-nav__link {
    transition: color var(--transition-fast);
  }
}

.nm-mobile-nav__link:hover { color: var(--color-orange); }

.nm-mobile-nav__footer {
  margin-top: auto;
  padding-top: var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nm-mobile-nav__lang {
  display: flex;
  gap: var(--space-4);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gray-500);
}

/* ==========================================================================
   11. HERO SECTION
   ========================================================================== */

.nm-hero {
  min-height: 90vh;
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: var(--space-16);
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 0;
  align-items: center;
  overflow: hidden;
}

/* Left Column */
.nm-hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: var(--space-16);
}

.nm-hero__label {
  margin-bottom: var(--space-6);
}

.nm-hero__headline {
  font-size: clamp(3rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.nm-hero__desc {
  font-size: 18px;
  color: var(--color-gray-700);
  line-height: 1.65;
  max-width: 520px;
  margin-top: var(--space-6);
}

.nm-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-top: var(--space-12);
}

/* Right Column / Visual */
.nm-hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 480px;
  align-self: stretch;
}

/* Dot-matrix background pattern */
.nm-hero__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--color-gray-300) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.6;
  z-index: 0;
}

.nm-hero__monogram {
  position: relative;
  z-index: 1;
  width: clamp(180px, 25vw, 260px);
  height: auto;
}

/* Vertical word list */
.nm-hero__wordlist {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.nm-hero__wordlist-item {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 2.4;
  color: var(--color-gray-500);
  white-space: nowrap;
}

.nm-hero__wordlist-item--active { color: var(--color-black); }

/* Orange dash below last word */
.nm-hero__wordlist-item:last-child::after {
  content: '';
  display: block;
  width: 16px;
  height: 2px;
  background-color: var(--color-orange);
  margin-top: 6px;
}

/* Status indicator */
.nm-hero__status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gray-500);
  margin-top: var(--space-12);
}

.nm-hero__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-orange);
  flex-shrink: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .nm-hero__status-dot {
    animation: pulse 2s ease-in-out infinite;
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

/* ==========================================================================
   12. EXPERTISE STRIP
   ========================================================================== */

.nm-expertise-strip {
  border-top: 1px solid var(--color-gray-200);
  border-bottom: 1px solid var(--color-gray-200);
  padding: 1.25rem 0;
  overflow: hidden;
}

.nm-expertise-strip__inner {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  white-space: nowrap;
}

.nm-expertise-strip__item {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gray-500);
  white-space: nowrap;
  flex-shrink: 0;
}

.nm-expertise-strip__sep {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-gray-300);
  flex-shrink: 0;
  user-select: none;
}

/* ==========================================================================
   13. PROJECTS SECTION
   ========================================================================== */

.nm-projects {
  padding: var(--space-24) 0;
}

.nm-projects__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-12);
  gap: var(--space-4);
}

.nm-projects__title-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.nm-projects__count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-gray-500);
}

.nm-projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

/* ==========================================================================
   14. PROJECT CARD
   ========================================================================== */

.nm-project-card {
  position: relative;
  background-color: var(--color-white);
  display: flex;
  flex-direction: column;
}

@media (prefers-reduced-motion: no-preference) {
  .nm-project-card {
    transition: transform var(--transition-base);
  }
}

/* Image */
.nm-project-card__image {
  aspect-ratio: 4 / 3;
  background-color: var(--color-gray-100);
  overflow: hidden;
  position: relative;
}

.nm-project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: no-preference) {
  .nm-project-card__image img {
    transition: transform var(--transition-slow);
  }
}

.nm-project-card:hover .nm-project-card__image img {
  transform: scale(1.03);
}

/* Placeholder grid pattern */
.nm-project-card__image--placeholder {
  background-color: var(--color-gray-100);
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 23px,
      var(--color-gray-200) 23px,
      var(--color-gray-200) 24px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 23px,
      var(--color-gray-200) 23px,
      var(--color-gray-200) 24px
    );
}

/* Body */
.nm-project-card__body {
  padding-top: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Meta */
.nm-project-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.nm-project-card__number {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-gray-500);
  letter-spacing: 0.08em;
}

.nm-project-card__category {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-orange);
}

/* Title */
.nm-project-card__title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: var(--space-2) 0;
  color: var(--color-black);
}

@media (prefers-reduced-motion: no-preference) {
  .nm-project-card__title {
    transition: color var(--transition-fast);
  }
}

.nm-project-card:hover .nm-project-card__title { color: var(--color-orange); }

/* Description */
.nm-project-card__desc {
  font-size: 15px;
  color: var(--color-gray-700);
  line-height: 1.6;
  max-width: none;
}

/* Tags */
.nm-project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.nm-project-card__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--color-gray-300);
  padding: 3px 8px;
  color: var(--color-gray-500);
  line-height: 1.4;
}

/* Arrow link */
.nm-project-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-black);
  text-decoration: none;
  margin-top: auto;
  padding-top: var(--space-4);
}

@media (prefers-reduced-motion: no-preference) {
  .nm-project-card__link {
    transition: color var(--transition-fast), gap var(--transition-fast);
  }
}

.nm-project-card__link:hover {
  color: var(--color-orange);
  gap: var(--space-3);
}

.nm-project-card__link-arrow {
  font-size: 14px;
  line-height: 1;
}

/* ==========================================================================
   15. MANIFESTO SECTION
   ========================================================================== */

.nm-manifesto {
  background-color: var(--color-black);
  color: var(--color-white);
  padding: var(--space-32) 0;
  overflow: hidden;
}

.nm-manifesto__grid {
  display: grid;
  grid-template-columns: 60fr 40fr;
  gap: var(--space-16);
  align-items: center;
}

.nm-manifesto__label {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--space-6);
}

/* Left orange leading line */
.nm-manifesto__label::before {
  content: '';
  display: block;
  width: 2px;
  height: 1em;
  background-color: var(--color-orange);
  flex-shrink: 0;
}

.nm-manifesto__headline {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-white);
}

.nm-manifesto__body {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin-top: var(--space-6);
  max-width: 480px;
}

.nm-manifesto__actions {
  margin-top: 2.5rem;
}

/* Right visual */
.nm-manifesto__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

/* Dot matrix */
.nm-manifesto__dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Single orange dot */
.nm-manifesto__dots::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-orange);
  box-shadow: 0 0 20px var(--color-orange);
}

/* Process list */
.nm-manifesto__process {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  list-style: none;
  text-align: right;
}

.nm-manifesto__process-item {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 2.6;
  color: rgba(255, 255, 255, 0.35);
}

.nm-manifesto__process-item--active { color: var(--color-orange); }

/* ==========================================================================
   16. SKILLS SECTION
   ========================================================================== */

.nm-skills {
  padding: var(--space-24) 0;
}

.nm-skills__header {
  margin-bottom: var(--space-12);
}

.nm-skills__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-8);
}

.nm-skill-area {
  border-top: 2px solid var(--color-black);
  padding-top: var(--space-6);
}

.nm-skill-area__icon {
  width: 24px;
  height: 24px;
  margin-bottom: var(--space-4);
  color: var(--color-black);
}

.nm-skill-area__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: var(--space-4);
  line-height: 1.3;
}

.nm-skill-area__list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.nm-skill-area__item {
  font-size: 14px;
  color: var(--color-gray-700);
  line-height: 2;
  border-bottom: 1px solid var(--color-gray-200);
}

.nm-skill-area__item:last-child { border-bottom: none; }

/* ==========================================================================
   17. PAGE HEADER / INNER PAGE HERO
   ========================================================================== */

.nm-page-header {
  padding: 8rem 0 4rem;
  border-bottom: 1px solid var(--color-gray-200);
  margin-top: var(--header-height);
}

.nm-page-header__label {
  margin-bottom: var(--space-4);
}

.nm-page-header__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.nm-page-header__desc {
  font-size: 18px;
  color: var(--color-gray-700);
  margin-top: var(--space-4);
  max-width: 560px;
  line-height: 1.65;
}

/* Dark inner hero */
.nm-page-hero {
  background-color: var(--color-black);
  color: var(--color-white);
  padding: 8rem 0 4rem;
  margin-top: var(--header-height);
}

.nm-page-hero__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-4);
}

.nm-page-hero__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--color-white);
}

/* Comfortable reading width */
.nm-content {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-12) var(--container-padding);
}

/* ==========================================================================
   18. ARTICLE / INSIGHTS
   ========================================================================== */

.nm-article {
  padding-top: var(--header-height);
}

.nm-article__header {
  padding: var(--space-12) 0 var(--space-8);
  border-bottom: 1px solid var(--color-gray-200);
}

.nm-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.nm-article__meta-item {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gray-500);
}

.nm-article__meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: var(--color-gray-300);
  flex-shrink: 0;
}

.nm-article__category {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-orange);
}

.nm-article__title {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 800px;
}

.nm-article__excerpt {
  font-size: 18px;
  color: var(--color-gray-700);
  line-height: 1.65;
  margin-top: var(--space-4);
  max-width: 640px;
}

/* Full-width hero image */
.nm-article__hero {
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background-color: var(--color-gray-100);
}

.nm-article__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Body — reading width */
.nm-article__body {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-12) var(--container-padding);
}

.nm-article__body > * + * { margin-top: var(--space-6); }

.nm-article__body h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-gray-200);
}

.nm-article__body h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.nm-article__body h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

.nm-article__body p {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--color-black);
}

.nm-article__body a {
  color: var(--color-black);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--color-gray-300);
}

.nm-article__body a:hover {
  color: var(--color-orange);
  text-decoration-color: var(--color-orange);
}

.nm-article__body ul,
.nm-article__body ol { padding-left: var(--space-6); }

.nm-article__body ul { list-style: disc; }
.nm-article__body ol { list-style: decimal; }

.nm-article__body li {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--color-black);
  margin-top: var(--space-2);
}

/* Blockquote */
.nm-article__body blockquote {
  border-left: 2px solid var(--color-orange);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-8) 0;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--color-gray-700);
  background-color: var(--color-gray-100);
}

.nm-article__body blockquote cite {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gray-500);
  margin-top: var(--space-3);
}

/* Inline code */
.nm-article__body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background-color: var(--color-gray-100);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

/* Code block */
.nm-article__body pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background-color: var(--color-black);
  color: rgba(255, 255, 255, 0.88);
  padding: var(--space-6);
  overflow-x: auto;
  line-height: 1.7;
  margin: var(--space-8) 0;
  border-radius: 2px;
}

.nm-article__body pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
  border-radius: 0;
}

/* Callout box */
.nm-callout {
  border-left: 2px solid var(--color-orange);
  padding: 1.25rem var(--space-6);
  background-color: var(--color-gray-100);
  margin: var(--space-8) 0;
}

.nm-callout__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-orange);
  margin-bottom: var(--space-2);
}

.nm-callout__text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-black);
  max-width: none;
}

.nm-article__footer {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-8) var(--container-padding) var(--space-16);
  border-top: 1px solid var(--color-gray-200);
}

/* ==========================================================================
   19. CONTACT FORM
   ========================================================================== */

.nm-contact-form {
  max-width: 640px;
}

.nm-form-group {
  margin-bottom: var(--space-8);
  position: relative;
}

.nm-form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gray-500);
  margin-bottom: var(--space-3);
}

.nm-form-input,
.nm-form-textarea {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--color-gray-300);
  padding: var(--space-3) 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-black);
  outline: none;
  line-height: 1.5;
}

@media (prefers-reduced-motion: no-preference) {
  .nm-form-input,
  .nm-form-textarea {
    transition: border-color var(--transition-base);
  }
}

.nm-form-input:focus,
.nm-form-textarea:focus { border-bottom-color: var(--color-black); }

.nm-form-input::placeholder,
.nm-form-textarea::placeholder { color: var(--color-gray-300); }

.nm-form-input.is-invalid,
.nm-form-textarea.is-invalid { border-bottom-color: var(--color-orange); }

.nm-form-error {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--color-orange);
  margin-top: var(--space-2);
  display: none;
}

.is-invalid + .nm-form-error,
.nm-form-group.has-error .nm-form-error { display: block; }

.nm-form-textarea {
  resize: vertical;
  min-height: 140px;
}

/* Custom checkbox */
.nm-form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
}

.nm-form-checkbox__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.nm-form-checkbox__box {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--color-gray-300);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (prefers-reduced-motion: no-preference) {
  .nm-form-checkbox__box {
    transition:
      border-color var(--transition-fast),
      background-color var(--transition-fast);
  }
}

.nm-form-checkbox__input:checked + .nm-form-checkbox__box {
  background-color: var(--color-black);
  border-color: var(--color-black);
}

.nm-form-checkbox__input:checked + .nm-form-checkbox__box::after {
  content: '\2713';
  font-size: 10px;
  color: var(--color-white);
  line-height: 1;
}

.nm-form-checkbox__input:focus-visible + .nm-form-checkbox__box {
  outline: 2px solid var(--color-orange);
  outline-offset: 2px;
}

.nm-form-checkbox__label {
  font-size: 14px;
  color: var(--color-gray-700);
  line-height: 1.5;
  max-width: none;
}

.nm-form-checkbox__label a {
  color: var(--color-black);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nm-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.nm-form-actions--full .nm-btn {
  width: 100%;
  justify-content: center;
}

/* ==========================================================================
   20. FOOTER
   ========================================================================== */

.nm-footer {
  background-color: var(--color-black);
  color: var(--color-white);
  padding: 4rem 0 2rem;
}

.nm-footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-8);
  padding-bottom: var(--space-8);
}

.nm-footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-white);
  flex-shrink: 0;
}

.nm-footer__logo-mark { width: 28px; height: 28px; }

.nm-footer__logo-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nm-footer__tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-top: var(--space-2);
}

.nm-footer__nav-cols {
  display: flex;
  gap: var(--space-16);
}

.nm-footer__nav-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: var(--space-4);
}

.nm-footer__nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.nm-footer__nav-link {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  line-height: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .nm-footer__nav-link {
    transition: color var(--transition-fast);
  }
}

.nm-footer__nav-link:hover { color: var(--color-white); }

.nm-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  gap: var(--space-4);
  flex-wrap: wrap;
}

.nm-footer__copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
}

.nm-footer__copy-dot {
  color: var(--color-orange);
  margin-right: 4px;
}

.nm-footer__legal {
  display: flex;
  gap: var(--space-6);
}

.nm-footer__legal-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
}

.nm-footer__legal-link:hover { color: rgba(255, 255, 255, 0.7); }

/* ==========================================================================
   21. 404 PAGE
   ========================================================================== */

.nm-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8) var(--container-padding);
}

.nm-404__number {
  font-size: clamp(8rem, 20vw, 16rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--color-gray-200);
  user-select: none;
  position: relative;
}

.nm-404__number::after {
  content: '.';
  color: var(--color-orange);
  -webkit-text-stroke: 0;
}

.nm-404__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gray-500);
  margin-bottom: var(--space-8);
}

.nm-404__title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: var(--space-4);
}

.nm-404__message {
  font-size: 16px;
  color: var(--color-gray-700);
  margin-top: var(--space-3);
  max-width: 480px;
}

.nm-404__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

/* ==========================================================================
   22. GENERIC CARD / DIVIDERS / BADGES
   ========================================================================== */

.nm-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  padding: var(--space-6);
}

.nm-card--dark {
  background: var(--color-gray-100);
  border-color: var(--color-gray-200);
}

.nm-divider {
  border: none;
  border-top: 1px solid var(--color-gray-200);
  margin: var(--space-8) 0;
}

.nm-divider--dark { border-top-color: rgba(255, 255, 255, 0.1); }

.nm-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--color-gray-300);
  padding: 3px 8px;
  color: var(--color-gray-700);
  line-height: 1.5;
}

.nm-badge--orange {
  border-color: var(--color-orange);
  color: var(--color-orange);
}

.nm-badge--dark {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
}

/* ==========================================================================
   23. SCROLL INDICATOR / MISC COMPONENTS
   ========================================================================== */

.nm-scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.nm-scroll-indicator__line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--color-black) 0%, transparent 100%);
}

@media (prefers-reduced-motion: no-preference) {
  .nm-scroll-indicator__line {
    animation: scrollLine 1.8s ease-in-out infinite;
  }
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

.nm-scroll-indicator__label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gray-500);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.nm-sep {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
}

.nm-sep::before,
.nm-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-gray-200);
}

.nm-sep__text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gray-500);
  white-space: nowrap;
}

/* ==========================================================================
   24. RESPONSIVE -- TABLET (768px-1199px)
   ========================================================================== */

@media (max-width: 1199px) {
  :root {
    --container-padding: 1.5rem;
  }

  /* Hide nav, show hamburger */
  .nm-header__nav { display: none; }
  .nm-hamburger    { display: flex; }

  /* Hero -- single column */
  .nm-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: calc(var(--header-height) + 3rem);
    padding-bottom: var(--space-16);
    gap: var(--space-12);
  }

  .nm-hero__content { padding-right: 0; }
  .nm-hero__visual  { min-height: 320px; order: -1; }

  .nm-hero__wordlist {
    position: static;
    transform: none;
    flex-direction: row;
    gap: var(--space-6);
  }

  /* Projects -- 2 cols */
  .nm-projects__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }

  /* Manifesto -- single column */
  .nm-manifesto__grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .nm-manifesto__body  { max-width: 600px; }
  .nm-manifesto__visual { min-height: 240px; }

  /* Skills -- 3 cols */
  .nm-skills__grid { grid-template-columns: repeat(3, 1fr); }

  .nm-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .nm-grid-4 { grid-template-columns: repeat(2, 1fr); }

  .nm-footer__top      { flex-wrap: wrap; gap: var(--space-12); }
  .nm-footer__nav-cols { gap: var(--space-8); }
}

/* ==========================================================================
   25. RESPONSIVE -- MOBILE (<768px)
   ========================================================================== */

@media (max-width: 767px) {
  :root {
    --container-padding: 1.25rem;
    --header-height: 60px;
    --header-height-scrolled: 52px;
  }

  /* Scale down headlines */
  .nm-headline      { font-size: clamp(2rem, 9vw, 2.75rem); }
  .nm-headline--xl  { font-size: clamp(2.25rem, 10vw, 3rem); }
  .nm-headline--lg  { font-size: clamp(2rem, 8vw, 2.5rem); }

  .nm-section    { padding: var(--space-16) 0; }
  .nm-manifesto  { padding: var(--space-16) 0; }

  /* Hero */
  .nm-hero {
    padding-top: calc(var(--header-height) + 2rem);
    padding-bottom: var(--space-12);
  }

  .nm-hero__headline { font-size: clamp(2.25rem, 10vw, 3rem); }
  .nm-hero__desc     { font-size: 16px; }

  .nm-hero__actions {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    margin-top: var(--space-8);
  }

  .nm-hero__visual  { min-height: 240px; }
  .nm-hero__wordlist { flex-wrap: wrap; gap: var(--space-4); }

  /* Expertise strip -- horizontal scroll */
  .nm-expertise-strip {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nm-expertise-strip::-webkit-scrollbar { display: none; }

  .nm-expertise-strip__inner {
    padding: 0 var(--container-padding);
    gap: var(--space-6);
  }

  /* Projects -- 1 column */
  .nm-projects__grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .nm-projects__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  /* Hide manifesto visual on mobile */
  .nm-manifesto__visual { display: none; }

  /* Skills -- 2 cols */
  .nm-skills__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }

  .nm-grid-2,
  .nm-grid-3,
  .nm-grid-4 { grid-template-columns: 1fr; }

  .nm-footer__top       { flex-direction: column; gap: var(--space-8); }
  .nm-footer__nav-cols  { flex-direction: column; gap: var(--space-6); }
  .nm-footer__bottom    { flex-direction: column; align-items: flex-start; gap: var(--space-4); }

  .nm-page-header { padding: 6rem 0 3rem; }

  .nm-article__title { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .nm-article__body  { padding: var(--space-8) var(--container-padding); }

  .nm-404__actions { flex-direction: column; }

  .nm-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .nm-form-actions .nm-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .nm-skills__grid   { grid-template-columns: 1fr; }
  .nm-hero__wordlist { display: none; }
  .nm-footer__legal  { flex-direction: column; gap: var(--space-3); }
}

/* ==========================================================================
   26. PRINT STYLES
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Hide non-essential elements */
  .nm-header__nav,
  .nm-hamburger,
  .nm-mobile-nav,
  .nm-footer,
  .nm-hero__actions,
  .nm-btn,
  .nm-scroll-indicator,
  .skip-link {
    display: none !important;
  }

  /* Header -- static, minimal */
  .nm-header {
    position: static;
    box-shadow: none;
    border-bottom: 1pt solid #ccc;
    height: auto;
    padding: 12pt 0;
    backdrop-filter: none;
    background: transparent !important;
  }

  .nm-header__inner { justify-content: flex-start; }

  body      { font-size: 11pt; line-height: 1.5; }
  h1        { font-size: 22pt; }
  h2        { font-size: 18pt; }
  h3        { font-size: 14pt; }
  .nm-headline { font-size: 24pt; }

  .nm-hero__visual,
  .nm-manifesto__visual { display: none; }

  .nm-hero,
  .nm-manifesto__grid { display: block; }

  .nm-article__body { max-width: 100%; padding: 0; }

  pre {
    white-space: pre-wrap;
    word-break: break-word;
    border: 1pt solid #ccc;
    background: #f5f5f5 !important;
    color: #000 !important;
  }

  h2, h3 { page-break-after: avoid; }

  p, blockquote { orphans: 3; widows: 3; }

  img { max-width: 100% !important; }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
  }

  a[href^="#"]::after,
  a[href^="javascript"]::after { content: ""; }
}
