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

:root {
  --bg: #0a0a0a;
  --fg: #f2f2f0;
  --muted: rgba(242, 242, 240, 0.45);
  --accent: #ff4d2e;
}

html,
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#webgl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  /* Touch drags rotate the globe instead of scrolling the page */
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
}

#webgl.dragging {
  cursor: grabbing;
}

/* Vignette: darkened edges pull focus to the center of the dome */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 45%,
    rgba(0, 0, 0, 0.32) 78%,
    rgba(0, 0, 0, 0.62) 100%
  );
}

/* Invisible track that gives Lenis real scroll distance */
.scroll-space {
  height: 600vh;
  pointer-events: none;
}

body {
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  display: none;
}

/* ---------- UI overlay ---------- */

.ui-header,
.ui-hero,
.ui-footer {
  position: fixed;
  z-index: 10;
  pointer-events: none;
}

.ui-header {
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2.5rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  pointer-events: auto;
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
}

.accent {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color 0.3s ease;
  pointer-events: auto;
}

.nav a:hover {
  color: var(--fg);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 1px;
  background: var(--accent);
  transition: right 0.35s ease;
}

.nav a.active {
  color: var(--fg);
}

.nav a.active::after {
  right: 0;
}

.ui-hero {
  bottom: 14vh;
  left: 2.5rem;
}

