/* The Lost Manuscript of von Neumann: vn.yboger.com
   Palette and type follow the book cover: ink-dark ground, lamp gold, parchment. */

:root {
  --ink: #0f1116;
  --ink-2: #161922;
  --ink-3: #1e222d;
  --gold: #d6ad62;
  --gold-soft: #e8c98d;
  --parchment: #efe3c8;
  --parchment-2: #e4d4b0;
  --text: #e9e1d0;
  --muted: #a99f8c;
  --rule: rgba(214, 173, 98, 0.35);
  --display: "Merriweather", Georgia, serif;
  --body: "EB Garamond", Garamond, "Times New Roman", serif;
  --max: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.22rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-soft); text-underline-offset: 3px; }
a:hover { color: var(--gold); }

.wrap { width: min(var(--max), 100% - 3rem); margin-inline: auto; }

.eyebrow {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 900;
  line-height: 1.12;
  color: var(--gold);
  margin: 0 0 0.6em;
}

h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.3rem; font-weight: 700; }

.rule { width: 9rem; height: 1px; background: var(--gold); border: 0; margin: 1.6rem 0; opacity: 0.8; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.6rem;
  border-radius: 2px;
  border: 1px solid var(--gold);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.btn-gold { background: var(--gold); color: #1a1408; }
.btn-gold:hover { background: var(--gold-soft); color: #1a1408; transform: translateY(-1px); }
.btn-ghost { color: var(--gold-soft); background: transparent; }
.btn-ghost:hover { background: rgba(214, 173, 98, 0.12); color: var(--gold-soft); }
.btn svg { width: 1.05em; height: 1.05em; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 17, 22, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(214, 173, 98, 0.18);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.4rem;
}

.brand {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.02rem;
  color: var(--gold);
  text-decoration: none;
  line-height: 1.15;
}
.brand small {
  display: block;
  font-family: var(--body);
  font-style: italic;
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--muted);
}

.nav { display: flex; align-items: center; gap: 2rem; margin-left: auto; }

/* Language switch: always visible, beside the nav (or the Menu button on phones) */
.lang {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.15rem;
}
.lang a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.55rem;
  border-radius: 1px;
}
.lang a:hover { color: var(--gold); }
.lang a[aria-current="true"] { background: rgba(214, 173, 98, 0.16); color: var(--gold); }
.nav a {
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--gold); }
.nav .btn { padding: 0.65rem 1.1rem; font-size: 0.74rem; color: #1a1408; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  color: var(--gold);
  padding: 0.5rem 0.7rem;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .lang { margin-left: auto; }
  .nav {
    display: none;
    position: absolute;
    top: 4.4rem;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.6rem;
    background: var(--ink-2);
    border-bottom: 1px solid var(--rule);
  }
  .nav.open { display: flex; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(4rem, 8vw, 7rem);
  background:
    linear-gradient(90deg, rgba(15, 17, 22, 0.97) 0%, rgba(15, 17, 22, 0.86) 42%, rgba(15, 17, 22, 0.55) 100%),
    linear-gradient(0deg, var(--ink) 0%, rgba(15, 17, 22, 0) 30%),
    url("assets/hero-street.jpg") center 70% / cover no-repeat;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); margin-bottom: 0.25em; }
.hero .subtitle {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.05rem, 1.9vw, 1.4rem);
  color: var(--parchment);
  margin: 0;
}
.hero .byline { font-family: var(--display); font-weight: 700; color: var(--gold-soft); margin: 0; font-size: 1.05rem; }
.hero .hook {
  font-size: clamp(1.25rem, 1.9vw, 1.45rem);
  max-width: 34rem;
  margin: 1.8rem 0 2.2rem;
  color: var(--parchment);
}
.hero .actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.book-3d {
  justify-self: center;
  width: min(380px, 100%);
  transform: perspective(1400px) rotateY(-12deg) rotateX(2deg);
  transition: transform 0.6s ease;
  box-shadow:
    -1px 0 0 rgba(255, 255, 255, 0.08),
    28px 30px 60px rgba(0, 0, 0, 0.7),
    0 0 90px rgba(214, 173, 98, 0.16);
  border-radius: 2px 6px 6px 2px;
  position: relative;
}
.book-3d::before {
  /* spine highlight */
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 14px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0.25) 60%, transparent);
  z-index: 1;
}
.book-3d:hover { transform: perspective(1400px) rotateY(-4deg) rotateX(0deg); }
.book-3d img { border-radius: inherit; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .book-3d { order: -1; width: min(280px, 72%); }
}

