@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;700;800&family=DM+Mono:ital,wght@0,400;0,500;1,400&display=swap');

/* ── Tokens ── */
:root {
  --bg:        #0d0015;
  --purple:    #2a0040;
  --magenta:   #ff2d9b;
  --cyan:      #00f5ff;
  --lavender:  #c77dff;
  --soft-pink: #ffb3de;
  --text:      #e8d5ff;
  --dim:       #9b7bc0;
  --grid-line: rgba(199, 125, 255, 0.15);
}

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

html {
  font-size: 19px;
  background-color: var(--bg);
  color: var(--text);
  text-transform: lowercase;
  font-family: 'DM Mono', monospace;
}

/* ── Grid floor background ── */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    linear-gradient(180deg, #0d0015 0%, #1a0030 50%, #0d0015 100%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 100% 100%, 60px 60px, 60px 60px;
  background-position: 0 0, 0 0, 0 0;
}

/* ── Marquee ── */
.marquee-bar {
  background: linear-gradient(90deg, var(--purple), #1a0030, var(--purple));
  border-bottom: 1px solid var(--magenta);
  padding: 0.5rem 0;
  font-size: 0.75rem;
  color: var(--soft-pink);
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.05em;
}

.marquee-inner {
  display: inline-block;
  animation: marquee 35s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}

/* ── Nav ── */
nav {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 1.2rem 2rem;
  border-bottom: 1px solid var(--grid-line);
}

nav a {
  font-size: 0.85rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s;
}

nav a:hover, nav a.active {
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
}

/* ── Main ── */
main {
  flex: 1;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* ── Home ── */
.home-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
}

.home-photo-wrap {
  position: relative;
}

.home-photo {
  width: 100%;
  display: block;
  filter: drop-shadow(0 0 20px rgba(255, 45, 155, 0.5)) drop-shadow(0 0 50px rgba(0, 245, 255, 0.2));
}

.home-name {
  font-size: 3.8rem;
  font-weight: 400;
  font-family: 'Syne', sans-serif;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.2rem;
}

.home-subtitle {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin-bottom: 1.5rem;
}

.home-rule {
  border: none;
  border-top: 1px solid var(--magenta);
  margin-bottom: 1.5rem;
  opacity: 0.4;
}

.bio {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 2rem;
}

.book-link {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--cyan);
  text-decoration: none;
  border: 1px solid var(--cyan);
  padding: 0.5rem 1.2rem;
  transition: all 0.2s;
  display: inline-block;
}

.book-link:hover {
  background: var(--cyan);
  color: var(--bg);
  box-shadow: 0 0 20px var(--cyan);
}

/* ── Page viewer ── */
.viewer {
  position: sticky;
  top: 2rem;
}

.viewer-pages {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  border: 1px solid var(--magenta);
  box-shadow: 0 0 24px rgba(255, 45, 155, 0.2), 0 0 60px rgba(0, 245, 255, 0.08);
  filter: drop-shadow(0 0 20px rgba(255, 45, 155, 0.5)) drop-shadow(0 0 50px rgba(0, 245, 255, 0.2));
  overflow: hidden;
  background: #000;
}

.viewer-page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.viewer-page.active {
  opacity: 1;
}

.viewer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0 0;
}

.viewer-btn {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  color: var(--cyan);
  background: transparent;
  border: 1px solid var(--cyan);
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}

.viewer-btn:hover:not(:disabled) {
  background: var(--cyan);
  color: var(--bg);
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.4);
}

.viewer-btn:disabled {
  opacity: 0.2;
  cursor: default;
  border-color: var(--dim);
  color: var(--dim);
}

.viewer-counter {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--dim);
}

/* ── Book page ── */
.book-outer {
  text-align: center;
  margin-bottom: 2rem;
}

.book-outer .page-title {
  font-size: 2rem;
  font-family: 'Syne', sans-serif;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.2rem;
}

.book-outer .page-subtitle {
  font-size: 0.75rem;
  color: var(--dim);
  letter-spacing: 0.12em;
}

.book-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
}

.book-cover {
  width: 100%;
  border: 1px solid var(--magenta);
  box-shadow: 0 0 24px rgba(255, 45, 155, 0.3), 0 0 60px rgba(0, 245, 255, 0.1);
}

.book-info .book-title {
  font-size: 3.8rem;
  font-weight: 400;
  font-family: 'Syne', sans-serif;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.15rem;
}

.book-info .book-byline {
  font-size: 0.75rem;
  color: var(--dim);
  letter-spacing: 0.08em;
  margin-bottom: 1.2rem;
}

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--dim);
  padding: 0.45rem 0;
  margin-bottom: 1.4rem;
}

.buy-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.buy-link {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cyan);
  background: transparent;
  padding: 0.45rem 1.1rem;
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  text-transform: lowercase;
  border: 1px solid var(--cyan);
  transition: all 0.2s;
}

.buy-link:hover {
  background: var(--cyan);
  color: var(--bg);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
}

