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

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-hover: #1c1c1c;
  --border: #242424;
  --border-hover: #c9a84c;
  --text: #f0f0f0;
  --text-2: #b8b8b8;
  --text-muted: #777;
  --text-faint: #4a4a4a;
  --accent: #c9a84c;
  --radius: 14px;
  --radius-sm: 8px;

  --pad-page-y: 64px;
  --gap-section: 56px;
  --gap-row: 12px;
  --row-pad-y: 14px;
  --row-pad-x: 16px;
  --gallery-gap: 6px;
}

html, body { background: var(--bg); }

body {
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* Subtle ambient gold glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(201, 168, 76, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(201, 168, 76, 0.025) 0%, transparent 50%);
  z-index: 0;
}

/* ── Top nav ─────────────────────────────────────────── */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.topnav-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topnav-brand {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.topnav-brand:hover { color: var(--text); }

.topnav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.topnav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.1px;
  transition: color 0.2s;
  position: relative;
}
.topnav-link:hover { color: var(--accent); }
.topnav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}
.topnav-link:hover::after { transform: scaleX(1); }

/* ── Page layout ─────────────────────────────────────── */

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: var(--pad-page-y) 22px 80px;
  display: flex;
  flex-direction: column;
  gap: var(--gap-section);
}

/* ── Header ──────────────────────────────────────────── */

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--accent);
  color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 32px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.25), 0 0 60px -15px rgba(201, 168, 76, 0.45);
}

.name {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 30px;
  letter-spacing: -0.6px;
  line-height: 1.1;
}

.tagline {
  font-size: 13.5px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* ── Social circles ──────────────────────────────────── */

.social-circles {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.social-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.social-circle:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.social-circle svg { width: 17px; height: 17px; }

/* ── Section ─────────────────────────────────────────── */

.section { display: flex; flex-direction: column; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-meta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 1px;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* ── Affiliate row banners ───────────────────────────── */

.aff-stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap-row);
  width: 100%;
}

.aff-row {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: stretch;
  gap: 0;
  background-color: var(--surface);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
  isolation: isolate;
}

.aff-row:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.aff-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,10,10,0.92) 0%, rgba(10,10,10,0.78) 50%, rgba(10,10,10,0.55) 100%);
  z-index: 0;
  pointer-events: none;
  transition: background 0.25s ease;
}

.aff-row:hover .aff-overlay {
  background: linear-gradient(90deg, rgba(10,10,10,0.88) 0%, rgba(10,10,10,0.7) 50%, rgba(10,10,10,0.4) 100%);
}

.aff-row > .aff-thumb,
.aff-row > .aff-body,
.aff-row > .aff-cta { position: relative; z-index: 1; }

.aff-thumb {
  position: relative;
  background: rgba(0, 0, 0, 0.35);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.aff-thumb-mark {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.aff-thumb-stripes {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg,
    transparent 0px, transparent 6px,
    rgba(201, 168, 76, 0.04) 6px, rgba(201, 168, 76, 0.04) 7px);
  pointer-events: none;
}

.aff-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: var(--row-pad-y) var(--row-pad-x);
  min-width: 0;
}

.aff-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.1px;
  color: var(--text);
}

.aff-tag {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.aff-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s;
}

.aff-row:hover .aff-cta {
  color: var(--accent);
  transform: translateX(2px);
}

.aff-disclosure {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--text-faint);
  line-height: 1.5;
  letter-spacing: 0.1px;
  padding-left: 2px;
}

/* ── Gallery ─────────────────────────────────────────── */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gallery-gap);
}

.photo {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #141414;
  overflow: hidden;
  cursor: pointer;
  border-radius: 2px;
}

.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.photo:hover img { transform: scale(1.04); }
.photo.loaded img { opacity: 1; }
.photo.loaded:hover img { opacity: 0.9; }
.photo.loaded .photo-placeholder { display: none; }