/* ---------- Sections ---------- */

section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section-alt { background: var(--ink-2); }

.lede { font-size: 1.35rem; color: var(--parchment); max-width: 46rem; }

/* Story: two dated dossier entries */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); margin-top: 2.5rem; }
.dateline {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  margin: 0 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.dateline::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.story p { margin: 0 0 1rem; }
.greek { font-style: italic; color: var(--gold-soft); white-space: nowrap; }

.pursuit { max-width: 48rem; margin: 3rem auto 0; text-align: center; font-size: 1.3rem; }
.pursuit strong { font-family: var(--display); font-size: 1.05rem; color: var(--parchment); }

blockquote.thesis {
  margin: 3.5rem auto 0;
  max-width: 50rem;
  text-align: center;
  font-style: italic;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  line-height: 1.35;
  color: var(--gold-soft);
  position: relative;
  padding: 2.2rem 1rem 0;
  border-top: 1px solid var(--rule);
}
blockquote.thesis::before {
  content: "δύναμις";
  position: absolute;
  top: -0.85rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  padding: 0 1rem;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--gold);
}

/* Tribunal: dossier portrait cards */
.tribunal {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
  margin-top: 2.5rem;
}
.card {
  background: var(--parchment);
  color: #2a2117;
  padding: 0.7rem 0.7rem 1.1rem;
  border-radius: 2px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.3s ease;
}
.card:nth-child(1) { --tilt: -1.2deg; }
.card:nth-child(2) { --tilt: 0.8deg; }
.card:nth-child(3) { --tilt: -0.5deg; }
.card:nth-child(4) { --tilt: 1.1deg; }
.card:nth-child(5) { --tilt: -0.9deg; }
.card:hover { transform: rotate(0) translateY(-4px); }
.card img { aspect-ratio: 1; object-fit: cover; filter: sepia(0.15); }
.card h3 { color: #2a2117; font-size: 1rem; margin: 0.8rem 0 0.25rem; }
.card p { margin: 0; font-size: 1rem; line-height: 1.35; color: #4a3d2d; }
.card .role {
  font-family: var(--display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a5a22;
}

@media (max-width: 960px) { .tribunal { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .tribunal { grid-template-columns: repeat(2, 1fr); } .story { grid-template-columns: 1fr; } }

/* Look inside */
.pages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.3rem;
  margin-top: 2.5rem;
}
.pages button {
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pages button:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--gold); }
.pages figcaption { font-size: 0.98rem; color: var(--muted); margin-top: 0.7rem; font-style: italic; }
@media (max-width: 860px) { .pages { grid-template-columns: repeat(2, 1fr); } }

dialog.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 94vw;
  max-height: 94vh;
}
dialog.lightbox::backdrop { background: rgba(5, 6, 9, 0.92); }
dialog.lightbox img { max-height: 90vh; width: auto; margin: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8); }
dialog.lightbox .close {
  position: fixed;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: 1px solid var(--rule);
  color: var(--gold);
  font-size: 1.6rem;
  width: 2.8rem;
  height: 2.8rem;
  cursor: pointer;
}

/* Authors' note + details */
.note-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.note-grid p { margin: 0 0 1.1rem; }
.details {
  border: 1px solid var(--rule);
  padding: 1.8rem 2rem;
  background: rgba(214, 173, 98, 0.04);
}
.details dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1.4rem; font-size: 1.08rem; }
.details dt {
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  padding-top: 0.3rem;
}
.details dd { margin: 0; }
.details .btn { margin-top: 1.6rem; width: 100%; justify-content: center; }
@media (max-width: 860px) { .note-grid { grid-template-columns: 1fr; } }