.ui-hero h1 {
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.subtitle {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ui-footer {
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 2.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.counter {
  font-variant-numeric: tabular-nums;
}

#active-index {
  color: var(--fg);
}

/* ---------- Inner pages (About / Contact) ---------- */

/* Sits above the vignette but below the header (z 10), so the nav
   stays clickable and the wire dome keeps drifting behind the text. */
.page {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: none;
  padding: 9rem 2.5rem 4rem;
  background: linear-gradient(
    115deg,
    rgba(10, 10, 10, 0.92) 0%,
    rgba(10, 10, 10, 0.55) 100%
  );
  opacity: 0;
  overflow-y: auto;
}

.page.open {
  display: block;
}

.page-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.page-meta {
  display: flex;
  gap: 1.5rem;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-meta span:first-child {
  color: var(--accent);
}

.page-title {
  margin-top: 1.2rem;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.page-back {
  margin-bottom: 2.5rem;
  padding: 0.6rem 1.3rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--fg);
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.page-back:hover {
  background: var(--fg);
  color: var(--bg);
}

/* --- About --- */

.about-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  margin-top: 1.2rem;
}

.about-header .page-title {
  margin-top: 0;
}

.about-photo {
  width: clamp(180px, 24vw, 240px);
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
}

.about-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  /* Source photo is full-body; zoom in for a head-and-shoulders crop */
  transform: scale(1.75);
  transform-origin: 50% 28%;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 4.5rem;
  margin-top: 3rem;
}

.about-text p {
  max-width: 52ch;
  color: rgba(242, 242, 240, 0.65);
  font-size: 1.05rem;
  line-height: 1.8;
}

.about-text p + p {
  margin-top: 1.4rem;
}

.aside-label {
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.aside-label + .aside-label,
.skill-list + .aside-label {
  margin-top: 2.5rem;
}

.skill-list {
  margin-top: 1rem;
  list-style: none;
}

.skill-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  color: rgba(242, 242, 240, 0.75);
}

.aside-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Opening line reads bigger and brighter than the body copy */
.about-text .about-lede {
  max-width: 44ch;
  color: var(--fg);
  font-size: 1.35rem;
  line-height: 1.55;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.accent-word {
  color: var(--accent);
}

.about-cta {
  display: inline-block;
  margin-top: 2.4rem;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.3s ease, color 0.3s ease;
}

.about-cta:hover {
  background: var(--accent);
  color: var(--bg);
}

.fact-list li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.fact-emoji {
  font-size: 1rem;
  line-height: 1;
}

/* --- Contact --- */

.contact-lede {
  margin-top: 2.5rem;
  max-width: 42ch;
  color: rgba(242, 242, 240, 0.65);
  font-size: 1.05rem;
  line-height: 1.8;
}

.contact-email {
  position: relative;
  display: inline-block;
  margin-top: 2rem;
  color: var(--fg);
  text-decoration: none;
  font-size: clamp(1.3rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.3rem;
  cursor: copy;
  transition: color 0.3s ease;
}

.contact-email:hover {
  color: var(--accent);
}

.contact-email::after {
  content: "click to copy";
  position: absolute;
  left: 100%;
  bottom: 0.55rem;
  margin-left: 1rem;
  font-family: "Courier New", monospace;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.contact-email:hover::after {
  opacity: 1;
}

.copy-note {
  display: block;
  margin-top: 1rem;
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.copy-note.show {
  opacity: 1;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 3rem;
  list-style: none;
}

.contact-links a {
  display: inline-block;
  padding: 0.6rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: rgba(242, 242, 240, 0.75);
  text-decoration: none;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.contact-links a:hover {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}

/* LinkedIn is the button I actually want people to press */
.contact-links a.primary {
  padding: 0.8rem 1.8rem;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 700;
}

.contact-links a.primary:hover {
  background: #ff6a4e;
  border-color: #ff6a4e;
  color: var(--bg);
}

.contact-location {
  margin-top: 3rem;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Chess easter egg ---------- */

/* Letters of the animated contact heading */
.title-letter {
  display: inline-block;
}

/* The knight: sits just left of the project counter on the gallery,
   above the inner pages (z 8) but under the details overlay (z 20) */
.chess-egg {
  position: fixed;
  z-index: 9;
  right: 6.8rem;
  bottom: 1.15rem;
  padding: 0.5rem 0.6rem;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease, text-shadow 0.3s ease;
}

.chess-egg:hover {
  color: var(--fg);
  transform: scale(1.25);
  text-shadow: 0 0 14px rgba(255, 77, 46, 0.8);
}

.chess-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(10, 10, 10, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.chess-modal.open {
  display: flex;
  animation: chessFadeIn 0.25s ease;
}

@keyframes chessFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.chess-panel {
  position: relative;
  width: min(100%, 400px);
  padding: 1.8rem;
  background: #121214;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.chess-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.chess-close:hover {
  color: var(--fg);
  border-color: var(--fg);
}

.chess-meta {
  display: flex;
  gap: 1.2rem;
  padding-right: 2.5rem;
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.chess-meta span:first-child {
  color: var(--accent);
}

.chess-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  aspect-ratio: 1;
  margin-top: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  overflow: hidden;
}

.chess-board.shake {
  animation: chessShake 0.4s ease;
}

@keyframes chessShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

.chess-sq {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  font-size: clamp(1.1rem, 5.5vw, 1.7rem);
  line-height: 1;
  cursor: default;
  user-select: none;
}

.chess-sq.light { background: #33333a; }
.chess-sq.dark { background: #1b1b20; }

.chess-sq.white-piece { color: #f2f2f0; }
.chess-sq.black-piece {
  color: #0c0c0e;
  text-shadow: 0 0 2px rgba(242, 242, 240, 0.65);
}

.chess-sq.selectable {
  cursor: pointer;
  transition: background 0.2s ease;
}

.chess-sq.selectable:hover {
  background: rgba(255, 77, 46, 0.35);
}

.chess-sq.selected {
  background: rgba(255, 77, 46, 0.55);
}

.chess-sq.glow {
  animation: chessGlow 0.8s ease 2;
}

@keyframes chessGlow {
  50% { background: rgba(255, 77, 46, 0.55); }
}

.chess-sq.mated {
  animation: chessGlow 0.6s ease 3;
}

.chess-status {
  margin-top: 1.1rem;
  min-height: 2.2em;
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.chess-hint {
  padding: 0.45rem 1.1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.chess-hint:hover {
  color: var(--fg);
  border-color: var(--fg);
}

.chess-panel.solved .chess-status,
.chess-panel.solved .chess-hint {
  display: none;
}

.chess-win {
  margin-top: 1.2rem;
}

.chess-win p {
  color: var(--fg);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
}

.chess-cta {
  display: inline-block;
  margin-top: 1.1rem;
  padding: 0.7rem 1.5rem;
  background: var(--accent);
  border-radius: 999px;
  color: var(--bg);
  text-decoration: none;
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.3s ease;
}

.chess-cta:hover {
  background: #ff6a4e;
}

@media (max-width: 860px) {
  .page {
    padding: 7.5rem 1.5rem 3rem;
  }

  .contact-email::after {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-header {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 2rem;
  }

  .about-photo {
    margin: 0 auto;
  }
}

/* ---------- Project details overlay ---------- */

.details {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 6.5rem 2.5rem 3rem;
  /* no backdrop-filter here: it would become the containing block for
     the fixed back button, which would then scroll away with content */
  background: rgba(10, 10, 10, 0.95);
  opacity: 0;
  overflow-y: auto;
}

.details.open {
  display: flex;
}

.details-back {
  /* fixed, not absolute: stays put while the overlay content scrolls */
  position: fixed;
  z-index: 2;
  top: 2rem;
  left: 2.5rem;
  padding: 0.6rem 1.3rem;
  background: rgba(10, 10, 10, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--fg);
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.details-back:hover {
  background: var(--fg);
  color: var(--bg);
}

/* margin:auto centers short content and lets tall content (video/deck
   embeds) scroll naturally from the top inside the flex overlay */
.details-body {
  width: min(1120px, 100%);
  margin: auto;
}

.details-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 4.5rem;
  align-items: center;
  width: 100%;
}

.details-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.details-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.details-award {
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.details-meta span:first-child {
  color: var(--accent);
}

.details-content h2 {
  margin-top: 1.2rem;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.details-content h2.long-title {
  font-size: clamp(1.8rem, 2.8vw, 2.7rem);
  overflow-wrap: break-word;
}

.details-content p {
  margin-top: 1.4rem;
  max-width: 44ch;
  color: rgba(242, 242, 240, 0.6);
  font-size: 1rem;
  line-height: 1.75;
}

.details-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.8rem;
}

.details-tag {
  padding: 0.45rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(242, 242, 240, 0.6);
}

.details-link {
  display: inline-block;
  margin-top: 2.2rem;
  padding: 0.75rem 1.6rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: background 0.3s ease, color 0.3s ease;
}

.details-link:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ---------- Details media embeds (video + slide deck) ---------- */

.details-extras {
  margin-top: 4.5rem;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  padding-bottom: 1rem;
}

.details-extra[hidden] {
  display: none;
}

.extra-label {
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.extra-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.extra-open {
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.extra-open:hover {
  color: var(--fg);
}

.case-study {
  max-width: 68ch;
}

.case-study h4 {
  margin-top: 2rem;
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
}

.case-study p {
  margin-top: 0.7rem;
  color: rgba(242, 242, 240, 0.6);
  font-size: 0.95rem;
  line-height: 1.75;
}

.case-study ul {
  margin-top: 0.7rem;
  list-style: none;
}

.case-study li {
  position: relative;
  padding-left: 1.4rem;
  margin-top: 0.45rem;
  color: rgba(242, 242, 240, 0.6);
  font-size: 0.95rem;
  line-height: 1.7;
}

.case-study li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.kpi-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.5rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.kpi-value {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #4ade80;
}

.kpi-label {
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.video-embed {
  margin-top: 1.2rem;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  background: #000;
}

.video-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Slides flow with the page so the whole overlay scrolls as one column */
.pdf-viewer {
  margin-top: 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  background: #101010;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pdf-viewer canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.pdf-status {
  padding: 2.5rem 1rem;
  text-align: center;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.pdf-status a {
  color: var(--fg);
}

/* ---------- Details: publisher mark + filled CTA variant ---------- */

.details-publisher {
  margin-top: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.details-publisher[hidden] {
  display: none;
}

.details-publisher img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.details-publisher span {
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Projects with a custom link label (e.g. "View on Amazon") get a
   filled accent button so the CTA reads as primary */
.details-link.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 700;
}

.details-link.primary:hover {
  background: transparent;
  color: var(--fg);
}

/* ---------- Details: image gallery ---------- */

.details-gallery {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.gallery-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-item {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ---------- Details: reader reviews ---------- */

.review-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.review-card {
  padding: 1.5rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.review-stars {
  color: #fbbf24;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
}

.review-card blockquote {
  margin-top: 0.9rem;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(242, 242, 240, 0.6);
}

.review-card figcaption {
  margin-top: 1rem;
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.reviews-more {
  display: inline-block;
  margin-top: 1.4rem;
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 0.2rem;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.reviews-more:hover {
  color: var(--fg);
  border-color: var(--accent);
}

.reviews-more[hidden] {
  display: none;
}

@media (max-width: 860px) {
  .details {
    padding: 5.5rem 1.5rem 3rem;
    align-items: flex-start;
  }

  .details-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .details-extras {
    margin-top: 3rem;
    gap: 2.5rem;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }
}
