/* ============================================
   MINUS — Design tokens & shared styles
   ============================================ */

:root {
  --graphite: #0A0A0C;
  --ivory: #ECEAE3;
  --ivory-soft: #EDEDE8;
  --blueprint: #1B3A6B;
  --redline: #5E1F1F;
  --paper: #F6F4EE;
  --ink: #111111;
  --muted: #8A8A85;

  --font-display: 'Minus', 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-body: 'SpaceGrotesk', 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --dur: 2.2s;
}

@font-face {
  font-family: 'Minus';
  src: url('minus.woff2') format('woff2'),
       url('minus.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'SpaceGrotesk';
  src: url('SpaceGrotesk-Regular.woff2') format('woff2'),
       url('SpaceGrotesk-Regular.woff') format('woff');
  font-display: swap;
}

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-display);
  overflow-x: hidden;
}

/* dark pages (start) vs light pages (about/project/contact) */
body.theme-graphite {
  background: var(--graphite);
  color: var(--ivory);
}
body.theme-paper {
  background: var(--paper);
  color: var(--ink);
}

/* blueprint-grid overlay removed per feedback — texture duplicated the monogram idea */


/* ---- links & focus ---- */
a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blueprint);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- bottom nav, shared across all pages ---- */
.bottom-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 18px 16px;
}

.theme-paper .bottom-wrapper { background: var(--paper); }
.theme-graphite .bottom-wrapper { background: var(--graphite); }

.bottom-menu {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(28px, 6vw, 200px);
  font-size: clamp(15px, 2vw, 22px);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.bottom-menu a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.25s ease-out, opacity 0.25s ease-out;
}

.theme-graphite .bottom-menu a { color: #8a8a85; }
.theme-graphite .bottom-menu a:hover,
.theme-graphite .bottom-menu a[aria-current="page"] { color: var(--ivory); }

.theme-paper .bottom-menu a:hover,
.theme-paper .bottom-menu a[aria-current="page"] { color: var(--redline); }

.logo-placeholder { width: 100px; height: 1px; }

.nav-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(60px, 8vw, 100px);
}
.theme-paper .nav-logo { filter: invert(1); }

/* ---- page title / monogram word, shared mechanics ---- */
.page-title {
  display: block;
  width: fit-content;
  margin: 0 auto;
  font-family: var(--font-display);
  font-weight: 700;
  text-align: center;
  text-transform: lowercase;
  font-size: clamp(24px, 3.6vw, 34px);
  line-height: 0.9;
}

/* redline flash — the instant a word is clicked */
.redline-flash {
  color: var(--redline) !important;
  text-shadow: 0 0 18px rgba(193, 66, 43, 0.55);
}

/* fixed word during page-load FLIP transition */
.transition-word {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: lowercase;
  white-space: nowrap;
  will-change: transform, color;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---- monogram grid (start.html) ---- */
.monogram {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 700px);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(17px, 2.6vw, 32px);
  line-height: 1.05;
  letter-spacing: 0;
  color: #6b6b73;
  user-select: none;
  z-index: 1;
}

.mono-row { white-space: pre-wrap; word-break: break-all; }

.mono-link {
  display: inline-block;
  color: var(--ivory);
  text-decoration: none;
  text-transform: lowercase;
  transition: color 0.25s ease-out, text-shadow 0.25s ease-out;
}
.mono-link:hover {
  color: var(--blueprint);
  text-shadow: 0 0 14px rgba(27, 58, 107, 0.65);
}

.char { display: inline-block; opacity: 1; }

.explode-char {
  opacity: 0;
  transform: translate(
      calc((var(--rx, 0.5) - 0.5) * 500px),
      calc((var(--ry, 0.5) - 0.5) * 500px)
    ) rotate(calc((var(--r, 0.5) - 0.5) * 200deg));
  transition: transform 2.2s var(--ease), opacity 2.2s var(--ease);
}

body.fade-to-paper {
  transition: background 2.2s var(--ease), color 2.2s var(--ease);
  background: var(--paper);
  color: var(--ink);
}

/* fixed image during page-load FLIP transition (project cards) */
.transition-image {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  object-fit: cover;
  border-radius: 3px;
  will-change: transform, width, height;
}

/* top logo, start.html */
.top-logo {
  position: absolute;
  top: clamp(40px, 8vh, 100px);
  left: 50%;
  transform: translateX(-50%);
  width: clamp(64px, 8vw, 100px);
  opacity: 0.9;
  z-index: 2;
  transition: opacity 0.6s ease-out;
}

/* ---- generic content sections (about / project detail) ---- */
.content-wrap {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(120px, 18vh, 200px) clamp(20px, 6vw, 48px) 160px;
  font-family: var(--font-body);
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blueprint);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  text-transform: lowercase;
  margin: 0 0 14px;
}

.body-text {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 14px;
  color: var(--ink);
}
.theme-graphite .body-text { color: var(--ivory-soft); }

.divider {
  border: none;
  border-top: 1px solid currentColor;
  opacity: 0.15;
  margin: 40px 0;
}
