/* Andy Sly site. Colors from The First Wizard title screen. */
:root {
  --bg: #090f18;
  --bg-2: #101c26;
  --bg-3: #15232e;
  --text: #e6edf5;
  --text-dim: #b7c3d0;
  --gold: #f0cf8a;
  --gold-deep: #e4c070;
  --teal: #70b8b0;
  --teal-deep: #1b353f;
  --line: rgba(240, 207, 138, 0.22);
  --line-strong: rgba(240, 207, 138, 0.45);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --max: 1120px;
  --sans: "Alegreya Sans", "Segoe UI", "Helvetica Neue", sans-serif;
  --display: "Alegreya SC", "Palatino Linotype", Palatino, serif;
}

@font-face {
  font-family: "Alegreya SC";
  src: url("../fonts/alegreya-sc-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya SC";
  src: url("../fonts/alegreya-sc-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("../fonts/alegreya-sans-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("../fonts/alegreya-sans-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("../fonts/alegreya-sans-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("../fonts/alegreya-sans-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: #fff4d4; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--gold);
  color: #1a1408;
  padding: 0.5rem 0.8rem;
  z-index: 100;
  border-radius: 6px;
  font-weight: 700;
}
.skip:focus { top: 0.6rem; }

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

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(9, 15, 24, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.6rem;
}

.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-decoration: none;
}
.logo:hover { color: #fff4d4; }

.nav-toggle {
  display: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 4.5rem 0 5rem;
  min-height: min(78vh, 44rem);
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 80% 20%, rgba(80, 40, 120, 0.35), transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 90%, rgba(20, 70, 80, 0.3), transparent 60%),
    var(--bg);
}
.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 0.42;
  pointer-events: none;
}

.stars,
.stars-2 {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-repeat: repeat;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 28% 72%, #dce7ff, transparent),
    radial-gradient(1.5px 1.5px at 46% 30%, #fff, transparent),
    radial-gradient(1px 1px at 63% 58%, #ffe9b8, transparent),
    radial-gradient(1px 1px at 81% 22%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 91% 80%, #fff, transparent),
    radial-gradient(1px 1px at 7% 48%, #ffe9b8, transparent),
    radial-gradient(1px 1px at 34% 8%, #fff, transparent),
    radial-gradient(1px 1px at 54% 88%, #dce7ff, transparent),
    radial-gradient(1.6px 1.6px at 72% 40%, #fff, transparent);
  opacity: 0.85;
}
.stars-2 {
  background-image:
    radial-gradient(1px 1px at 16% 40%, #fff, transparent),
    radial-gradient(1px 1px at 38% 14%, #ffe9b8, transparent),
    radial-gradient(1px 1px at 58% 66%, #fff, transparent),
    radial-gradient(1px 1px at 77% 12%, #dce7ff, transparent),
    radial-gradient(1px 1px at 88% 54%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 22% 86%, #fff, transparent);
  opacity: 0.55;
  animation: drift 80s linear infinite;
}

@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-40px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stars-2 { animation: none; }
}

.hero-inner { max-width: 40rem; }

.eyebrow {
  font-family: var(--display);
  color: var(--teal);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 0 0 0.8rem;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 5.4rem);
  line-height: 0.95;
  color: var(--gold);
  margin: 0 0 0.85rem;
  letter-spacing: 0.04em;
  text-shadow: 0 0 40px rgba(240, 207, 138, 0.15);
}

.hero .role {
  font-size: 1.28rem;
  color: var(--text);
  margin: 0 0 1rem;
  font-weight: 500;
}

.hero .lede {
  color: var(--text-dim);
  margin: 0 0 1.8rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.72rem 1.25rem;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold {
  background: var(--gold);
  color: #1a1408;
  font-weight: 700;
}
.btn-gold:hover { background: #fff0c4; color: #1a1408; }
.btn-teal {
  background: var(--teal-deep);
  color: var(--gold);
  border-color: rgba(112, 184, 176, 0.45);
}
.btn-teal:hover { background: #234650; color: #fff4d4; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn[href^="mailto:"] {
  font-family: var(--sans);
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 700;
}

/* Sections */
section.block {
  padding: 4.25rem 0;
}
section.block:nth-of-type(even) {
  background:
    linear-gradient(180deg, rgba(16, 28, 38, 0) 0%, rgba(16, 28, 38, 0.85) 8%, rgba(16, 28, 38, 0.85) 92%, rgba(16, 28, 38, 0) 100%);
}

.section-kicker {
  font-family: var(--display);
  color: var(--teal);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0 0 0.55rem;
}

h2 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--gold);
  font-size: clamp(1.8rem, 3.4vw, 2.55rem);
  letter-spacing: 0.05em;
  line-height: 1.15;
  margin: 0 0 0.8rem;
}

h3 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--gold);
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  margin: 1.4rem 0 0.45rem;
}

.lead {
  color: var(--text-dim);
  font-size: 1.2rem;
  margin: 0 0 1.4rem;
  max-width: 42rem;
}

.prose p { margin: 0 0 1rem; color: var(--text-dim); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 700; }

/* Game */
.game-layout {
  display: grid;
  gap: 1.6rem;
}

.banner-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.banner-link img {
  width: 100%;
  aspect-ratio: 1920 / 400;
  object-fit: cover;
}

.game-copy .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.3rem;
}

.note {
  font-size: 0.98rem;
  color: var(--text-dim);
  border-left: 2px solid var(--teal);
  padding: 0.15rem 0 0.15rem 1rem;
  margin: 1.1rem 0 0;
}

.shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-top: 2rem;
}
.shots figure {
  margin: 0;
  background: #070b12;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.shots img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.shots figcaption {
  font-size: 0.88rem;
  color: var(--text-dim);
  padding: 0.55rem 0.75rem 0.7rem;
}

/* Books */
.book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin-top: 1.6rem;
}
.book-card {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 1.1rem;
  align-items: start;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
}
.cover {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  background: #070b12;
}
.cover img {
  width: 100%;
  aspect-ratio: 5 / 8;
  object-fit: cover;
}
.book-card h3 { margin-top: 0; }
.badge {
  display: inline-block;
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid rgba(112, 184, 176, 0.5);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin-bottom: 0.5rem;
}
.cover-note {
  font-size: 0.82rem;
  color: #8fa0b0;
  font-style: italic;
  margin: 0.6rem 0 0;
}
.book-card .actions { margin-top: 1rem; }

/* FreeCAD */
.video-list {
  list-style: none;
  margin: 1rem 0 1.4rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
}
.video-list li + li { border-top: 1px solid var(--line); }
.video-list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  text-decoration: none;
  color: var(--text);
}
.video-list a:hover { background: var(--bg-3); color: var(--gold); }
.video-list .label { color: inherit; }
.video-list .go {
  color: var(--teal);
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-shrink: 0;
  align-self: center;
}

/* Assessment */
.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

.checklist {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.checklist li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.4rem;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(240, 207, 138, 0.1);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(112, 184, 176, 0.18);
}
.checklist strong { color: var(--text); }

.panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}
.panel h3 { margin-top: 0; }
.panel ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-dim);
}
.panel ol li { margin: 0.45rem 0; }
.panel ol strong { color: var(--text); }

.panel .terms {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-dim);
}
.panel .terms li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(240, 207, 138, 0.1);
}
.panel .terms li:last-child { border-bottom: 0; }
.panel .terms strong { color: var(--text); }

.contact-box {
  margin-top: 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.contact-box p {
  margin: 0 0 0.85rem;
  color: var(--text-dim);
  font-size: 0.98rem;
}

.experience {
  margin-top: 1.5rem;
  color: var(--text-dim);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0 2.6rem;
  color: var(--text-dim);
  font-size: 0.98rem;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}
.footer-links a { color: var(--gold); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.fineprint {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  color: #8fa0b0;
}

/* Responsive */
@media (max-width: 860px) {
  .book-grid,
  .split,
  .shots { grid-template-columns: 1fr; }
  .book-card { grid-template-columns: 120px 1fr; }
  .hero { padding: 3.2rem 0 3.6rem; min-height: 0; }
}

@media (max-width: 640px) {
  body { font-size: 1.05rem; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-family: var(--display);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.75rem;
    cursor: pointer;
  }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    background: rgba(9, 15, 24, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 0.4rem 1.2rem 0.8rem;
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-links a { padding: 0.7rem 0; }
  .book-card {
    grid-template-columns: 1fr;
    max-width: 22rem;
  }
  .wrap { width: min(var(--max), calc(100% - 1.6rem)); }
  section.block { padding: 3.2rem 0; }
}

@media (min-width: 641px) {
  .nav-toggle { display: none !important; }
  .nav-links { display: flex !important; position: static; background: none; border: 0; padding: 0; }
}
