/* =====================================================
   Marcos Garcia — Author Site
   Palette: ink #12151C · parchment #EFE6D3 · copper #B8703E
            gold #C9A227 · verdigris #5FB8A3
   ===================================================== */

:root {
  --ink: #12151c;
  --ink-light: #1c212b;
  --ink-line: rgba(239, 230, 211, 0.14);
  --parchment: #efe6d3;
  --parchment-dim: #e4d9c1;
  --paper-text: #2a2621;
  --paper-text-muted: #6b6152;
  --copper: #b8703e;
  --copper-bright: #d38a54;
  --gold: #c9a227;
  --verdigris: #5fb8a3;
  --ivory: #f5f0e4;
  --ivory-muted: rgba(245, 240, 228, 0.72);

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Literata", Georgia, serif;
  --font-mono: "Space Mono", "Courier New", monospace;

  --wrap: 1120px;
}

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

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--paper-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible {
  outline: 2px solid var(--verdigris);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 14px;
}
.eyebrow--light { color: var(--verdigris); }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 44px);
  color: var(--ivory);
  margin: 0 0 28px;
  letter-spacing: 0.01em;
}
.section-title--dark { color: var(--paper-text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-primary {
  background: var(--copper);
  color: var(--ivory);
}
.btn-primary:hover { background: var(--copper-bright); transform: translateY(-1px); }

.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--copper); color: var(--copper); }
.btn-ghost--light { border-color: var(--ivory-muted); color: var(--ivory); }
.btn-ghost--light:hover { border-color: var(--verdigris); color: var(--verdigris); }

.btn-placeholder {
  border: 1px dashed var(--copper);
  color: var(--copper);
  background: transparent;
}
.btn-placeholder:hover { border-style: solid; }

/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 21, 28, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--ink-line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mark { width: 32px; height: 32px; flex: none; }
.mark svg { width: 100%; height: 100%; }
.mark-leaf { stroke: var(--gold); fill: none; }
.mark-core { fill: var(--ink); stroke: var(--copper); stroke-width: 1.2; }
.mark-orbit { fill: none; stroke: var(--verdigris); stroke-width: 1; }
.mark-electron { fill: var(--verdigris); }

.brand-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  color: var(--ivory);
}

.primary-nav {
  display: flex;
  gap: 34px;
}
.primary-nav a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ivory-muted);
  position: relative;
  padding-bottom: 4px;
}
.primary-nav a:hover { color: var(--verdigris); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ivory);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  background: var(--ink);
  color: var(--ivory);
  padding: 90px 0 100px;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 5.4vw, 62px);
  line-height: 1.08;
  margin: 0 0 24px;
}
.hero-title em {
  font-style: italic;
  color: var(--copper-bright);
}
.hero-sub {
  color: var(--ivory-muted);
  font-size: 18px;
  max-width: 46ch;
  margin: 0 0 34px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-figure { position: relative; text-align: center; }

.specimen-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  animation: specimen-float 6s ease-in-out infinite;
}

.specimen-glow {
  position: absolute;
  inset: -30px;
  z-index: 0;
  background:
    radial-gradient(circle at 35% 30%, rgba(201, 162, 39, 0.35), transparent 55%),
    radial-gradient(circle at 65% 70%, rgba(95, 184, 163, 0.3), transparent 55%),
    radial-gradient(circle at 50% 50%, rgba(184, 112, 62, 0.25), transparent 65%);
  filter: blur(22px);
  animation: specimen-pulse 3.2s ease-in-out infinite;
}

.specimen-image {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 3px;
  box-shadow:
    0 0 0 1px rgba(201, 162, 39, 0.25),
    0 20px 60px rgba(0, 0, 0, 0.55);
}

@keyframes specimen-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes specimen-pulse {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  18% { opacity: 0.95; transform: scale(1.03); }
  32% { opacity: 0.6; transform: scale(0.98); }
  45% { opacity: 1; transform: scale(1.06); }
  58% { opacity: 0.7; transform: scale(1); }
  72% { opacity: 0.92; transform: scale(1.04); }
  85% { opacity: 0.65; transform: scale(0.99); }
}

.specimen-caption {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ivory-muted);
  margin-top: 10px;
}