.photo-placeholder {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(135deg,
      rgba(201, 168, 76, 0.06) 0px, rgba(201, 168, 76, 0.06) 1px,
      transparent 1px, transparent 8px),
    linear-gradient(135deg, #181818 0%, #111 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
}

.photo-placeholder-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9.5px;
  color: rgba(201, 168, 76, 0.55);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.3;
}

.photo-placeholder-meta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 8px;
  color: var(--text-faint);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.photo-hover {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 50%);
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  pointer-events: none;
}

.photo:hover .photo-hover { opacity: 1; }

.photo-loc {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  color: #fff;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
}

.photo-loc svg { width: 10px; height: 10px; color: var(--accent); }

/* ── Lightbox ────────────────────────────────────────── */

.lb {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.97);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}

.lb.active {
  display: flex;
  animation: lb-fade 0.2s ease;
}

@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }

.lb-stage {
  position: relative;
  width: 92vw;
  max-width: 1200px;
  height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);
}

.lb-placeholder {
  width: min(80vw, 800px);
  aspect-ratio: 3 / 2;
  background-image:
    repeating-linear-gradient(135deg,
      rgba(201, 168, 76, 0.08) 0px, rgba(201, 168, 76, 0.08) 1px,
      transparent 1px, transparent 10px),
    linear-gradient(135deg, #1a1a1a 0%, #0e0e0e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: 4px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);
}

.lb-placeholder-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: rgba(201, 168, 76, 0.65);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.lb-meta {
  position: absolute;
  bottom: -56px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.lb-meta-loc {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.lb-meta-loc svg { width: 12px; height: 12px; color: var(--accent); }

.lb-meta-counter { color: var(--text-faint); }

.lb-close, .lb-prev, .lb-next {
  position: fixed;
  color: #fff;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.2s, border-color 0.2s;
  z-index: 101;
}

.lb-close { top: 22px; right: 22px; font-size: 22px; line-height: 1; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }

.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: rgba(201, 168, 76, 0.15);
  border-color: var(--accent);
}

/* ── Footer ──────────────────────────────────────────── */

.footer {
  text-align: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding-top: 12px;
}

.footer .sep { color: #2a2a2a; margin: 0 10px; }

/* ── Operating Manual page ───────────────────────────── */

.page--manual {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 56px 22px 80px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 32px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--text); }

.manual-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
  margin-bottom: 40px;
}

.manual-header h1 {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.manual-header .tagline { font-size: 15px; }

.manual-intro {
  font-size: 15px;
  line-height: 1.8;
  color: #a0a0a0;
  border-left: 3px solid var(--accent);
  padding-left: 18px;
  margin-bottom: 40px;
}

.manual-body {
  display: flex;
  flex-direction: column;
  gap: 40px;
  line-height: 1.75;
}

.manual-section h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.manual-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-top: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}

.manual-section p,
.manual-section li { font-size: 15px; color: #b0b0b0; }

.manual-section ul,
.manual-section ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.manual-section ul ul,
.manual-section ol ul { margin-top: 4px; padding-left: 16px; gap: 3px; }

.manual-section li { padding-left: 2px; }

.manual-section-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.comm-list {
  list-style: none;
  padding-left: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comm-list > li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
}

.comm-channel {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}

.comm-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: #1f1f1f;
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
}

.comm-list ul { padding-left: 14px !important; gap: 3px; }

.quotes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

blockquote {
  font-size: 14px;
  font-style: italic;
  color: var(--text-muted);
  border-left: 2px solid var(--accent);
  padding-left: 14px;
  margin: 0;
  line-height: 1.6;
}

.manual-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.manual-body a { color: var(--accent); }
.manual-body a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 480px) {
  .page { padding: 36px 18px 60px; }
  .topnav-inner { padding: 12px 18px; }
  .topnav-links { gap: 12px; }
  .topnav-link { font-size: 12px; }
  .aff-row { grid-template-columns: 80px 1fr 48px; }
  .aff-thumb-mark { font-size: 18px; }
  .aff-cta { padding: 0 12px; }
  .name { font-size: 26px; }
  .gallery { gap: 3px; }
  .page--manual { padding: 36px 18px 60px; }
}
