/* ===== FONTS ===== */
@font-face {
  font-family: 'High Cruiser';
  src: url('assets/fonts/HighCruiser-PersonalUseOnly.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ===== VARIABLES ===== */
:root {
  --bg: #000000;
  --bg-alt: #060606;
  --fg: #ffffff;
  --muted: #ffffff;
  --line: rgba(242, 237, 230, 0.13);
  --accent: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.12);

  --font-display: 'Bricolage Grotesque', 'Archivo', Arial, sans-serif;
  --font-sans: 'Archivo', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad-x: clamp(24px, 6vw, 88px);
  --max-w: 1180px;

  /* A dark outline + glow behind text, instead of a flat tint over the
     whole section — the background can now show a solid white swirl
     directly behind any given word, and a blurred shadow alone doesn't
     keep white-on-white readable, but a tight outline does. */
  --text-shield: 0 0 14px rgba(0, 0, 0, 0.95), 0 0 5px rgba(0, 0, 0, 0.95),
    1px 1px 0 rgba(0, 0, 0, 0.9), -1px -1px 0 rgba(0, 0, 0, 0.9),
    1px -1px 0 rgba(0, 0, 0, 0.9), -1px 1px 0 rgba(0, 0, 0, 0.9);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-family: var(--font-display); font-style: normal; font-weight: 600; color: var(--accent); }
::selection { background: var(--accent); color: var(--bg); }

/* ===== PAGE BACKGROUND ===== */
.page-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  display: block;
  /* Was 0.6 — but that composites the canvas over the black page at 60%
     opacity, which mathematically caps white at (0.6,0.6,0.6): flat gray,
     no matter what the shader outputs. Needs to be fully opaque for a
     genuine black/white pattern instead of a muted overlay. */
  opacity: 1;
}

/* ===== GRAIN ===== */
.grain {
  position: fixed;
  inset: -200px;
  z-index: 300;
  pointer-events: none;
  background-image: url('assets/grain.png');
  background-size: 256px;
  opacity: 0.045;
  mix-blend-mode: overlay;
}

/* ===== REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== MONO LABEL ===== */
.mono-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--pad-x);
  background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 70%, rgba(0,0,0,0) 100%);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nav-links a { color: var(--muted); transition: color 0.25s var(--ease); position: relative; }
.nav-links a:hover { color: var(--accent); }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-burger span {
  width: 22px;
  height: 1px;
  background: var(--fg);
}
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transform: translateY(-100%);
  transition: transform 0.45s var(--ease);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a { font-family: var(--font-display); font-weight: 700; font-size: 2rem; }

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 0;
  height: 102vh;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: #ffffff;
}

/* This hero is the one white surface on an otherwise dark site — its small
   text elements need their own dark-on-white colors rather than the
   site-wide light-on-dark tokens (--muted, --line, --accent used elsewhere
   assume a dark background). */
.hero .mono-label {
  color: #c85a2b;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-name-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.hero-sand-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-noscript {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: clamp(2.6rem, 8vw, 7rem);
  color: #0a0a0a;
}

.hero-tag {
  position: relative;
  z-index: 2;
  margin-top: 2.1rem;
  padding: 0 var(--pad-x);
  max-width: 480px;
  text-align: center;
  color: #5a5650;
  font-size: 1.02rem;
  line-height: 1.65;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1100px, 100vw);
  height: min(1100px, 100vw);
  transform: translate(-50%, -55%);
  background: radial-gradient(circle, var(--accent-soft) 0%, rgba(255,255,255,0) 68%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
  animation: heroGlowDrift 14s ease-in-out infinite;
}
@keyframes heroGlowDrift {
  0%, 100% { transform: translate(-50%, -55%) scale(1); }
  50% { transform: translate(-46%, -50%) scale(1.08); }
}

.hero-floaters { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.floater {
  position: absolute;
  width: clamp(110px, 12vw, 168px);
  border: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 8px 8px 10px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.45);
  will-change: transform;
}
.floater img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.floater span {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.floater-1 { top: 6%; right: 6%; transform: rotate(6deg); }
.floater-2 { bottom: 10%; right: 16%; width: clamp(90px, 9vw, 132px); transform: rotate(-8deg); }
.floater-2 img { aspect-ratio: 3/4; }
.floater-3 { top: 44%; right: -1%; transform: rotate(-4deg); }

.hero-rule {
  position: relative;
  z-index: 2;
  width: 64px;
  height: 1px;
  background: rgba(10, 10, 10, 0.18);
  margin-top: 2rem;
}

.hero-body {
  position: relative;
  z-index: 2;
  margin-top: 1.6rem;
}

.hero-role {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  max-width: 560px;
}

.hero-sub {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 520px;
  margin-top: 1.1rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: filter 0.3s var(--ease);
}
.btn:hover { filter: brightness(0.88); }
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: transparent; }

/* ===== META RULE ===== */
.meta-rule {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.4rem var(--pad-x);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  text-shadow: var(--text-shield);
}
.meta-rule .dot { color: var(--accent); }