/* =========================================================
   BOOK SECTION
   ========================================================= */
.book-section {
  background: var(--ink);
  color: var(--ivory);
  padding: 40px 0 110px;
  border-top: 1px solid var(--ink-line);
}
.book-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  align-items: start;
  margin-top: 20px;
}
.book-cover { text-align: center; }
.cover-frame {
  position: relative;
  padding: 18px;
  border: 1px solid var(--ink-line);
}
.corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--gold);
}
.corner-tl { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.corner-tr { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.corner-bl { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.corner-br { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.cover-svg { width: 100%; height: auto; }
.cover-image { width: 100%; height: auto; display: block; }
.cover-bg { fill: var(--ink-light); }
.cover-line { stroke: var(--gold); fill: none; }
.cover-bust { fill: none; stroke: var(--copper); stroke-width: 1.3; }
.cover-orbit { fill: none; stroke: var(--verdigris); stroke-width: 0.9; }
.cover-electron { fill: var(--verdigris); }
.cover-rule { stroke: var(--ink-line); stroke-width: 1; }
.cover-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  fill: var(--ivory-muted);
  text-anchor: middle;
}
.cover-label--small { font-size: 9px; fill: var(--copper-bright); }

.cover-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--verdigris);
  margin-top: 16px;
}

.book-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--copper-bright);
  margin: 0 0 10px;
}
.book-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.15;
  margin: 0 0 22px;
}
.book-desc {
  color: var(--ivory-muted);
  margin: 0 0 16px;
  max-width: 60ch;
}
.book-byline {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--gold);
  margin: 22px 0 26px;
}

/* =========================================================
   ABOUT
   ========================================================= */
.about-section {
  background: var(--parchment);
  padding: 100px 0;
}
.about-inner {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  align-items: center;
}
.photo-frame {
  border: 8px solid var(--ivory);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 14px 30px rgba(42,38,33,0.18);
  transform: rotate(-1.4deg);
}
.photo-frame img { width: 100%; aspect-ratio: 5/6; object-fit: cover; }
.about-text p { color: var(--paper-text); max-width: 58ch; }
.about-text p + p { margin-top: 16px; }

/* =========================================================
   FUTURE BOOKS
   ========================================================= */
.future-section {
  background: var(--ink);
  color: var(--ivory);
  padding: 110px 0;
  text-align: center;
  border-top: 1px solid var(--ink-line);
}
.future-inner { max-width: 620px; margin: 0 auto; }
.future-copy {
  color: var(--ivory-muted);
  font-size: 17px;
  margin: 0 0 34px;
}

/* =========================================================
   CONTACT / FOOTER
   ========================================================= */
.contact-section {
  background: var(--parchment-dim);
  padding: 100px 0 40px;
}
.contact-inner { text-align: center; }
.contact-block { max-width: 520px; margin: 0 auto; }
.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 24px;
  color: var(--copper);
  border-bottom: 1px solid var(--copper);
  padding-bottom: 3px;
  margin-bottom: 34px;
}
.contact-email:hover { color: var(--gold); border-color: var(--gold); }

.social-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 0 0 60px;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.social-list a {
  color: var(--paper-text);
  border-bottom: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.social-list a:hover { color: var(--copper); border-color: var(--copper); }

.social-icon {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: currentColor;
  fill: none;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--paper-text-muted);
  border-top: 1px solid rgba(42,38,33,0.12);
  padding-top: 24px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-figure { max-width: 260px; margin-top: 10px; }
  .book-card { grid-template-columns: 1fr; }
  .book-cover { max-width: 260px; }
  .about-inner { grid-template-columns: 1fr; }
  .photo-frame { max-width: 280px; }
}

@media (max-width: 720px) {
  .primary-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--ink-line);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .primary-nav.open { max-height: 320px; }
  .primary-nav a {
    padding: 18px 28px;
    border-top: 1px solid var(--ink-line);
  }
  .nav-toggle { display: flex; }
}

@media (max-width: 480px) {
  .hero { padding: 60px 0 70px; }
  .book-section, .about-section, .future-section, .contact-section { padding-top: 70px; padding-bottom: 70px; }
  .social-list { flex-direction: column; gap: 16px; }
}