.buy-link.secondary {
  color: var(--cyan);
  border-color: var(--cyan);
  background: transparent;
}

.buy-link.secondary:hover {
  background: var(--cyan);
  color: var(--bg);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
}

hr {
  border: none;
  border-top: 1px solid var(--grid-line);
  margin: 1.8rem 0;
}

hr.rule-magenta {
  border-color: var(--magenta);
  opacity: 0.3;
}

.section-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--dim);
  margin-bottom: 1rem;
}

.reviews-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reviews-list li a {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.6;
  text-decoration: none;
  display: block;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--grid-line);
  transition: color 0.15s;
}

.reviews-list li a:hover { color: var(--soft-pink); }

.review-pub {
  display: block;
  font-size: 0.68rem;
  color: var(--dim);
  margin-top: 0.25rem;
  letter-spacing: 0.08em;
}

/* ── Contact page ── */

.contact-photo {
  width: 100%;
  display: block;
  margin-top: 1.5rem;
  filter: drop-shadow(0 0 20px rgba(255, 45, 155, 0.5)) drop-shadow(0 0 50px rgba(0, 245, 255, 0.2));
}

.contact-page-header {
  margin-bottom: 2rem;
}

.contact-right {
  display: flex;
  flex-direction: column;
}

.contact-instagram {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--dim);
  text-decoration: none;
  margin-top: 0.5rem;
  transition: color 0.15s;
}

.contact-instagram:hover {
  color: var(--soft-pink);
  text-shadow: 0 0 8px var(--soft-pink);
}

  max-width: 580px;
  margin: 0 auto;
  border: 1px solid var(--cyan);
  box-shadow: 0 0 30px rgba(0, 245, 255, 0.15), 0 0 80px rgba(0, 245, 255, 0.05);
  background: rgba(0, 10, 30, 0.7);
}

.terminal-bar {
  background: rgba(0, 245, 255, 0.08);
  border-bottom: 1px solid rgba(0, 245, 255, 0.2);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dim);
  opacity: 0.4;
}

.terminal-dot:first-child { background: var(--magenta); opacity: 0.7; }
.terminal-dot:nth-child(2) { background: var(--lavender); opacity: 0.7; }
.terminal-dot:nth-child(3) { background: var(--cyan); opacity: 0.7; }

.terminal-title {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--dim);
  margin-left: auto;
  margin-right: auto;
}

.terminal-body {
  padding: 1.8rem 2rem 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-title {
  font-size: 3.8rem;
  font-weight: 400;
  font-family: 'Syne', sans-serif;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.3rem;
}

label {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--cyan);
  text-transform: lowercase;
  font-family: 'DM Mono', monospace;
}

label::before {
  content: '> ';
  opacity: 0.5;
}

input, textarea {
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  background: rgba(0, 245, 255, 0.03);
  border: none;
  border-bottom: 1px solid rgba(0, 245, 255, 0.2);
  padding: 0.5rem 0;
  color: var(--text);
  outline: none;
  text-transform: lowercase;
  border-radius: 0;
  -webkit-appearance: none;
  transition: border-color 0.2s;
  width: 100%;
}

input:focus, textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 1px 0 0 rgba(0, 245, 255, 0.3);
}

textarea { resize: vertical; min-height: 120px; }

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.form-submit {
  font-family: 'Syne', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--cyan);
  background: transparent;
  border: 1px solid var(--cyan);
  padding: 0.5rem 1.3rem;
  cursor: pointer;
  text-transform: lowercase;
  transition: all 0.2s;
}

.form-submit:hover {
  background: var(--cyan);
  color: var(--bg);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
}

.contact-social {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
}

.contact-social a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.15s;
}

.contact-social a:hover {
  color: var(--soft-pink);
  text-shadow: 0 0 8px var(--soft-pink);
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 100;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-height: 90vh;
  max-width: calc(100vw - 160px);
  object-fit: contain;
  box-shadow: 0 0 40px rgba(255, 45, 155, 0.3), 0 0 100px rgba(0, 245, 255, 0.1);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  color: var(--dim);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  transition: color 0.15s;
}

.lightbox-close:hover { color: var(--soft-pink); }

.lightbox-btn {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  color: var(--cyan);
  background: transparent;
  border: 1px solid var(--cyan);
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.lightbox-btn:hover:not(:disabled) {
  background: var(--cyan);
  color: var(--bg);
  box-shadow: 0 0 16px rgba(0, 245, 255, 0.4);
}

.lightbox-btn:disabled {
  opacity: 0.2;
  cursor: default;
  border-color: var(--dim);
  color: var(--dim);
}

.viewer-pages {
  cursor: zoom-in;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--grid-line);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--dim);
  position: relative;
  z-index: 1;
}

/* ── Responsive ── */
@media (max-width: 620px) {
  .home-grid, .book-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .home-name { font-size: 2.2rem; }
  nav { gap: 1.5rem; }
}