/* CTA band */
.cta {
  text-align: center;
  background:
    linear-gradient(rgba(15, 17, 22, 0.82), rgba(15, 17, 22, 0.92)),
    url("assets/desk-lamp.jpg") center / cover no-repeat;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.cta p { max-width: 36rem; margin: 0 auto 2rem; color: var(--parchment); }

/* ---------- Page header (inner pages) ---------- */

.page-head {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem);
  background:
    linear-gradient(180deg, rgba(15, 17, 22, 0.7), var(--ink)),
    url("assets/hero-street.jpg") center 60% / cover no-repeat;
}
.page-head h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.page-head p { max-width: 40rem; color: var(--parchment); margin: 0; }

/* ---------- Authors ---------- */

.author {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  border-bottom: 1px solid rgba(214, 173, 98, 0.15);
}
.author:last-of-type { border-bottom: 0; }
.author .portrait {
  background: var(--parchment);
  padding: 0.7rem 0.7rem 2.6rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  transform: rotate(-1.2deg);
  position: relative;
}
.author:nth-of-type(even) .portrait { transform: rotate(1deg); }
.author .portrait figcaption {
  position: absolute;
  bottom: 0.7rem;
  left: 0;
  right: 0;
  text-align: center;
  font-style: italic;
  font-size: 0.95rem;
  color: #5a4a36;
}
.author h2 { margin-bottom: 0.2em; }
.author .title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--parchment);
  margin: 0 0 1.4rem;
}
.author p { margin: 0 0 1.1rem; }
.links { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.links .btn { padding: 0.7rem 1.1rem; font-size: 0.74rem; }
@media (max-width: 760px) {
  .author { grid-template-columns: 1fr; }
  .author .portrait { width: min(280px, 80%); }
}

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact-grid ul { list-style: none; padding: 0; margin: 1.5rem 0 2rem; }
.contact-grid li { padding: 0.75rem 0; border-bottom: 1px solid rgba(214, 173, 98, 0.15); }
.contact-grid li strong { font-family: var(--display); font-size: 0.95rem; color: var(--parchment); display: block; }
.contact-grid li span { color: var(--muted); font-size: 1.08rem; }

form.letter {
  background: var(--parchment);
  color: #2a2117;
  padding: clamp(1.6rem, 4vw, 2.6rem);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
  border-radius: 2px;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.35), transparent 40%),
    radial-gradient(circle at 90% 95%, rgba(120, 85, 40, 0.12), transparent 45%);
}
form.letter h2 { color: #2a2117; font-size: 1.6rem; }
form.letter label {
  display: block;
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7a5426;
  margin: 1.2rem 0 0.4rem;
}
form.letter input,
form.letter select,
form.letter textarea {
  width: 100%;
  font: inherit;
  font-size: 1.15rem;
  color: #2a2117;
  background: rgba(255, 255, 255, 0.45);
  border: 0;
  border-bottom: 1px solid #9c8058;
  padding: 0.55rem 0.2rem;
  border-radius: 0;
}
form.letter textarea { min-height: 9rem; resize: vertical; border: 1px solid #b59b72; padding: 0.7rem; }
form.letter input:focus,
form.letter select:focus,
form.letter textarea:focus { outline: 2px solid var(--gold); outline-offset: 2px; }
form.letter .btn { margin-top: 1.8rem; border-color: #2a2117; background: #2a2117; color: var(--parchment); }
form.letter .btn:hover { background: #3a2f22; }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 1rem 0 0; font-style: italic; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid rgba(214, 173, 98, 0.18);
  padding: 2.6rem 0;
  font-size: 1rem;
  color: var(--muted);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.2rem; align-items: center; }
.site-footer nav { display: flex; gap: 1.6rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
