:root {
  --bg0: #070b0f;
  --bg1: #0b121a;
  --ink: #e8f1ff;
  --muted: #b5c4d8;
  --hair: rgba(232, 241, 255, 0.12);
  --accent: #68d6ff;
  --accent2: #b6ff9b;
  --maxw: 78ch;
}

/* Optional: place font files at assets/fonts/Aventurine.woff2/.woff */
/*
@font-face {
  font-family: "Aventurine";
  src: url("../fonts/Aventurine.woff2") format("woff2"),
       url("../fonts/Aventurine.woff") format("woff");
  font-display: swap;
}
*/

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: Aventurine, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(1200px 700px at 15% 10%, rgba(104, 214, 255, 0.18), transparent 55%),
    radial-gradient(900px 600px at 85% 20%, rgba(182, 255, 155, 0.10), transparent 60%),
    radial-gradient(900px 900px at 35% 90%, rgba(104, 214, 255, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  background-size: auto, auto, auto, auto;
  background-attachment: fixed, fixed, fixed, fixed;
}

.lang-in-hero {
  position: absolute;
  top: 1.65rem;
  right: 1.65rem;
  z-index: 5;
  transform: translate(-25%, 80%);
}

.lang-dd {
  position: relative;
}

.lang-btn {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(232, 241, 255, 0.14);
  background: rgba(0, 0, 0, 0.20);
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

/* Prevent layout shift/jump when toggling details */
.lang-dd > summary { display: inline-flex; }

.lang-btn::-webkit-details-marker { display: none; }

.lang-btn:hover {
  border-color: rgba(104, 214, 255, 0.28);
}

.lang-menu {
  position: absolute;
  right: 0;
  margin-top: 0.5rem;
  min-width: 140px;
  border-radius: 14px;
  border: 1px solid rgba(232, 241, 255, 0.14);
  background: rgba(7, 11, 15, 0.92);
  backdrop-filter: blur(8px);
  padding: 0.35rem;
}

.lang-menu a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  color: var(--ink);
}

.lang-menu a[aria-current="true"] {
  background: rgba(104, 214, 255, 0.12);
  border: 1px solid rgba(104, 214, 255, 0.22);
}

.lang-menu a:hover {
  background: rgba(232, 241, 255, 0.06);
  text-decoration: none;
}

.flag { font-size: 1.05rem; line-height: 1; }
.globe { font-size: 1.05rem; line-height: 1; }

.lang-code { font-size: 0.9rem; letter-spacing: 0.03em; }

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.5rem) 1.1rem 3.5rem;
}

.hero {
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border: 1px solid var(--hair);
  background: rgba(11, 18, 26, 0.52);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  position: relative;
}

h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.lede-quote {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid rgba(214, 178, 94, 0.55);
  background: rgba(0, 0, 0, 0.16);
  border-radius: 12px;
  position: relative;
}

.lede-quote::before {
  content: "\201C";
  position: absolute;
  left: 0.55rem;
  top: 0.15rem;
  color: rgba(214, 178, 94, 0.85);
  font-size: 2.2rem;
  line-height: 1;
}

.lede-quote::after {
  content: "\201D";
  position: absolute;
  right: 0.55rem;
  bottom: -0.15rem;
  color: rgba(214, 178, 94, 0.85);
  font-size: 2.2rem;
  line-height: 1;
}

.lede-quote p {
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

.lede-quote p { margin: 0; }

.lede-quote p + p {
  margin-top: 0.7rem;
}

.section {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--hair);
  position: relative;
}

.lang-in-section {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  z-index: 4;
  transform: translate(50%, 0%);
}

h2 {
  margin: 0 0 0.55rem;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

p { margin: 0.7rem 0; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 820px) {
  .grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
  }
}

.card {
  padding: 1rem;
  border: 1px solid var(--hair);
  background: rgba(7, 11, 15, 0.50);
  border-radius: 14px;
  overflow: hidden;
}

.cover {
  width: min(100%, 360px);
  height: auto;
  display: block;
  margin: 0.25rem 0 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(232, 241, 255, 0.18);
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.25);
}

.blurb-frame {
  max-width: 52ch;
  margin: 0.15rem auto 0.2rem;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(232, 241, 255, 0.14);
  background: rgba(0, 0, 0, 0.20);
  overflow: visible;
}

.btnrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(104, 214, 255, 0.35);
  background: rgba(104, 214, 255, 0.10);
  color: var(--ink);
}

.btn.secondary {
  border-color: rgba(182, 255, 155, 0.28);
  background: rgba(182, 255, 155, 0.08);
}

.embed iframe {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 560 / 384;
  height: auto;
  border: 1px solid rgba(232, 241, 255, 0.14);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}

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

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95rem;
  border: 1px dashed rgba(232, 241, 255, 0.22);
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  overflow-x: auto;
}

.carousel {
  margin: 0.25rem 0 0.1rem;
}

.carousel-track {
  display: flex;
  width: 100%;
  transform: translateX(0%);
  transition: transform 260ms ease;
}

.carousel-slide {
  min-width: 100%;
}

.carousel-slide {
  padding-right: 0.5rem;
}

.carousel-slide p {
  margin-top: 0;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.meta {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(232, 241, 255, 0.10);
  font-size: 0.86rem;
}

.meta p {
  margin: 0;
}

.carousel-btn {
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(232, 241, 255, 0.16);
  background: rgba(0, 0, 0, 0.18);
  color: var(--ink);
  cursor: pointer;
}

.carousel-btn:hover {
  border-color: rgba(104, 214, 255, 0.35);
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.carousel-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(232, 241, 255, 0.22);
  background: rgba(232, 241, 255, 0.06);
  cursor: pointer;
  padding: 0;
}

.carousel-dots .dot.active {
  border-color: rgba(104, 214, 255, 0.55);
  background: rgba(104, 214, 255, 0.35);
}

footer {
  margin-top: 1.8rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--hair);
  color: var(--muted);
  font-size: 0.95rem;
}

.ikken-footnote {
  margin-top: 0.65rem;
  color: #D6B25E;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  opacity: 0.92;
}