/* ===== SECTION HEAD ===== */
.section-head {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 6.5rem var(--pad-x) 2.8rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-top: 0.9rem;
  text-wrap: balance;
  text-shadow: var(--text-shield);
}
.section-head p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 480px;
  text-shadow: var(--text-shield);
}
.section-head .mono-label {
  text-shadow: var(--text-shield);
}

/* ===== WORK ROWS ===== */
.work { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.work-rows {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x) 6rem;
  display: flex;
  flex-direction: column;
  gap: 5.5rem;
}

.work-row {
  display: flex;
  align-items: center;
  gap: 4.5rem;
  text-decoration: none;
  color: inherit;
}
.work-row-reverse { flex-direction: row-reverse; }

.work-row-media {
  position: relative;
  flex: 0 0 auto;
  width: min(240px, 42vw);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.5));
  transition: filter 0.45s var(--ease);
}
.work-row:hover .work-row-media {
  filter: drop-shadow(0 30px 36px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 30px rgba(255, 255, 255, 0.1));
}
.work-row-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.45) brightness(0.92);
  transition: filter 0.4s var(--ease), transform 0.45s var(--ease);
  pointer-events: none;
  -webkit-user-drag: none;
}
.work-row:hover .work-row-media img {
  filter: grayscale(0) brightness(1);
  transform: scale(1.06);
}
.work-row-media-empty {
  border: 1px dashed var(--line);
  background: var(--bg-alt);
}

.work-row-info { flex: 1; }
.work-row-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  text-shadow: var(--text-shield);
}
.work-row-info h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin-top: 0.5rem;
  text-shadow: var(--text-shield);
}
.work-row-info p {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 0.7rem;
  max-width: 420px;
  text-shadow: var(--text-shield);
}
.work-row-tags { display: flex; gap: 0.4rem; margin-top: 1.1rem; flex-wrap: wrap; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-shadow: var(--text-shield);
  background: rgba(0, 0, 0, 0.55);
}

/* ===== BOOKS ===== */
.books { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.book-feature {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 4.5rem;
  align-items: center;
  padding: 1rem var(--pad-x) 7rem;
}

.book-cover-wrap { position: relative; display: flex; justify-content: center; }
.book-lips {
  position: absolute;
  top: -46px;
  left: -8px;
  width: 64px;
  opacity: 0.85;
  transform: rotate(-8deg);
  z-index: 2;
}
.book-frame {
  display: block;
  padding: 14px;
  border: 1px solid var(--line);
  position: relative;
}
.book-frame::before {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1px solid var(--accent);
  z-index: -1;
  opacity: 0.55;
}
.book-cover-img {
  width: min(300px, 75vw);
  display: block;
}

.book-tagline {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.3rem;
  color: var(--accent);
  text-shadow: var(--text-shield);
}
.book-copy h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  margin-top: 0.7rem;
  text-shadow: var(--text-shield);
}
.book-desc {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 540px;
  margin-top: 1.2rem;
  text-shadow: var(--text-shield);
}
.book-points {
  list-style: none;
  margin-top: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.book-points li {
  display: flex;
  gap: 0.9rem;
  font-size: 0.98rem;
  text-shadow: var(--text-shield);
}
.book-points li span {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
  padding-top: 0.15rem;
}
.book-actions { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }

/* ===== ABOUT ===== */
.about-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x) 7rem;
  max-width: 680px;
}
.about-lead {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1.3rem;
  text-shadow: var(--text-shield);
}
.about-inner p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.1rem;
  text-shadow: var(--text-shield);
}
.about-inner strong { color: var(--fg); font-weight: 600; }

/* ===== CONTACT ===== */
.contact { border-top: 1px solid var(--line); }
.contact-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x) 7rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-shadow: var(--text-shield);
}
.contact-form input,
.contact-form textarea {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  color: var(--fg);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--line);
  padding: 0.8rem 1rem;
  resize: vertical;
  transition: border-color 0.3s var(--ease);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-shadow: var(--text-shield);
}
.form-status[data-state="success"] { color: var(--accent); }
.form-status[data-state="error"] { color: #ff6b6b; }
.contact-more h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.3rem;
  text-shadow: var(--text-shield);
}
.contact-more p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.4rem;
  max-width: 280px;
  text-shadow: var(--text-shield);
}

/* ===== FOOTER ===== */
footer {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem var(--pad-x) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-shadow: var(--text-shield);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 1rem;
}
footer a:hover { color: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .hero { min-height: auto; padding-top: 8rem; }
  .floater-1, .floater-3 { display: none; }
  .floater-2 { top: 4%; right: 4%; bottom: auto; }
  .work-row, .work-row-reverse { flex-direction: column; align-items: stretch; gap: 1.8rem; }
  .work-row-media { width: 100%; }
  .book-feature { grid-template-columns: 1fr; gap: 3rem; }
  .book-cover-wrap { order: -1; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-form .form-row { grid-template-columns: 1fr; }
  .footer-mid { order: 3; width: 100%; }
}
