@font-face {
  font-family: 'Helvetica Monospaced W06';
  src: url('fonts/HelveticaMonospacedW06Rg.ttf') format('truetype');
  font-weight: 100 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica Monospaced W06';
  src: url('fonts/HelveticaMonospacedW06Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --text-muted: #9d9d9d;
  --text-dark: rgba(0,0,0,0.85);
  --bg: #ffffff;
  --font-mono: 'Helvetica Monospaced W06', 'Courier New', monospace;
  --font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html { height: 100%; font-size: clamp(12px, 1vw, 18px); }
body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text-dark);
  font-family: var(--font-sans);
  line-height: 1.3;
  opacity: 0;
  animation: fadein 0.15s ease forwards;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@keyframes fadein { to { opacity: 1; } }

a { text-decoration: none; color: inherit; transition: color 0.2s; }

/* ── Header ── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 100;
}

header a {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
}

header a:hover { color: var(--text-muted); }
header a.active, footer a.active { color: var(--text-muted); }

/* ── Footer ── */
footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 100;
}

footer a {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
}

footer a:hover { color: var(--text-muted); }

/* ── Project text ── */
.text-shell { padding: 0 3rem; }

.project-text {
  width: 65%;
  margin: 0 auto;
  padding: 9rem 0 2.5rem;
}

.project-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.project-body {
  font-family: var(--font-mono);
  font-weight: 100;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.project-body p { margin-bottom: 1rem; }
.project-body p:last-child { margin-bottom: 0; }

.project-body a { color: var(--text-muted); text-decoration: underline; }
.project-body a:hover { color: var(--text-dark); }

/* ── Gallery page main wrapper ── */
main {
  padding-top: 8rem;
  padding-bottom: 8rem;
}

/* ── Gallery ── */
.gallery {
  padding: 0 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.gallery-row {
  display: contents;
}

.gallery-row img {
  display: block;
  width: 45vw;
  height: auto;
}

/* ── Project nav ── */
.project-nav {
  width: 65%;
  margin: 0 auto;
  padding: 1.5rem 0 8rem;
  font-family: var(--font-mono);
  font-weight: 100;
  font-size: 1rem;
  text-align: center;
  color: var(--text-muted);
}

.project-nav a { color: var(--text-muted); }
.project-nav a:hover { color: var(--text-dark); }

/* ── Mobile ── */
@media (max-width: 640px) {
  header, footer { padding: 1.5rem; }
  .text-shell { padding: 0 1.5rem; }
  .project-text { width: 100%; padding: 6rem 0 2rem; }
  .gallery { padding: 0 1.5rem; }
  .gallery-row { flex-direction: column; }
  .gallery-row img { width: 100%; }
  .project-nav { width: 100%; padding: 1.5rem 0 6rem; }
}
