:root {
  --red: #D72B2B;
  --red-dim: #8B1A1A;
  --white: #F0EDE8;
  --off: #C8C4BC;
  --gray: #888480;
  --dark: #111010;
  --darker: #0A0909;
  --border: rgba(240,237,232,0.12);
  --border-strong: rgba(240,237,232,0.28);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--darker);
  color: var(--white);
  font-family: 'Barlow', sans-serif;
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* — NOISE OVERLAY — */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 1000;
}

/* — HEADER / LOGO — */
header {
  border-bottom: 1px solid var(--border-strong);
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  position: sticky;
  top: 0;
  background: var(--darker);
  z-index: 100;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logo-mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-diy {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}

.logo-brass {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 0.9;
}

nav {
  display: flex;
  gap: 2rem;
  flex: 1;
  justify-content: flex-end;
  align-items: center;
}

nav a {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
  text-decoration: none;
  transition: color 0.15s;
}

nav a:hover { color: var(--white); }

nav a.nav-manifesto {
  margin-left: auto;
  color: var(--red);
  border: 1px solid var(--red-dim);
  padding: 4px 12px;
}

nav a.nav-manifesto:hover {
  color: var(--white);
  border-color: var(--red);
  background: rgba(215,43,43,0.08);
}

/* — HERO — */
.hero {
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: 'DIY';
  position: absolute;
  right: -0.05em;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(7rem, 18vw, 14rem);
  color: transparent;
  -webkit-text-stroke: 1px rgba(215,43,43,0.35);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.05em;
}

.kicker {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.kicker::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--red);
  display: block;
}

h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(2.8rem, 8vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  max-width: 14ch;
}

h1 em {
  font-style: italic;
  color: var(--red);
}

.hero-sub {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: var(--off);
  max-width: 36ch;
  position: relative;
  z-index: 1;
  border-left: 3px solid var(--red);
  padding-left: 1.2rem;
  font-style: italic;
  align-self: flex-end;
  padding-bottom: 0.3rem;
}

.hero-sub-tag {
  font-family: 'Share Tech Mono', monospace;
  font-style: normal;
  font-size: 0.85em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}

.hero-body {
  display: flex;
  align-items: flex-end;
  gap: clamp(2rem, 5vw, 5rem);
  flex-wrap: wrap;
}

/* — MAIN CONTENT (manifesto.html) — */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 5vw, 4rem);
}

.section {
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.section-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 200px;
}

h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.5rem;
}

p {
  font-size: 1.05rem;
  color: var(--off);
  margin-bottom: 1.2rem;
  max-width: 68ch;
}

.callout {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  line-height: 1.15;
  color: var(--white);
  border-left: 4px solid var(--red);
  padding: 0.6rem 0 0.6rem 1.4rem;
  margin: 2rem 0;
  max-width: 60ch;
}

/* — GEAR TAGS — */
.gear-section {
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.gear-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.5rem;
}

.gear-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  color: var(--off);
  text-decoration: none;
  display: inline-block;
  transition: all 0.15s;
  position: relative;
}

.gear-tag::before {
  content: '↗';
  font-size: 9px;
  margin-right: 6px;
  color: var(--red);
  opacity: 0;
  transition: opacity 0.15s;
}

.gear-tag:hover {
  border-color: var(--red);
  color: var(--white);
  background: rgba(215,43,43,0.08);
}

.gear-tag:hover::before { opacity: 1; }

/* — DIVIDER — */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: clamp(2rem, 5vw, 4rem) 0;
}

.divider-red { border-color: var(--red-dim); }

/* — FINAL STATEMENT — */
.final {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--border-strong);
}

.final-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 2rem;
}

.final-text em {
  color: var(--red);
  font-style: italic;
}

.final-tagline {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
}

/* — FOOTER — */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem clamp(1.5rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-mono {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
}

/* — ANIMATIONS — */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-content > * {
  animation: fadeUp 0.7s ease both;
}

.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.15s; }
.hero-content > *:nth-child(3) { animation-delay: 0.28s; }

.scratch {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--red);
  margin-bottom: 2.5rem;
}

@media (max-width: 600px) {
  nav { display: none; }
  header { justify-content: flex-start; }
}

/* — MANIFESTO MODAL — */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 500;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-backdrop.open { display: block; }

body.modal-open { overflow: hidden; }

.modal {
  position: relative;
  background: var(--darker);
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--red);
  max-width: 780px;
  margin: 4rem auto;
  padding: clamp(2rem, 6vw, 4rem);
}

.modal-close-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
}

.modal-close-btn {
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--off);
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}

.modal-close-btn:hover {
  border-color: var(--red);
  color: var(--white);
  background: rgba(215,43,43,0.08);
}

.modal-close-btn .x {
  font-size: 18px;
  line-height: 1;
  color: var(--red);
  font-style: normal;
}

.modal-close-bottom {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.modal h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.modal p {
  font-size: 1.05rem;
  color: var(--off);
  margin-bottom: 1.2rem;
  max-width: 68ch;
}

.modal .callout {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  line-height: 1.15;
  color: var(--white);
  border-left: 4px solid var(--red);
  padding: 0.6rem 0 0.6rem 1.4rem;
  margin: 2rem 0;
}

.modal .section-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal .section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 200px;
}

.modal .divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.modal .final-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 2rem;
}

.modal .final-text em { color: var(--red); font-style: italic; }

.modal .scratch {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--red);
  margin-bottom: 2rem;
}

.modal .gear-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1.5rem 0;
}

.modal .gear-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  color: var(--off);
  text-decoration: none;
  display: inline-block;
  transition: all 0.15s;
}

.modal .gear-tag::before {
  content: '↗';
  font-size: 9px;
  margin-right: 6px;
  color: var(--red);
  opacity: 0;
  transition: opacity 0.15s;
}

.modal .gear-tag:hover {
  border-color: var(--red);
  color: var(--white);
  background: rgba(215,43,43,0.08);
}

.modal .gear-tag:hover::before { opacity: 1; }

@media (max-width: 600px) {
  .modal { margin: 0; border-left: none; border-right: none; min-height: 100vh; }
}

/* — PROJECT CARDS — */
.cards-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 5vw, 4rem);
}

.cards-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.2rem;
}

.cards-header h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
}

.cards-header .cards-count {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--gray);
  text-transform: uppercase;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5px;
}

.project-card {
  background: var(--darker);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
  text-decoration: none;
  color: inherit;
}

.project-card:hover { border-color: var(--border-strong); }

.project-card:hover .card-arrow {
  color: var(--red);
  transform: translate(3px, -3px);
}

.card-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: #111010;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image svg { width: 100%; height: 100%; }

.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}

.card-arrow {
  font-size: 18px;
  color: var(--gray);
  transition: all 0.2s;
  display: inline-block;
}

.card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--white);
}

.card-url {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gray);
}

.card-desc {
  font-size: 0.95rem;
  color: var(--off);
  line-height: 1.65;
  flex: 1;
}

.card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
  padding-top: 0.8rem;
}

.card-chip {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--border);
  color: var(--gray);
}

@media (max-width: 500px) {
  .cards-grid { grid-template-columns: 1fr; }
}
