:root { --hero-title-shift-vh: 20vh; --hero-title-shift: 30%;
  --bg: #0b0f17;
  --surface: #0f1420;
  --panel: #111a2e;
  --text: #e8eef8;
  --muted: #9aa4b2;
  --link: #93c5fd;
  --border: #1b2436;
  --accent: #2563eb; /* tuned from logo blue */
  --accent-strong: #1d4ed8;
  --accent-dark: #1e40af;
  --accent-glow: 0 0 0 4px rgba(37, 99, 235, .14);
}

@font-face {
  font-family: "MIRL-Minecraft";
  src: url("../fonts/mc.ttf") format("truetype");
  font-display: swap;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html {
  scrollbar-gutter: stable;
}
@supports not (scrollbar-gutter: stable) {
  html {
    overflow-y: scroll;
  }
}
body {
  margin: 0;
  font-family: "MIRL-Minecraft", monospace;
  background: var(--bg);
  color: var(--text);
  line-height: 1.36;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; box-shadow: var(--accent-glow); }

/* Default to English content before JavaScript initializes */
.lang-de { display: none; }
html[lang="de"] .lang-de { display: initial; }
html[lang="de"] .lang-en { display: none; }

.container { width: min(1320px, 92%); margin: 0 auto; }

/* Minimal nav (Home) */
header.nav-min {
  position: sticky; top: 0; z-index: 20;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.navbar { display:flex; justify-content:center; gap: 1rem; padding: 1rem 0; }

.navbar a:hover { transform: translateY(-1px); background-color: var(--panel); }


/* Full header (Links & Projects) */
header.nav {
  position: sticky; top: 0; z-index: 12;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { padding: 1rem 0 .9rem; display: grid; gap:.6rem; }
.brand { display:grid; place-items:center; gap:.6rem; }
.brand .logoimg { width: 80px; height: 80px; border-radius: 20px; overflow: hidden; box-shadow: 0 14px 30px rgba(0,0,0,.4); }
.brand .logoimg img { width:100%; height:100%; display:block; }
.brand .title { font-size: clamp(1.8rem, 5vw, 2.7rem); margin: .2rem 0 0; }
.brand .tagline { color:#f2c8c5; font-size: 1rem; opacity: .95; }

.topnav { display:flex; justify-content:center; gap:1rem; list-style:none; margin:.3rem 0 .8rem; padding:0; }
.topnav a { display:inline-block; padding:.75rem 1.15rem; border-radius:1rem; background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.topnav a[aria-current="page"] { color: var(--accent); }


/* === Themed tab buttons for navbar === */
.navbar a.btn-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .70rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,0,0,.12));
  box-shadow: 0 2px 0 rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.05);
  font-family: "MIRL-Minecraft", monospace;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: clamp(.94rem, 1.2vw, 1rem);
  color: var(--text);
  transition: transform .12s ease, background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.navbar a.btn-tab:hover {
  transform: translateY(-1px);
  background-color: var(--panel);
  border-color: var(--accent-dark);
  box-shadow: 0 3px 0 rgba(0,0,0,.28), 0 0 0 3px rgba(0,0,0,.08), var(--accent-glow);
}
.navbar a.btn-tab[aria-current="page"] {
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 2px 0 rgba(0,0,0,.25), 0 0 0 3px rgba(26,77,255,.16);
}
.navbar a.btn-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.16), 0 0 0 6px rgba(26,77,255,.28);
}

/* Optional: keep .topnav styling consistent if used elsewhere */
.topnav a { font-family: "MIRL-Minecraft", monospace; text-transform: uppercase; letter-spacing: .03em; }

/* === Hero title adjustments for Home === */
.hero-title .abbr {
  display:block;
  font-family: "MIRL-Minecraft", monospace;
  letter-spacing: -0.01em;
  line-height: 1.0;
  font-size: clamp( 3.2rem, 9.2vw, 5.6rem); /* slightly larger than the line below */
  margin-bottom: .25rem;

  font-weight: 900;}
.hero-title .long {  font-family: "MIRL-Minecraft", monospace;

  display:block;
  font-size: clamp(1.68rem, 5.44vw, 3.2rem); /* a tad smaller than before */
  line-height: 1.02;
  letter-spacing: .01em;
}

/* HOME hero */
.hero-stack { display:grid; place-items:center; text-align:center; gap: 1.6rem; padding: 7rem 0; }
.hero-title { line-height:1.0; letter-spacing: .01em; 
  position: relative;
  z-index: 2;}
.hero-title .line1 { font-size: clamp(3.2rem, 9vw, 5.4rem); display:block; }
.hero-title .line2 { font-size: clamp(3.6rem, 10.5vw, 6.2rem); display:block; margin-top:.2rem; letter-spacing: .03em; } /* longer than line1 */
.logo-wrap { width: min( 479px, 58.14vw); border-radius: 21px; overflow:hidden; box-shadow: 0 17px 34px rgba(0,0,0,.45); 
  position: relative;
  z-index: 1;
  margin-left: auto;
  margin-right: auto;
  display: block;}
.logo-wrap img { width:100%; display:block; image-rendering: -webkit-optimize-contrast; 
  display: block;
  margin: 0 auto;
  height: auto;}

/* Sections */
main section { padding: 4.4rem 0; }
.section-head { display:flex; align-items:center; gap:.8rem; margin: 0 0 1.2rem; }
.section-head .bar { width: 10px; height: 24px; background: var(--accent); border-radius: 5px; }
.section-head h1, .section-head h2 { margin:0; font-size: 1.8rem; }

/* Panels & cards */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.6rem; }
.grid { display:grid; gap: 1.8rem; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.45rem; transition: box-shadow .15s ease, transform .12s ease; }
.card:hover { box-shadow: 0 16px 28px rgba(0,0,0,.28); transform: translateY(-1px); }
.card .title { font-size: 1.35rem; margin: 0 0 .55rem; }
.card .muted { color: var(--muted); font-size: 1.02rem; }
.actions { margin-top: 1rem; display:flex; gap:.9rem; flex-wrap:wrap; }
.btn { display:inline-block; padding:.8rem 1.25rem; border:1px solid var(--border); border-radius:1rem; background:#101820; color: var(--text); }
.btn.primary { background: linear-gradient(180deg, var(--accent), var(--accent-dark)); border-color: var(--accent-dark); }
.btn.ghost { background: transparent; }
.btn:focus { outline: 3px solid var(--accent); box-shadow: var(--accent-glow); }

/* Chips */
.chips { display:flex; gap:.5rem; flex-wrap: wrap; margin-top: .6rem; }
.chip { display:inline-block; padding:.35rem .6rem; border-radius:.6rem; font-size:.95rem; color:#cfe0ff; background: rgba(0,0,246,.18); border:1px solid rgba(0,0,166,.4); }

/* Interactive chip inputs for the editor */
.chip-input {
  border: 1px solid rgba(59,130,246,.35);
  background: linear-gradient(135deg, rgba(15,23,42,.6), rgba(37,99,235,.12));
  border-radius: 16px;
  padding: .85rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.chip-input-group {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.chip-input-subtitle {
  margin: 0;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.chip-input-selected,
.chip-input-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  min-height: 32px;
}

.chip-input-selected[data-chip-focus] {
  border-radius: 12px;
  padding: .15rem 0;
}

.chip-input-selected[data-chip-focus]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.chip-input-empty {
  color: var(--muted);
  font-size: .85rem;
}

.chip-input-toolbar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.chip-input-add {
  border-radius: 999px;
  border: 1px dashed rgba(59,130,246,.8);
  background: rgba(37,99,235,.18);
  color: #e3edff;
  padding: .45rem 1rem;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
  font-family: "MIRL-Minecraft", monospace;
}

.chip-input-add:hover {
  background: rgba(59,130,246,.32);
}

.chip-input-add:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button.chip-option {
  appearance: none;
  border: 1px solid rgba(59,130,246,.5);
  background: rgba(15,23,42,.5);
  color: #cfe0ff;
  border-radius: 999px;
  padding: .32rem .75rem;
  font-size: .82rem;
  line-height: 1.2;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
  font-family: inherit;
}

button.chip-option:hover,
button.chip-option:focus-visible {
  border-color: rgba(59,130,246,.85);
  background: rgba(59,130,246,.28);
  outline: none;
}

button.chip-option.is-selected {
  background: rgba(59,130,246,.35);
  border-color: rgba(59,130,246,.85);
}

button.chip-option[data-removable="true"] {
  position: relative;
  padding-right: 1.4rem;
}

button.chip-option[data-removable="true"]::after {
  content: '×';
  position: absolute;
  right: .5rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  opacity: 0;
  transition: opacity .2s ease;
}

button.chip-option[data-removable="true"]:hover::after {
  opacity: 1;
}

.project-editor-form .field.field-error .chip-input {
  border-color: rgba(248,113,113,.9);
  box-shadow: 0 0 0 1px rgba(248,113,113,.3);
}

/* Segmented tabs (Projects) */
.segment { background: var(--surface); border:1px solid var(--border); border-radius: 14px; padding: .5rem; display:inline-flex; gap:.4rem; position: relative; }
.segment a { position: relative; z-index: 1; padding:.7rem 1.1rem; border-radius: 10px; color: var(--text); }
.segment a.active { color: #fff; }
.segment .pill { position:absolute; top:6px; bottom:6px; width: 0; left: 6px; border-radius: 10px; background: rgba(0,0,246,.20); border:1px solid rgba(0,0,166,.45); transition: left .18s ease, width .18s ease; }

.section-block { margin-top: 1.6rem; padding: 1.4rem; border-radius: 16px; background: var(--panel); border:1px solid var(--border); }
.section-block .head { display:flex; align-items:center; justify-content:space-between; gap:.6rem; margin-bottom: 1.1rem; }
.section-block .left { display:flex; align-items:center; gap:.6rem; }
.badge-dot { width:12px; height:12px; border-radius: 50%; background: var(--accent-strong); box-shadow: var(--accent-glow); }
.count { color: var(--muted); }

/* Links page improvements */
.linkgrid { display:grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.linkcard { border-radius: 16px; border:1px solid var(--border); background: var(--surface); padding: 1.4rem; display:grid; grid-template-columns: 100px 1fr; gap: 1rem; align-items:center; transition: transform .12s ease, box-shadow .15s ease; }
.linkcard:hover { transform: translateY(-1px); box-shadow: 0 18px 32px rgba(0,0,0,.28); }
.brandbadge { width:84px; height:84px; border-radius: 20px; display:grid; place-items:center; box-shadow: 0 10px 20px rgba(0,0,0,.35); }
.brandbadge svg { width:44px; height:44px; }
.yt { background: #ff0000; } .tw { background:#9146ff; } .dc { background:#ffffff; }
.linkmeta { color: var(--muted); margin-top:.2rem; }
.utils { display:flex; gap:.6rem; margin-top:.8rem; }

.notice { margin: 1rem 0; padding: 1.1rem; border-radius: 16px; border: 1px dashed var(--border); background:#0b0b0f; color: var(--muted); text-align:center; }
footer { margin-top: 2rem; border-top: 1px solid var(--border); }
.footer-inner { padding: 1.4rem 0 2rem; display:grid; gap:1rem; grid-template-columns: 1fr; }
.footer-links { text-align: center; }
.footer-links a { color: var(--muted); }

.hr { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: 1.4rem 0; }

/* Interactivity cursors */
.navbar a, .topnav a, .btn, .segment a, .linkcard, .card a { cursor: pointer; }

.linkcard:hover .title { text-decoration: underline; }
.footer-links a:hover { text-decoration: underline; }


/* --- Fixed header/footer & scrollable viewport --- */
:root { --hero-title-shift-vh: 20vh; --hero-title-shift: 30%; --header-h: 68px; --footer-h: 120px; }
header.nav-min, header.nav { position: fixed; top: 0; left: 0; right: 0; }
footer { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
.viewport { position: fixed; top: var(--header-h); bottom: var(--footer-h); left: 0; right: 0; overflow: auto; }
.viewport .container { width: min(1320px, 92%); margin: 0 auto; }
/* remove extra page flow spacing since we use fixed layers */
main section { padding: 3.2rem 0; }
.hero-stack { padding: 4rem 0; min-height: calc(100dvh - var(--header-h) - var(--footer-h)); display:grid; place-items:center; }
.notice { margin: .8rem auto; max-width: 900px; }

/* --- Minimal link tiles --- */
.linktiles { display:grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.linktile a { display:flex; align-items:center; gap: .9rem; padding: 1rem 1.2rem; border-radius: 16px;
  background: var(--surface); border:1px solid var(--border); transition: transform .12s ease, box-shadow .15s ease, background .12s ease; }
.linktile a:hover { transform: translateY(-1px); background: var(--panel); box-shadow: 0 14px 28px rgba(0,0,0,.28); }
.linktile .badge { width:56px; height:56px; border-radius: 14px; display:grid; place-items:center; box-shadow: 0 10px 20px rgba(0,0,0,.35); }
.linktile .badge svg { width:32px; height:32px; }
.linktile .meta { color: var(--muted); font-size: 1rem; }
.yt { background:#ff0000; } .tw { background:#9146ff; } .dc { background:#ffffff; }

.itemgrid { display:grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.item { display:grid; grid-template-columns: 84px 1fr; gap: 1rem; align-items:center; padding: .9rem; border-radius: 14px; border:1px solid var(--border); background: var(--surface); }
.item .thumb { width:84px; height:84px; border-radius: 12px; overflow:hidden; display:grid; place-items:center; background:#0b0b0f; border:1px solid var(--border); }
.item .thumb img { width:100%; height:100%; object-fit:cover; }
.item .title { font-size: 1.2rem; margin:0 0 .2rem; }
.item .muted { color: var(--muted); }
.item .actions { margin-top:.4rem; }
.scrollhint { color: var(--muted); font-size:.95rem; margin:.4rem 0 0; }


/* --- Home title/logo tighter spacing --- */
.hero-stack { gap: .3rem !important; }
.hero-title { margin: 0 0 .1rem !important; }
.logo-wrap { margin: .1rem auto 0 !important; }

/* --- Sticky segmented control on Projects --- */
.segment { position: sticky; top: 10px; z-index: 5; box-shadow: 0 10px 22px rgba(0,0,0,.35); }

/* --- Viewport edge fades to hint scroll --- */
.viewport::before, .viewport::after {
  content: ""; position: fixed; left: 0; right: 0; height: 22px; pointer-events: none; z-index: 2;
}
.viewport::before { top: calc(var(--header-h)); background: linear-gradient(#000, transparent); }
.viewport::after { bottom: calc(var(--footer-h)); background: linear-gradient(transparent, #000); }

/* --- Custom scrollbar (WebKit) for viewport --- */
.viewport::-webkit-scrollbar { width: 12px; }
.viewport::-webkit-scrollbar-track { background: var(--surface); }
.viewport::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  border-radius: 8px; border: 3px solid var(--surface);
}

/* --- Item hover polish --- */
.item { transition: transform .12s ease, box-shadow .15s ease; }
.item:hover { transform: translateY(-1px); box-shadow: 0 16px 28px rgba(0,0,0,.28); }
.item .thumb { background: radial-gradient(200px 120px at 30% 20%, rgba(26,77,255,.18), transparent 60%), #0b0b0f; border: 1px solid var(--border); }


/* --- Scroll progress bar within viewport --- */
.scrollbar { position: sticky; top: 0; height: 4px; background: transparent; z-index: 6; }
.scrollbar-bar { height: 4px; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-dark)); border-radius: 0 2px 2px 0; }

/* explicit center for logo */
.hero-stack { justify-items: center; align-items: center; text-align: center; }
.hero-title { margin: 0 0 0 !important; }
.logo-wrap { margin-left:auto !important; margin-right:auto !important; }

/* Larger minimal link tiles to fill page */
@media (min-width: 900px) {
  .linktiles { grid-template-columns: repeat(auto-fit, minmax(520px, 1fr)); gap: 1.2rem; }
  .linktile.feature { grid-column: span 2; }
}
.linktile a { padding: 1.4rem 1.6rem; min-height: 120px; }
.linktile .badge { width: 96px; height: 96px; border-radius: 18px; }
.linktile .badge svg { width: 52px; height: 52px; }
.linktile .title { font-size: 1.6rem; }
.linktile .meta { font-size: 1.08rem; opacity: .95; }
.linktile a { border:1px solid rgba(0,0,166,.35); background: linear-gradient(180deg, rgba(0,0,246,.08), transparent 40%), var(--surface); }
.linktile a:hover { background: linear-gradient(180deg, rgba(0,0,246,.14), transparent 45%), var(--panel); box-shadow: 0 20px 36px rgba(0,0,0,.36); }

/* Transparent header variant (see-through) */
header.nav-min.see-through { background: transparent !important; backdrop-filter: none !important; }
header.nav-min.see-through 

/* Home logo/title micro-adjust */
.hero-stack { gap: .25rem !important; }
.hero-title .line1 { margin-top: .1rem; }
.logo-wrap { margin-top: .15rem !important; }

/* Link tiles more minimal & larger fill */
.linktiles { grid-template-columns: repeat(auto-fit, minmax(560px, 1fr)); gap: 1.4rem; }
.linktile a { padding: 1.6rem 1.8rem; min-height: 132px; border:1px solid var(--border); background: var(--surface); }
.linktile a:hover { background: var(--panel); box-shadow: 0 20px 36px rgba(0,0,0,.36); }
.linktile .badge { width: 104px; height: 104px; border-radius: 20px; }
.linktile .badge svg { width: 58px; height: 58px; }
.linktile .title { font-size: 1.7rem; }
.linktile .meta { font-size: 1.08rem; opacity: .96; }

/* Cleaner hover underlines */
a:hover .title { text-decoration: underline; }

/* v13 hero tweaks */
.hero-stack { transform: translateY(-10%); gap: .2rem !important; }
.hero-title { margin-bottom: 0 !important; }

/* v13 projects segmented */
.segment { background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,0,0,.0));
  border:1px solid var(--border); border-radius: 16px; padding: .6rem; display:inline-flex; gap:.5rem; position: sticky; top: 10px; z-index: 6;
  box-shadow: 0 10px 22px rgba(0,0,0,.35); }
.segment a { position: relative; z-index: 1; padding:.75rem 1.1rem; border-radius: 12px; color: var(--text); display:flex; align-items:center; gap:.55rem; letter-spacing:.02em; }
.segment a .segicon { width:18px; height:18px; display:inline-block; }
.segment a.active { color:#fff; }
.segment .pill { position:absolute; top:8px; bottom:8px; width: 0; left: 8px; border-radius: 12px;
  background: rgba(26,77,255,.28); border:1px solid rgba(26,77,255,.55); box-shadow: 0 0 0 4px rgba(26,77,255,.12);
  transition: left .18s ease, width .18s ease; }

/* Section blocks more premium */
.section-block { margin-top: 1.4rem; padding: 1.2rem; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.01), rgba(0,0,0,.05)), var(--panel);
  border:1px solid var(--border); }
.section-block .head { display:flex; align-items:center; justify-content:space-between; gap:.6rem; margin-bottom: .9rem; }
.section-block .left { display:flex; align-items:center; gap:.6rem; }
.badge-dot { width:12px; height:12px; border-radius: 50%; background: var(--accent-strong); box-shadow: 0 0 0 4px rgba(26,77,255,.12); }
.count { color: var(--muted); }

/* Cards with better thumbnails */
.itemgrid { display:grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.item { display:grid; grid-template-columns: 90px 1fr; gap: 1rem; align-items:center; padding: 1rem; border-radius: 16px;
  border:1px solid var(--border); background: var(--surface); transition: transform .12s ease, box-shadow .15s ease; }
.item:hover { transform: translateY(-1px); box-shadow: 0 16px 28px rgba(0,0,0,.28); }
.item .thumb { width:90px; height:90px; border-radius: 12px; overflow:hidden; display:grid; place-items:center;
  background: radial-gradient(200px 120px at 30% 20%, rgba(26,77,255,.22), transparent 60%), #0b0b0f; border:1px solid var(--border); }
.item .thumb img { width:100%; height:100%; object-fit:cover; }
.item .title { font-size: 1.22rem; margin:0 0 .2rem; }
.item .muted { color: var(--muted); }
.item .actions { margin-top:.35rem; }
.chips { display:flex; gap:.45rem; flex-wrap: wrap; margin-top: .5rem; }
.chip { display:inline-block; padding:.35rem .55rem; border-radius:.55rem; font-size:.92rem; color:#cfe0ff; background: rgba(26,77,255,.16); border:1px solid rgba(26,77,255,.38); }

/* v13 links polish */
.linktiles { gap: 1.5rem; }
.linktile a { border:1px solid rgba(0,0,166,.32); }

/* v14 nav styling */
.navbar { display:flex; justify-content:center; gap: 1.2rem; padding: 1rem 0; }
.navbar a {
  background: transparent; border: none; padding: .2rem .1rem;
  color: var(--text); font-size: 1.25rem; font-weight: 800; letter-spacing: .01em;
  transition: color .12s ease, transform .12s ease;
}
.navbar a:hover { color: var(--link); transform: translateY(-1px); }
.navbar a[aria-current="page"] { color: var(--accent) !important; }

/* v14 home hero adjustment */
body.home .hero-title { transform: translateY(15vh) !important; margin-bottom: 0; }
body.home .hero-stack { gap: 0.9rem; 
  transform: none !important;}

/* v14 links 3-up centered tiles */
.linkrow { display:grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .linkrow { grid-template-columns: 1fr 1fr 1fr; } }
.linktile2 a {
  display:grid; place-items:center; text-align:center;
  padding: 2rem 1.2rem; border-radius: 20px; border:1px solid var(--border); background: var(--surface);
  transition: transform .12s ease, box-shadow .15s ease, background .12s ease, border-color .12s ease;
  min-height: 240px;
}
.linktile2 a:hover { transform: translateY(-2px); background: var(--panel); box-shadow: 0 24px 40px rgba(0,0,0,.36); border-color: rgba(0,0,166,.35); }
.linktile2 .badge { width: 128px; height: 128px; border-radius: 24px; display:grid; place-items:center; box-shadow: 0 14px 28px rgba(0,0,0,.38); margin-bottom: 1rem; }
.linktile2 .badge svg { width: 70px; height: 70px; }
.linktile2 .title { font-size: 1.5rem; }
.linktile2 .meta { color: var(--muted); margin-top: .2rem; font-size: 1.02rem; }

/* Compact sections (used on Links & Projects without on-page title) */
main section.compact { padding-top: 2rem; }


/* === Links page: bigger icons, cleaner UI, centered row === */
/* Limit the wider layout to the main content so the footer keeps the global width */
.links-page .viewport > main.container { width: min(1420px, 94%); }
.links-page main section.compact {
  min-height: calc(100dvh - var(--header-h) - var(--footer-h));
  display: grid;
  place-items: center;
  padding-top: 0;
  padding-bottom: 0;
}
.links-page .linkrow { 
  display: grid; 
  gap: 2rem; 
  grid-template-columns: 1fr; 
  align-items: center; 
  justify-items: center;
}
@media (min-width: 900px) { 
  .links-page .linkrow { grid-template-columns: repeat(3, minmax(300px, 1fr)); } 
}
.links-page .linktile2 a {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 28px;
  padding: 2.4rem 1.6rem;
  min-height: 440px;
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}
.links-page .linktile2 a:hover { 
  transform: translateY(-3px); 
  box-shadow: 0 20px 46px rgba(0,0,0,.45);
}
.links-page .linktile2 .badge { 
  width: clamp(160px, 16vw, 240px); 
  height: clamp(160px, 16vw, 240px); 
  margin-bottom: 1.2rem; 
}
.links-page .linktile2 .badge svg { 
  width: clamp(96px, 9vw, 150px); 
  height: clamp(96px, 9vw, 150px); 
}
.links-page .linktile2 .title { 
  font-size: clamp(1.7rem, 2vw, 2.1rem); 
  line-height: 1.1; 
}
.links-page .linktile2 .meta { 
  margin-top: .4rem; 
  font-size: clamp(1.02rem, 1.2vw, 1.14rem); 
  color: var(--muted); 
}


/* === Added to support raster logos in badges === */
.badge img { 
  width: clamp(96px, 9vw, 150px); 
  height: clamp(96px, 9vw, 150px);
}
.brandbadge img {
  width: 44px;
  height: 44px;
}


/* === Added: raster logo support in link badges === */
.badge img { 
  width: 70%;
  height: 70%;
  display: block;
  object-fit: contain;
}
.brandbadge img {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
}
/* === end added === */


/* --- Overrides · 2025-10-26 --- */

/* Layout: remove fixed footer + fixed viewport. Let page scroll normally. */
header.nav-min, header.nav { position: sticky !important; top: 0; left: auto; right: auto; z-index: 10; }
footer { position: static !important; background: transparent !important; backdrop-filter: none !important; }
.viewport { position: static !important; top: auto !important; bottom: auto !important; left: auto !important; right: auto !important; overflow: visible !important; }
.viewport::before, .viewport::after { display: none !important; content: none !important; }

/* Projects page: make native scrollbar blend with background */
body.projects-page {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-dark) rgba(15,23,42,0.7);
}
body.projects-page::-webkit-scrollbar {
  width: 12px;
}
body.projects-page::-webkit-scrollbar-track {
  background: var(--bg);
}
body.projects-page::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  border-radius: 8px;
  border: 3px solid var(--bg);
}
body.projects-page::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-strong), var(--accent-dark));
}
body.projects-page::-webkit-scrollbar-corner {
  background: var(--bg);
}

/* Bottom Notice: shows only when footer is in view; stays at bottom of the screen */
#bottomNotice {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  transform: translateY(110%);
  transition: transform .22s ease;
  z-index: 50;
  max-height: 5vh;
  padding: .5rem 1rem;
  display: flex; align-items: center; justify-content: center; gap: .75rem;
  background: rgba(0,0,0,.85);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(6px);
  font-size: clamp(.75rem, 1.2vw, .95rem);
  line-height: 1.25;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#bottomNotice.show { transform: translateY(0); }
#bottomNotice .badge { font-weight: 700; }
#bottomNotice a { text-decoration: underline; }

/* Make segment/tab buttons more visually distinct */
.segment { background: rgba(255,255,255,.03) !important; border: 1px solid var(--border) !important; padding: .5rem !important; border-radius: 14px !important; }
.segment a { color: var(--text) !important; opacity: .95; border-radius: 10px !important; padding: .6rem 1rem !important; }
.segment a:hover { background: rgba(255,255,255,.06) !important; }
.segment a.active { background: rgba(255,255,255,.10) !important; color: #fff !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.segment .pill { background: linear-gradient(180deg, rgba(100,130,255,.25), rgba(60,90,255,.18)) !important; box-shadow: inset 0 0 0 1px rgba(100,130,255,.35) !important; }

/* Ensure any sticky progress bar doesn't block clicks */
.scrollbar { pointer-events: none; }
.scrollbar * { pointer-events: none; }
.segment, .segment * { pointer-events: auto; }

/* Improve generic buttons visibility */
.btn { border-color: rgba(255,255,255,.18) !important; box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 6px 18px rgba(0,0,0,.25) !important; }
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Top nav tabs */
.navbar .btn-tab { border: 1px solid var(--border); background: rgba(255,255,255,.02); border-radius: 10px; padding: .5rem .9rem; }
.navbar .btn-tab[aria-current="page"] { background: rgba(255,255,255,.10); color: #fff; }


/* --- Bottom Notice · themed --- */
#bottomNotice {
  position: fixed; left: 0; right: 0; bottom: 0;
  transform: translateY(110%);
  transition: transform .24s ease, opacity .24s ease;
  z-index: 60;
  opacity: .98;
  pointer-events: none;
}
#bottomNotice.show { transform: translateY(0); pointer-events: auto; }
#bottomNotice.hide { transform: translateY(110%); }

#bottomNotice .bn-inner {
  max-height: 5vh;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .8rem;
  padding: .5rem .9rem;
  margin: 0 auto .6rem;
  width: min(1320px, 92%);
  background: linear-gradient(180deg, rgba(18,20,28,.9), rgba(12,14,22,.9));
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(6px);
  overflow: hidden;
}
#bottomNotice .bn-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: var(--accent-glow);
}
#bottomNotice .bn-text {
  font-size: clamp(.75rem, 1.15vw, .95rem);
  line-height: 1.25;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#bottomNotice a { color: var(--text); text-decoration: underline; }
#bottomNotice .bn-close {
  background: transparent; border: 1px solid var(--border);
  border-radius: 10px; padding: .25rem .5rem;
  color: var(--text); cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
#bottomNotice .bn-close:hover { background: rgba(255,255,255,.06); transform: translateY(-1px); }

/* Remove legacy footer notice styling entirely */
footer .notice, footer .footer-links { display: none !important; }


/* --- Bottom Notice · refined (no black bar, minimal chip) --- */
#bottomNotice {
  position: fixed; left: 0; right: 0; bottom: 0;
  transform: translateY(110%);
  transition: transform .24s ease, opacity .24s ease;
  z-index: 60;
  opacity: 1;
}
#bottomNotice.show { transform: translateY(0); }

#bottomNotice .bn-inner {
  max-height: 5vh;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .7rem;
  padding: .4rem .75rem;
  margin: 0 auto .6rem;
  width: min(980px, 92%);
  background: transparent;                 /* no dark bar */
  border: 1px solid var(--border);         /* subtle outline */
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: none;                    /* remove blur to avoid 'bar' feeling */
  overflow: hidden;
}
#bottomNotice .bn-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: var(--accent-glow);
}
#bottomNotice .bn-text {
  font-size: clamp(.74rem, 1vw, .92rem);
  line-height: 1.25;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#bottomNotice a { color: var(--text); text-decoration: underline; }

/* Ensure nothing else paints a dark footer bar */
footer { background: transparent !important; }


/* Tabs layering */
.segment { position: relative; z-index: 7; }
.segment a { position: relative; z-index: 2; }
.segment .pill { position: absolute; z-index: 1; }


/* --- 2025-10-26 · Clean footer edge & themed bottom chip --- */

/* Remove any divider line before the disclaimer on Home/Links */
footer { margin-top: 0 !important; border-top: 0 !important; }
main > hr:last-child, .container > hr:last-child, hr.footer-sep { display: none !important; }

/* Bottom Notice: themed to site panel/card */
#bottomNotice { position: fixed; left: 0; right: 0; bottom: 0; transform: translateY(110%); transition: transform .24s ease; z-index: 70; }
#bottomNotice.show { transform: translateY(0); }
#bottomNotice .bn-inner {
  max-height: 5vh;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .7rem;
  width: min(1024px, 92%); margin: 0 auto .7rem; padding: .5rem .9rem;
  background: var(--panel); /* match site panel */
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.05);
  overflow: hidden;
}
#bottomNotice .bn-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent-strong); box-shadow: var(--accent-glow); }
#bottomNotice .bn-text { font-size: clamp(.74rem, 1vw, .92rem); line-height: 1.25; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bottomNotice a { color: var(--text); text-decoration: underline; }
#bottomNotice, #bottomNotice * { pointer-events: auto; } /* ensure links are clickable */

/* Auto-hide top bar when scrolling down */
header.nav-min, header.nav { position: sticky; top: 0; transition: transform .22s ease; will-change: transform; z-index: 50; }
header.nav-min.nav-hide, header.nav.nav-hide { transform: translateY(-110%); }


/* --- Bottom Notice · 3-col layout where text truncates but links remain visible --- */
#bottomNotice { position: fixed; left: 0; right: 0; bottom: 0; transform: translateY(110%); transition: transform .24s ease; z-index: 70; }
#bottomNotice.show { transform: translateY(0); }
#bottomNotice .bn-inner {
  max-height: 5vh;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: .8rem;
  width: min(1100px, 92%); margin: 0 auto .7rem; padding: .5rem .9rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.05);
  overflow: hidden;
}
#bottomNotice .bn-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent-strong); box-shadow: var(--accent-glow); }
#bottomNotice .bn-text {
  min-width: 0; /* allow shrink */
  font-size: clamp(.74rem, 1vw, .92rem); line-height: 1.25; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  /* soft fade at the end so links remain legible */
  -webkit-mask-image: linear-gradient(to right, black 75%, transparent 100%);
          mask-image: linear-gradient(to right, black 75%, transparent 100%);
}
#bottomNotice .bn-links { display: inline-flex; gap: .5rem; align-items: center; white-space: nowrap; flex-shrink: 0; }
#bottomNotice .bn-link { color: var(--text); text-decoration: underline; }
@media (max-width: 480px) {
  #bottomNotice .bn-text strong { display: none; } /* save space on tiny screens */
  #bottomNotice .bn-links { gap: .4rem; }
}
/* Make sure anything below can't add a black bar */
footer { background: transparent !important; border-top: 0 !important; }


/* --- Bottom Notice · transparent container, separated text & links --- */
#bottomNotice { position: fixed; left: 0; right: 0; bottom: 0; transform: translateY(110%); transition: transform .24s ease; z-index: 80; }
#bottomNotice.show { transform: translateY(0); }
#bottomNotice .bn-inner {
  max-height: 5vh;
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: .7rem;
  width: min(1100px, 92%); margin: 0 auto .7rem; padding: 0;          /* transparent, no padding "bar" */
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
}
#bottomNotice .bn-dot { width: 9px; height: 9px; border-radius: 2px; background: var(--accent-strong); box-shadow: var(--accent-glow); }
#bottomNotice .bn-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .6rem; min-width: 0; }
#bottomNotice .bn-text {
  min-width: 0;
  font-size: clamp(.72rem, .95vw, .9rem);
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  -webkit-mask-image: linear-gradient(to right, black 75%, transparent 100%);
          mask-image: linear-gradient(to right, black 75%, transparent 100%);
}
#bottomNotice .bn-links { display: inline-flex; gap: .5rem; align-items: center; white-space: nowrap; flex-shrink: 0; }
#bottomNotice .bn-link {
  display: inline-block;
  padding: .25rem .55rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255,255,255,.03);  /* subtle chip */
  color: var(--text);
  text-decoration: none;
}
#bottomNotice .bn-link:hover { text-decoration: underline; }


/* --- Bottom Notice · split content + marquee, themed, compact --- */
#bottomNotice {
  position: fixed; left: 0; right: 0; bottom: 0;
  transform: translateY(110%);
  transition: transform .24s ease;
  z-index: 70;
  background: transparent !important; /* no black bar */
}
#bottomNotice.show { transform: translateY(0); }
#bottomNotice .bn-inner {
  max-height: 5vh;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: .8rem;
  width: min(1100px, 92%); margin: 0 auto .7rem; padding: .45rem .9rem;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.05);
  overflow: hidden;
}
#bottomNotice .bn-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent-strong); box-shadow: var(--accent-glow); }

/* Ticker track keeps height tiny but ensures full readability over time */
#bottomNotice .bn-track {
  position: relative; min-width: 0; height: 1.25em; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
}
#bottomNotice .bn-marquee {
  display: inline-block; white-space: nowrap;
  animation: bn-scroll 16s linear infinite;
  font-size: clamp(.74rem, 1vw, .92rem);
  color: var(--text);
  padding-right: 2rem;
}
@keyframes bn-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}
/* Respect reduced motion: stop auto-scroll but allow hover to nudge */
@media (prefers-reduced-motion: reduce) {
  #bottomNotice .bn-marquee { animation: none; }
  #bottomNotice .bn-track:hover .bn-marquee { animation: bn-scroll 24s linear infinite; }
}

#bottomNotice .bn-links { display: inline-flex; gap: .5rem; align-items: center; white-space: nowrap; flex-shrink: 0; }
#bottomNotice .bn-link { color: var(--text); text-decoration: underline; }

/* Clean bottom area, no divider lines */
footer { background: transparent !important; border-top: 0 !important; }
main > hr:last-child, .container > hr:last-child, hr.footer-sep { display: none !important; }


/* --- Bottom Notice · circular ticker + clear disclaimer badge --- */
#bottomNotice {
  position: fixed; left: 0; right: 0; bottom: 0;
  transform: translateY(110%);
  transition: transform .24s ease;
  z-index: 70;
  background: transparent !important; /* no full-width bar */
}
#bottomNotice.show { transform: translateY(0); }
#bottomNotice .bn-inner {
  max-height: 5vh;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: .8rem;
  width: min(1100px, 92%); margin: 0 auto .7rem; padding: .45rem .9rem;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.05);
  overflow: hidden;
}
/* Disclaimer badge: visually indicates importance without being a heavy bar */
.bn-badge {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .25rem .6rem;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,160,0,.18), rgba(255,140,0,.12));
  border: 1px solid rgba(255,200,120,.35);
  box-shadow: 0 0 0 1px rgba(0,0,0,.14) inset;
  font-weight: 700; letter-spacing: .02em;
  color: var(--text);
}
.bn-ico { font-size: .95em; }
.bn-label { font-size: .85rem; text-transform: uppercase; opacity: .92; }

/* Circular ticker */
.bn-track { position: relative; min-width: 0; height: 1.25em; overflow: hidden; }
.bn-loop { display: inline-flex; width: max-content; animation: bn-loop var(--bn-speed, 22s) linear infinite; }
.bn-seg  { flex: 0 0 auto; white-space: nowrap; font-size: clamp(.74rem, 1vw, .92rem); color: var(--text); padding-right: 2rem; }

@keyframes bn-loop {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-1 * var(--bn-shift, 50%))); }
}

/* Reduced motion: stop auto-scroll, but allow gentle hover-animate if desired */
@media (prefers-reduced-motion: reduce) {
  .bn-loop { animation: none; }
  .bn-track:hover .bn-loop { animation: bn-loop 30s linear infinite; }
}

.bn-links { display: inline-flex; gap: .5rem; align-items: center; white-space: nowrap; flex-shrink: 0; }
.bn-link { color: var(--text); text-decoration: underline; }

/* Clean bottom area */
footer { background: transparent !important; border-top: 0 !important; }
main > hr:last-child, .container > hr:last-child, hr.footer-sep { display: none !important; }



/* =========================================================
   v15 — Home visual polish (minimalistic, no new elements)
   ---------------------------------------------------------
   - Subtle layered background on Home
   - Gradient text for hero title (with safe fallback)
   - Softer, more modern navbar hover & focus rings
   - Gentle float for the logo (reduced with prefers-reduced-motion)
   - Refined spacing and shadows
   ========================================================= */

:root { --hero-title-shift-vh: 20vh; --hero-title-shift: 30%;
  /* keep existing palette; just add subtle utility alphas */
  --alpha-02: rgba(255,255,255,.02);
  --alpha-04: rgba(255,255,255,.04);
  --alpha-06: rgba(255,255,255,.06);
  --alpha-08: rgba(255,255,255,.08);
}

/* Home background: layered gradients for depth, stays minimal */
body.home .viewport {
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(37,99,235,.10), transparent 60%),
    radial-gradient(900px 520px at 110% 10%, rgba(30,64,175,.12), transparent 55%),
    linear-gradient(180deg, var(--surface), var(--bg) 38%  );
}

/* Keep the transparent header but give it a whisper of separation */
header.nav-min.see-through {
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,0)) !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

/* Tab buttons: calmer hover + crisp focus ring */
.navbar .btn-tab {
  border-radius: 12px;
  padding: .56rem .9rem;
  border: 1px solid transparent;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.navbar .btn-tab:hover {
  background-color: var(--panel);
  border-color: var(--border);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.28);
}
.navbar .btn-tab:focus-visible {
  outline: none;
  box-shadow: var(--accent-glow);
  border-color: var(--accent);
}

/* Hero title: subtle gradient text (no extra elements) */
.hero-title {
  margin-bottom: .4rem !important;
}
.hero-title .abbr,
.hero-title .long {
  color: var(--text); /* fallback for older browsers */
text-shadow: 0 1px 0 rgba(0,0,0,.25), 0 4px 12px rgba(0,0,0,.18);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-title .abbr,
  .hero-title .long {

  color: var(--text); /* fallback for older browsers */
  background-image: linear-gradient(180deg, rgba(232,238,248,1) 0%, rgba(147,197,253,1) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 rgba(0,0,0,.25), 0 4px 12px rgba(0,0,0,.18);

  }
}


/* Slight scale on the first line to create hierarchy */
.hero-title .abbr { transform: translateY(.5px); }
.hero-title .long { opacity: .96; }

/* Logo card: softer radius, interactive yet calm */
.logo-wrap {
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 44px rgba(0,0,0,.46), 0 0 0 1px rgba(255,255,255,.015) inset;
  transform: translateZ(0);
  transition: transform .3s ease, box-shadow .3s ease, filter .3s ease;
  will-change: transform;
}
.logo-wrap:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 56px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.02) inset;
  filter: saturate(1.04);
}

/* Gentle float motion; respects reduced motion */
@keyframes floaty {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  body.home .logo-wrap { animation: floaty 14s ease-in-out infinite; }
}

/* Spacing tune so hero breathes a bit more on large screens */
@media (min-width: 900px) {
  .hero-stack { gap: 1.2rem !important; padding: 9rem 0 7.6rem 0; }
}

/* Typography crispness */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* Slightly brighter active tab to help orientation */
.navbar a[aria-current="page"] {
  color: var(--text) !important;
  background-color: rgba(147,197,253,.08);
  border-color: var(--border);
}

/* Stronger focus styles for accessibility across the page */
a:focus-visible, button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(147,197,253,.45);
  border-color: var(--accent);
}

/* Ensure footer area still anchors to bottom visually if empty */
/* overridden */


/* v15.1 — Remove logo border and inset outline */
body.home .logo-wrap {
  border: none !important;
  box-shadow: 0 18px 44px rgba(0,0,0,.46) !important; /* drop-only */
}
body.home .logo-wrap:hover {
  box-shadow: 0 24px 56px rgba(0,0,0,.5) !important; /* drop-only */
}


/* v15.1 — remove logo border/background as requested */
.logo-wrap {
  border: none !important;
  background: transparent !important;
  box-shadow: 0 18px 44px rgba(0,0,0,.46); /* keep soft depth only */
}
.logo-wrap:hover {
  box-shadow: 0 24px 56px rgba(0,0,0,.50); /* no inset/border */
}



/* =========================================================
   v16 — User-requested fixes
   - Remove any border/background/shadow from home logo
   - Only the logo remains in the home hero (hide title)
   - Header fixed across all pages; hide when scrolled far
   ========================================================= */

/* 1) Home hero: show ONLY the logo */
body.home .hero-title { transform: translateY(var(--hero-title-shift-vh, 20vh)); margin-bottom: 0; }
body.home .hero-stack { gap: 0.9rem; }
body.home .logo-wrap {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  overflow: visible !important;
  filter: none !important;
  animation: none !important; /* cancel float from v15 */
  transform: none !important;
}
body.home .logo-wrap img {
  display: block;
  width: min(520px, 68vw);
  height: auto;
}

/* 2) Header fixed at top on all pages */
header.nav-min {
  position: fixed !important;
  top: 0; left: 0; right: 0;
  transform: translateY(0);
  transition: transform .36s ease, opacity .36s ease;
  will-change: transform;
}

/* Hide header after scrolling far enough */
header.nav-min.nav-hidden {
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
}

/* Ensure content accounts for fixed header height */
:root { --hero-title-shift-vh: 20vh; --hero-title-shift: 30%; --header-h: 68px; }
.viewport { padding-top: var(--header-h); }



/* =========================================================
   v16 — Home logo simplification + sticky autohide header
   ---------------------------------------------------------
   - Remove all borders/shadows/hover/animation from .logo-wrap
   - Keep only the transparent logo image and the title
   - Add header autohide behavior styles
   ========================================================= */

/* Logo must be "just the image" — no chrome around it */
body.home .logo-wrap {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  transition: none !important;
  animation: none !important;
  transform: none !important;
}
body.home .logo-wrap:hover {
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
}
/* Prevent any hover interaction on the logo entirely */
body.home .logo-wrap,
body.home .logo-wrap img {
  pointer-events: none !important;
}

/* Sticky header present on all pages; allow smooth hide/show */
header.nav-min {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform .28s ease, opacity .28s ease, background-color .3s ease;
}
/* Hidden state toggled by JS when scrolling down */
header.nav-min.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.hero-stack { position: relative; }
.hero-stack::before {
  content: "";
  position: absolute;
  inset: -10vmax;
  background: radial-gradient(ellipse at center, rgba(100, 160, 255, .08), rgba(0,0,0,0) 60%);
  pointer-events: none;
  z-index: 0;
}
.hero-stack > * { position: relative; z-index: 1; }


/* Stronger white glow for hero title */
.hero-title .abbr,
.hero-title .long {
  text-shadow:
    0 0 10px rgba(255,255,255,.60),
    0 0 22px rgba(255,255,255,.38),
    0 2px 0 rgba(0,0,0,.22);
}


/* Allow native scrolling on home and links pages (match Projects) */
.home, .links-page { overflow: visible; }
.home .viewport, .links-page .viewport { overflow: visible; }

/* Ensure hero section fits without extra padding on home */
.home .hero-stack { padding-top: 0 !important; padding-bottom: 0 !important; min-height: calc(100dvh - var(--header-h) - var(--footer-h)); }
/* Links page layout: center content while allowing scroll */
.links-page main section.compact { min-height: calc(100dvh - var(--header-h) - var(--footer-h)); padding-top: 0 !important; padding-bottom: 0 !important; }


/* Heavier/“fat” styling for MC_IRL */
.hero-title .abbr { font-weight: 900; }

@supports (-webkit-text-stroke: 1px white) {
  .hero-title .abbr {
    -webkit-text-stroke: 1.2px rgba(255,255,255,.55);
    text-shadow:
      0 0 8px rgba(255,255,255,.45),
      0 0 18px rgba(255,255,255,.30);
  }
}
@supports not (-webkit-text-stroke: 1px white) {
  .hero-title .abbr {
    /* Stroke fallback using multi-offset shadows to “thicken” the text */
    text-shadow:
      -1px  0   rgba(255,255,255,.75),
       1px  0   rgba(255,255,255,.75),
       0   -1px rgba(255,255,255,.75),
       0    1px rgba(255,255,255,.75),
      -1px -1px rgba(255,255,255,.60),
       1px -1px rgba(255,255,255,.60),
      -1px  1px rgba(255,255,255,.60),
       1px  1px rgba(255,255,255,.60),
       0    0   10px rgba(255,255,255,.45);
  }
}


/* --- BEGIN MIRL hero/logo/title fix --- */
/* =========================================================
   Hero / Logo / Title fit fix — 2025‑10‑26
   - Keeps the logo crisp (never upscales above its native 160px)
   - Displays it at ~80% of native size (≈128px) per your note
   - Tightens vertical rhythm & right-sizes the title
   ========================================================= */
.hero-stack { 
  gap: 0.75rem !important; 
  padding: clamp(5rem, 12vh, 8rem) 0 !important; 
  justify-items: center !important; 
  align-items: center !important; 
  text-align: center !important;
}

.hero-title { 
  margin: 0 !important; 
  line-height: 1.02; 
}
.hero-title .abbr { 
  font-size: clamp(2.6rem, 8vw, 4.2rem) !important; 
  letter-spacing: -0.01em; 
  font-weight: 900; 
}
.hero-title .long { 
  font-size: clamp(1.3rem, 4.2vw, 2.2rem) !important; 
  letter-spacing: 0.01em; 
  font-weight: 700;
}

/* Logo wrapper: never exceed 128px (≈80% of 160px native). 
   Clamp keeps it responsive but crisp, and avoids blurry upscaling. */
.logo-wrap { 
  width: clamp(96px, 20vw, 128px) !important; 
  aspect-ratio: 1 / 1; 
  border-radius: 18px; 
  overflow: hidden; 
  box-shadow: 0 12px 24px rgba(0,0,0,.24);
  margin: .35rem auto 0 !important; 
}
.logo-wrap img { 
  width: 100% !important; 
  height: auto !important; 
  image-rendering: auto !important;           /* let the browser choose best quality */
  display: block; 
  margin: 0; 
}

/* Optional: soften any previous hover/animation that made the logo feel “floaty” */
.logo-wrap:hover { 
  transform: none !important; 
  box-shadow: 0 12px 24px rgba(0,0,0,.24) !important; 
  filter: none !important; 
}

/* Small phones: keep things tidy */
@media (max-width: 380px) {
  .hero-stack { gap: .6rem !important; }
  .logo-wrap { width: 96px !important; }
  .hero-title .abbr { font-size: clamp(2.2rem, 9vw, 3.6rem) !important; }
  .hero-title .long { font-size: clamp(1.1rem, 4vw, 1.9rem) !important; }
}
/* --- END MIRL hero/logo/title fix --- */


/* --- BEGIN MIRL order/center fix --- */
/* =========================================================
   Hero order + centering tweak — 2025‑10‑26
   Requirement: Title above the logo, centered. 
   Note: Logo stays smaller (~80% of native) via .logo-wrap sizing from previous patch.
   ========================================================= */
.hero-stack {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.75rem !important;           /* keep vertical rhythm tight */
  text-align: center !important;
}

/* Make sure the title is above and the logo comes next */
.hero-title { order: 1 !important; }
.logo-wrap  { order: 2 !important; }

/* Keep logo crisp and smaller than the raw asset (max 128px as before) */
.logo-wrap { 
  width: clamp(96px, 20vw, 128px) !important;
  margin-top: .35rem !important;
}
.logo-wrap img { 
  width: 100% !important; 
  height: auto !important; 
  display: block;
}

@media (max-width: 380px) {
  .hero-stack { gap: .6rem !important; }
  .logo-wrap { width: 96px !important; }
}
/* --- END MIRL order/center fix --- */


/* --- BEGIN MIRL home hero centering/title-above fix --- */
/* =========================================================
   HOME HERO — clean centering + title above logo (final)
   - Neutralize old vertical shifts (translateY)
   - Stack title above a centered, smaller logo
   - Ensure crisp rendering and balanced rhythm
   ========================================================= */
body.home .hero-title { 
  transform: none !important;      /* kill previous translateY hacks */
  margin: 0 !important;
}

body.home .hero-stack {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 0.7rem !important;
  min-height: calc(100dvh - var(--header-h, 64px) - var(--footer-h, 56px)) !important;
  padding: clamp(56px, 12vh, 88px) 0 !important;
}

/* Keep the source logo smaller on home (≈80% native cap) and perfectly centered */
body.home .logo-wrap { 
  width: clamp(96px, 20vw, 128px) !important;
  margin: .25rem auto 0 !important;
  padding: 0 !important;
}
body.home .logo-wrap img {
  width: 100% !important;
  height: auto !important;
  image-rendering: pixelated;       /* crisp pixel logo */
}

/* Tidy up sizes so the title doesn't overpower the logo */
body.home .hero-title .abbr { font-size: clamp(2.6rem, 8.6vw, 4.4rem) !important; letter-spacing: -0.01em; font-weight: 900; }
body.home .hero-title .long { font-size: clamp(1.25rem, 4.4vw, 2.2rem) !important; letter-spacing: 0.01em; font-weight: 700; }

/* Very small screens */
@media (max-width: 380px) {
  body.home .hero-stack { gap: .55rem !important; }
  body.home .logo-wrap { width: 96px !important; }
}
/* --- END MIRL home hero centering/title-above fix --- */


/* --- BEGIN MIRL bigger logo tweak --- */
/* =========================================================
   HOME HERO — Bigger Logo (requested)
   - Make the logo much larger on desktop while staying responsive.
   - Keeps title above and everything centered.
   ========================================================= */
body.home .logo-wrap {
  /* From 128px cap -> up to 288px cap, with larger vw scaling */
  width: clamp(144px, 24vw, 288px) !important;
}
/* Keep it readable on very small phones too */
@media (max-width: 380px) {
  body.home .logo-wrap { width: 120px !important; }
}
/* --- END MIRL bigger logo tweak --- */


/* --- BEGIN MIRL 4x logo size override --- */
/* =========================================================
   HOME HERO — 4× larger logo (user request)
   Previous cap: 128px -> New cap: 512px (4×)
   Keep it responsive with clamp and center it.
   ========================================================= */
body.home .logo-wrap { 
  width: clamp(256px, 40vw, 512px) !important;  /* 4× cap */
  margin: .35rem auto 0 !important;
}
body.home .logo-wrap img {
  width: 100% !important; height: auto !important;
  image-rendering: pixelated;    /* crisp pixels at larger size */
}
/* --- END MIRL 4x logo size override --- */

/* --- BEGIN large logo and text adjustment --- */
/* === User requested: 4x logo size, double text, move text down 5% === */
body.home .logo-wrap {
  width: clamp(200px, 40vw, 512px) !important;
}

body.home .hero-title .abbr {
  font-size: clamp(5.2rem, 17vw, 8.8rem) !important;
}
body.home .hero-title .long {
  font-size: clamp(2.5rem, 8.8vw, 4.4rem) !important;
}

body.home .hero-title {
  transform: translateY(5vh) !important;
}
/* --- END large logo and text adjustment --- */


/* --- BEGIN MIRL hero BIG variant --- */
/* =========================================================
   HOME HERO — 4x logo, 2x title, title shifted down by 5vh
   ========================================================= */
body.home .hero-title {
  transform: translateY(5vh) !important;   /* move the title down by ~5% of screen height */
  margin: 0 !important;
}
/* 2x title sizes */
body.home .hero-title .abbr { 
  font-size: clamp(5.2rem, 17vw, 8.8rem) !important; 
  letter-spacing: -0.012em; font-weight: 900;
}
body.home .hero-title .long { 
  font-size: clamp(2.5rem, 8.8vw, 4.4rem) !important; 
  letter-spacing: 0.012em; font-weight: 700;
}

/* 4x logo size (was ~128px cap → now up to 512px). 
   Uses pixelated scaling so it stays crisp/blocky instead of blurry. */
body.home .logo-wrap { 
  width: clamp(240px, 30vw, 512px) !important; 
  margin: .35rem auto 0 !important;
}
body.home .logo-wrap img { 
  image-rendering: pixelated !important;
  width: 100% !important; height: auto !important; display: block;
}

/* Add a bit more breathing room between title and logo at these sizes */
body.home .hero-stack { gap: 1.1rem !important; }
/* --- END MIRL hero BIG variant --- */


/* --- BEGIN MIRL 4x logo / 1.5x title / dots / shift --- */
/* =========================================================
   User tweak — 4× logo, 1.5× title, +10vh title shift,
   and decorative blue dots around the long title.
   Date: 2025‑10‑26
   ========================================================= */

/* 1) Title down by ~10% of viewport height */
body.home .hero-title {
  transform: translateY(10vh) !important;
}

/* 2) Make the MC_IRL title 1.5× larger */
body.home .hero-title .abbr {
  font-size: clamp(3.9rem, 13vw, 6.6rem) !important;  /* was ~2.6–4.4rem */
  letter-spacing: -0.012em;
  font-weight: 900;
}
body.home .hero-title .long {
  font-size: clamp(1.875rem, 6.6vw, 3.3rem) !important; /* was ~1.25–2.2rem */
  letter-spacing: 0.012em;
  font-weight: 700;
  position: relative;
  display: inline-block; /* so the dots hug the text neatly */
  padding: 0 .55rem;     /* breathing room for dots */
}

/* 3) Add dark‑blue dots before/after "Minecraft In Real Life" */
body.home .hero-title .long::before,
body.home .hero-title .long::after {
  content: '•';
  color: var(--accent-dark, #1e40af);
  opacity: .95;
  font-weight: 900;
  margin: 0 .35rem;
  transform: translateY(-0.05em);
}

/* 4) 4× the current logo size (from 128px cap -> 512px cap), but keep responsive */
body.home .logo-wrap {
  width: clamp(256px, 40vw, 512px) !important; /* ≈4× previous 128px cap */
  margin: .35rem auto 0 !important;
}
body.home .logo-wrap img {
  width: 100% !important;
  height: auto !important;
  image-rendering: pixelated; /* keep that crisp retro look */
}
/* --- END MIRL 4x logo / 1.5x title / dots / shift --- */


/* --- BEGIN MIRL move up 10vh/5vh --- */
/* =========================================================
   Positional tweak — move title up 10vh, logo up 5vh
   ========================================================= */
body.home .hero-title { 
  transform: translateY(-10vh) !important;
}
body.home .logo-wrap {
  transform: translateY(-5vh) !important;
}
/* --- END MIRL move up 10vh/5vh --- */

/* Move homepage title down by ~4% of viewport height as requested */
.hero-title { margin-top: 4vh !important; }

/* === Custom override: Move homepage title down by ~4% of viewport height === */
body.home .hero-title {
  transform: none !important;
  margin-top: 4vh !important;
}

/* === Custom override: Reduce hero title white glow by ~60% === */
body.home .hero-title .abbr,
body.home .hero-title .long {
  /* Reduced white glow alphas from .60 -> .24 and .38 -> .15 */
  text-shadow:
    0 0 10px rgba(255,255,255,.24),
    0 0 22px rgba(255,255,255,.15),
    0 2px 0 rgba(0,0,0,.22) !important;
}

/* === Custom overrides (2025-10-26) === */

/* Make home background similar to links page (darker, no bright radial accents) */
body.home .viewport {
  background: var(--bg) !important;
}

/* Nudge MC_IRL (.abbr) glow up by ~10% from previous reduction */
body.home .hero-title .abbr {
  /* Previously: 0 0 10px rgba(255,255,255,.24), 0 0 22px rgba(255,255,255,.15) */
  text-shadow:
    0 0 10px rgba(255,255,255,.264),
    0 0 22px rgba(255,255,255,.165),
    0 2px 0 rgba(0,0,0,.22) !important;
}

/* === Reduce center hero glow on Home (~60% dimmer) === */
body.home .hero-stack::before {
  background: radial-gradient(ellipse at center, rgba(100, 160, 255, .032), rgba(0,0,0,0) 60%) !important;
}


/* === MIRL: Home hero title tweaks (2025-10-26) === */
/* Remove decorative dots around the long title text */
body.home .hero-title .long::before,
body.home .hero-title .long::after {
  content: none !important;
  margin: 0 !important;
}

/* Make the long title a bit darker and slightly blurry */
body.home .hero-title .long {
  color: #cbd5e1 !important; /* darker than original #e8eef8 */
  -webkit-filter: blur(0.4px);
  filter: blur(0.4px);
}


/* === MIRL update 2025‑10‑26: Implement user-specified Home tweaks === */

/* 1) Top bar: remove blue glow highlight on hover (keep rest of hover + current page styling) */
header .navbar .btn-tab:hover {
  /* keep subtle lift & panel background but no accent glow */
  box-shadow: 0 3px 0 rgba(0,0,0,.28) !important;
  border-color: var(--border) !important;
  transform: translateY(-1px) !important;
}

/* Do not change focus-visible so keyboard users keep a visible focus ring */
header .navbar .btn-tab:focus-visible {
  outline: none;
  /* keep the focus ring for accessibility */
}

/* 2) Home hero: use plain Minecraft font, remove shiny effects */
body.home .hero-title,
body.home .hero-title .abbr,
body.home .hero-title .long {
  font-family: "MIRL-Minecraft", monospace !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
  -webkit-text-stroke: 0 !important;
  filter: none !important;
}

/* Colors: MC_IRL stays white; “Minecraft In Real Life” becomes gray */
body.home .hero-title .abbr { color: #ffffff !important; }
body.home .hero-title .long { color: #9ca3af !important; } /* tailwind gray-400-ish */

/* 3) Reduce Home title size to ~85% for better balance with centered logo */
body.home .hero-title .abbr { font-size: clamp(2.72rem, 7.82vw, 4.76rem) !important; }
body.home .hero-title .long { font-size: clamp(1.428rem, 4.624vw, 2.72rem) !important; }

/* 4) Center the hero area and slightly shrink the logo as well */
body.home .hero-stack { text-align: center; }
body.home .logo-wrap {
  width: min(420px, 52vw) !important; /* ~87% of previous max */
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Neutralize earlier vertical shifts to keep everything visually centered */
body.home .hero-title { transform: none !important; margin: 2vh 0 1.5vh !important; }

/* End of MIRL update */


/* --- Links page revamp · 20251026-235229 --- */
/* Cleaner tiles */
.links-page .linkrow { 
  gap: 1.2rem;
}

.links-page .linktile2 a {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  min-height: 220px;
}

.links-page .linktile2 a:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0,0,0,.22);
  background: var(--panel);
  border-color: rgba(26,77,255,.25);
}

.links-page .linktile2 a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.16), 0 0 0 6px rgba(26,77,255,.35);
}

/* Badge (icon field) */
.links-page .linktile2 .badge {
  width: clamp(96px, 9vw, 128px);
  height: clamp(96px, 9vw, 128px);
  border-radius: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)),
              radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,.04), transparent 50%);
  box-shadow: 0 8px 20px rgba(0,0,0,.24);
}

/* Ensure raster logos size nicely */
.links-page .linktile2 .badge img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
  display: block;
}

/* FIX: Center the doubled YouTube logo within the badge on Links page */
.links-page .linktile2 .badge.yt {
  display: grid;
  place-items: center;
  overflow: visible; /* allow even overflow if the logo extends beyond the frame */
}
/* UPDATE: Max out the YouTube logo within its badge (closest to 2× without changing the frame) */
/* UPDATE: reduce YouTube logo inside badge by 20% */
.links-page .linktile2 .badge.yt img {
  max-width: 80%;
  max-height: 80%;
}


/* FIX: Make YouTube logo match other icon sizes on Links page without changing the UI frame */
/* Subtle brand tint per platform */
.links-page .linktile2 .badge.yt { 
  background: radial-gradient(120% 120% at 0% 0%, rgba(255,0,0,.08), transparent 46%), 
              var(--surface);
}
.links-page .linktile2 .badge.tw { 
  background: radial-gradient(120% 120% at 0% 0%, rgba(145,70,255,.10), transparent 46%), 
              var(--surface);
}
.links-page .linktile2 .badge.dc { 
  background: radial-gradient(120% 120% at 0% 0%, rgba(114,137,218,.08), transparent 46%), 
              var(--surface);
}

/* Typography alignment */
.links-page .linktile2 .title {
  font-size: clamp(1.2rem, 1.6vw, 1.5rem);
  line-height: 1.2;
}
.links-page .linktile2 .meta {
  margin-top: .25rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.2vw, 1.06rem);
}
/* --- End Links page revamp --- */


/* --- Links page logo size bump (2x) · 20251026-235433 --- */
.links-page .linktile2 .badge {
  width: clamp(192px, 18vw, 256px);
  height: clamp(192px, 18vw, 256px);
}
/* Ensure both raster and SVG scale with the badge */
.links-page .linktile2 .badge img,
.links-page .linktile2 .badge svg {
  max-width: 70%;
  max-height: 70%;
  width: auto;
  height: auto;
}
/* Give the tile more room so content doesn't feel cramped */
.links-page .linktile2 a {
  min-height: clamp(340px, 40vw, 420px);
}
/* --- end size bump --- */



/* === MINIMAL TOP BAR OVERRIDES === */

/* Make the header clean and simple on all pages */
header.nav-min,
header.nav {
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border-bottom: 1px solid var(--border);
}

/* Navbar spacing */
.navbar {
  gap: .75rem;
  padding: .75rem 0;
}

/* Tabs: flat, no glow/shadow, smooth movement only */
.btn-tab {
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
}

/* Remove glow and keep only a subtle upward movement on hover */
.navbar a:hover,
.navbar a.btn-tab:hover,
.btn-tab:hover {
  transform: translateY(-2px);
  background: transparent;
  border-color: var(--border);
  box-shadow: none !important;
}

/* Accessible but minimal focus */
.btn-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: none;
}

/* Optional: ensure active/current page state is also minimal */
.navbar a[aria-current="page"],
.btn-tab[aria-current="page"] {
  background: transparent;
  border-color: var(--border);
  box-shadow: none;
}
  color: inherit;
}

/* === END MINIMAL TOP BAR OVERRIDES === */




/* === Minimalistic Top Bar (override) ===
   - Remove glow/white highlights
   - Keep only subtle upward motion
   - Use blue border as the only indicator (a bit wider)
*/
.navbar a:hover { background: transparent; box-shadow: none; }

/* Base button: clean + flat */
.btn-tab {
  background: transparent;
  box-shadow: none;
  border: 1px solid var(--border);
  transition: transform .18s ease, border-color .18s ease, border-width .18s ease;
}

/* Hover/Active: subtle lift + blue border, no glow */
.btn-tab:hover,
.btn-tab:active {
  transform: translateY(-2px);
  background: transparent;
  border-color: var(--accent);
  border-width: 2px;
  box-shadow: none;
}

/* Keyboard focus: same clean indicator, no white halo */
.btn-tab:focus-visible {
  outline: none;
  transform: translateY(-2px);
  background: transparent;
  border-color: var(--accent);
  border-width: 2px;
  box-shadow: none;
}

/* Current page: only blue border as state */
.btn-tab[aria-current="page"] {
  background: transparent;
  color: var(--text);
  border-color: var(--accent);
  border-width: 2px;
  box-shadow: none;
}
/* === End Minimalistic Top Bar === */


/* neutral by default */
  box-shadow: none !important;
  text-shadow: none !important;
  margin: 0 !important;
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease !important;
}

.navbar .btn-tab:hover,
.navbar .btn-tab:focus-visible {
  background: transparent !important;            /* no white highlight */
  transform: translateY(-2px);                   /* motion is the only hover signal */
  border-color: var(--border) !important;        /* keep neutral on hover */
  box-shadow: none !important;
  outline: none !important;
}

.navbar .btn-tab[aria-current="page"],
.navbar .btn-tab.active {
  background: transparent !important;
  border-color: var(--accent-strong) !important; /* blue only when selected */
  border-width: 3px !important;                  /* slightly wider blue border */
  box-shadow: none !important;
}

/* Mobile polish */
@media (max-width: 640px) {
  .navbar { gap: .6rem !important; }
  .navbar .btn-tab { padding: .56rem .9rem !important; }
}


/* NAV MINIMAL — v3
   - Blue border on hover AND when selected
   - Hovering a selected tab keeps the blue highlight
   - Text color never changes
   - Centered group with even spacing, regardless of label length
   - No glow/shadows/highlights
*/
.navbar,
.topnav {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(.6rem, 2vw, 1.4rem) !important;
  box-shadow: none !important;
}

/* reset UL-specific list styles for .topnav */
.topnav {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
}
.topnav li { list-style: none !important; margin: 0 !important; padding: 0 !important; }

/* base button look */
.navbar .btn-tab,
.topnav .btn-tab {
  background: transparent !important;
  color: var(--text) !important;                 /* text stays the same */
  border: 2px solid var(--border) !important;    /* neutral by default */
  box-shadow: none !important;
  text-shadow: none !important;
  margin: 0 !important;
  transition: transform .18s ease, border-color .18s ease, border-width .18s ease !important;
}

/* hover/focus: blue highlight + lift */
.navbar .btn-tab:hover,
.navbar .btn-tab:focus-visible,
.topnav .btn-tab:hover,
.topnav .btn-tab:focus-visible {
  background: transparent !important;
  color: var(--text) !important;
  transform: translateY(-2px);
  border-color: var(--accent-strong) !important; /* blue on hover */
  border-width: 3px !important;                  /* slightly wider on hover */
  box-shadow: none !important;
  outline: none !important;
}

/* selected: blue highlight always on */
.navbar .btn-tab[aria-current="page"],
.navbar .btn-tab.active,
.topnav .btn-tab[aria-current="page"],
.topnav .btn-tab.active {
  background: transparent !important;
  color: var(--text) !important;
  border-color: var(--accent-strong) !important; /* blue when selected */
  border-width: 3px !important;
  box-shadow: none !important;
}

/* keep selection when hovered/focused */
.navbar .btn-tab[aria-current="page"]:hover,
.navbar .btn-tab[aria-current="page"]:focus-visible,
.navbar .btn-tab.active:hover,
.navbar .btn-tab.active:focus-visible,
.topnav .btn-tab[aria-current="page"]:hover,
.topnav .btn-tab[aria-current="page"]:focus-visible,
.topnav .btn-tab.active:hover,
.topnav .btn-tab.active:focus-visible {
  background: transparent !important;
  color: var(--text) !important;
  transform: translateY(-2px);
  border-color: var(--accent-strong) !important;
  border-width: 3px !important;
  box-shadow: none !important;
}

/* remove any nav bar glow/shadow */
.navbar { box-shadow: none !important; }
.nav-min.see-through { backdrop-filter: saturate(1) blur(0px); box-shadow: none !important; }

/* Mobile spacing */
@media (max-width: 640px) {
  .navbar, .topnav { gap: .6rem !important; }
  .navbar .btn-tab, .topnav .btn-tab { padding: .56rem .9rem !important; }
}


/* --- Datapack subcategories (Modrinth-inspired) --- */
.subcats { margin-top: .6rem; }
.subcats-row { display:flex; flex-wrap:wrap; gap:.6rem; }
.subcat { display:inline-flex; align-items:center; gap:.5rem; padding:.55rem .8rem;
  border-radius: 999px; border:1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer; user-select: none; transition: transform .12s ease, background .2s ease, border-color .2s ease; }
.subcat .emoji { font-size: 1.05rem; line-height: 1; }
.subcat .label { font-weight: 600; letter-spacing:.01em; }
.subcat:hover { transform: translateY(-1px); border-color: var(--accent-dark); }
.subcat.active { background: linear-gradient(180deg, var(--accent-strong), var(--accent-dark)); border-color: transparent; color: #fff; box-shadow: var(--accent-glow); }
.subcat-explain { margin-top: .9rem; padding: .9rem 1rem; border-radius: 14px; background: var(--panel); border:1px solid var(--border); }
.subcat-explain .title { font-weight: 700; margin-bottom: .2rem; }
.subcat-explain .text { color: var(--muted); }
@media (max-width: 720px) {
  .subcat { padding:.5rem .7rem; }
  .subcat .label { font-weight: 600; }
}
/* Cards inside .itemgrid flow responsively already through existing grid styles */


/* --- Minimal Datapack cards (Modrinth-like) --- */
.dp-card { display:grid; grid-template-columns: 88px 1fr; gap: 1rem; align-items:center; cursor: pointer; }
.dp-card .thumb { width: 88px; height: 88px; border-radius: 12px; overflow: hidden; background: var(--surface); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; }
.dp-card .thumb img { width:100%; height:100%; object-fit: cover; display:block; }
.dp-card .meta .title { font-weight: 700; margin-bottom: .2rem; }
.dp-card .meta .chips { display:flex; gap:.4rem; flex-wrap:wrap; margin:.2rem 0 .35rem; }
.dp-card .meta .quick { color: var(--muted); }
.dp-card:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.dp-card:active { transform: translateY(0); }

/* Modal hero download action */
.hero-actions { margin-top: .9rem; }
.hero-actions .btn.dl { display:inline-flex; align-items:center; gap:.5rem; }
.hero-actions .btn.dl svg { margin-right: .25rem; }


/* ===== Minimalistic Cleanup Pass ===== */

/* Screen-reader only helper */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Section block: lighter, airy */
.section-block{background:transparent;border:1px solid var(--border);border-radius:14px;padding:1.1rem}
.section-block .head{margin-bottom:.8rem}

/* Subcategories: simple, borderless pills */
.subcats{margin:.4rem 0 1rem}
.subcats .subcats-row{display:flex;flex-wrap:wrap;gap:.5rem}
.subcats .subcat{display:inline-flex;align-items:center;gap:.45rem;padding:.45rem .8rem;border-radius:999px;border:1px solid var(--border);background:transparent;color:var(--text);transition:background .15s,border-color .15s,transform .12s}
.subcats .subcat:hover{transform:translateY(-1px);border-color:var(--accent-dark)}
.subcats .subcat.active{background:var(--accent-strong);color:#fff;border-color:transparent}
.subcats .emoji{font-size:1rem}
.subcats .subcat-explain{margin-top:.6rem;color:var(--muted)}

/* Minimal cards */
.itemgrid{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}
.dp-card{display:grid;grid-template-columns:80px 1fr;gap:.9rem;align-items:center;border:1px solid var(--border);border-radius:12px;padding:.8rem;background:var(--surface)}
.dp-card .thumb{width:80px;height:80px;border-radius:10px;overflow:hidden;border:1px solid var(--border)}
.dp-card .thumb img{width:100%;height:100%;object-fit:cover;display:block}
.dp-card .meta .title{font-weight:700;margin-bottom:.1rem}
.dp-card .meta .chips{display:flex;gap:.35rem;flex-wrap:wrap;margin:.1rem 0 .25rem}
.dp-card .meta .quick{color:var(--muted)}
.dp-card:hover{transform:translateY(-1px)}
.dp-card:active{transform:translateY(0)}

/* Chips */
.chip{padding:.2rem .5rem;border-radius:999px;border:1px solid var(--border);font-size:.85rem}

/* Buttons */
.btn{border-radius:10px;padding:.6rem .9rem;border:1px solid var(--border);background:var(--surface);color:var(--text);display:inline-flex;align-items:center;gap:.5rem}
.btn.primary{background:var(--accent-strong);color:#fff;border-color:transparent}
.btn.ghost{background:transparent}
.btn:hover{transform:translateY(-1px)}
.btn:active{transform:translateY(0)}

/* Modal: compact, calm */
.modal-content{border:1px solid var(--border);border-radius:16px;background:var(--surface)}
.modal-hero{padding:1.1rem 1.2rem 0}
.modal-hero .title{font-weight:800;font-size:1.2rem}
.modal-hero .muted{color:var(--muted);margin-top:.2rem}
.modal-hero .badges{display:flex;gap:.4rem;flex-wrap:wrap;margin:.6rem 0}
.modal-hero .badge{border-radius:999px;border:1px solid var(--border);padding:.25rem .6rem}
.modal-hero .stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;margin:.6rem 0 0}
.hero-actions{margin:.8rem 0 1rem}
.hero-actions .btn.dl{gap:.45rem}

/* Tabs: underline style */
.tabs{display:flex;gap:.8rem;padding:0 1.2rem;margin-top:.8rem;border-bottom:1px solid var(--border)}
.tabs [role="tab"]{background:transparent;border:none;padding:.7rem .2rem;color:var(--muted);border-bottom:2px solid transparent;font-weight:600;cursor:pointer}
.tabs [role="tab"].active{color:var(--text);border-bottom-color:var(--accent-strong)}
.tabpanels{padding:1rem 1.2rem}

/* Prose spacing */
.prose p{margin:.6rem 0;line-height:1.55}

/* Count label muted */
.count{color:var(--muted)}




/* ===== Modern Polish Pack (global visual refinements) ===== */

/* Tokens */
:root {
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-0: 0 1px 2px rgba(0,0,0,.28);
  --shadow-1: 0 8px 18px rgba(0,0,0,.28);
}

/* Typography rhythm */
html { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1,h2,h3 { letter-spacing: .2px; }
p { line-height: 1.6; }
.prose p, .prose li { line-height: 1.65; }
main .content, main article, .main-content { max-width: 780px; margin-left: auto; margin-right: auto; }

/* Links */
a { text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; border-radius: 6px; text-decoration: none; }

/* Focus for interactive elements */
.button, .btn, .segment a, .navbar a, .card, .linkcard, [role="button"] {
  outline: none;
}
.button:focus-visible, .btn:focus-visible, .segment a:focus-visible, .navbar a:focus-visible, .card:focus-visible, .linkcard:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

/* Buttons: calmer look */
.btn { border-radius: var(--radius); border:1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-0); }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--accent-strong); color: #fff; border-color: transparent; box-shadow: var(--shadow-1); }
.btn.ghost { background: transparent; border-color: var(--border); box-shadow: none; }

/* Cards: consistent, minimal */
.card, .linkcard, .dp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: none;
}
.card:hover, .linkcard:hover, .dp-card:hover {
  box-shadow: var(--shadow-1);
}

/* Thumbnails */
.thumb img { border-radius: 10px; object-fit: cover; display:block; }

/* Navbar & footer: reduce glass / blur for calmer look */
header.nav-min { background: rgba(8,10,16,.65); backdrop-filter: blur(4px); border-bottom: 1px solid var(--border); }
footer { background: rgba(8,10,16,.65); backdrop-filter: blur(3px); border-top: 1px solid var(--border); }

/* Tabs: cleaner underline style */
.tabs [role="tab"] { background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--muted); }
.tabs [role="tab"].active { color: var(--text); border-bottom-color: var(--accent-strong); }
.tabs [role="tab"]:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; border-radius: 6px; }

/* Modal: calmer surface and spacing */
.modal-content { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.modal-hero { padding-top: 1rem; }
.modal-hero .badges .badge { background: transparent; border: 1px solid var(--border); }
.modal .info-card { border-radius: var(--radius); border:1px solid var(--border); background: transparent; }

/* Legal pages banner (if present) – keep compact */
.bn-pop { border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-1); }

/* Grids: tighter, responsive */
.grid, .itemgrid, .linkgrid { gap: 1.2rem; }
.linkgrid { grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}




/* ===== Home Hero Center Fix ===== */
.home .viewport > main.container { display: block; }
.home .hero-stack {
  min-height: calc(100dvh - var(--header-h) - var(--footer-h)) !important;
  display: grid !important;
  place-items: center !important;
  justify-items: center !important;
  align-content: center !important;
  text-align: center !important;
  gap: 0.8rem !important;
  padding: 0 !important;
  transform: none !important;
}
.home .hero-title { margin: 0 !important; transform: none !important; }
.home .hero-title .abbr, .home .hero-title .long { text-shadow: none; }
.home .logo-wrap {
  transform: none !important;
  margin: 0 auto !important;
  width: min(440px, 56vw) !important;
}




/* ===== Home hero centering fix ===== */
.home .hero-stack{
  /* center the hero within the viewport between fixed header/footer */
  min-height: calc(100dvh - var(--header-h) - var(--footer-h));
  display:grid;
  place-content:center;
  place-items:center;
  gap: clamp(1rem, 2.5vmin, 2rem);
  padding-block: clamp(1.5rem, 3vmin, 3rem);
  text-align:center;
}
/* Reduce oversize default section padding on the home hero */
.home main section.hero-stack{ padding: 0; }

/* Tweak title rhythm and logo proportion for visual balance */
.home .hero-title .abbr{
  font-size: clamp(2.6rem, 7.8vw, 5rem);
  margin-bottom: .2rem;
}
.home .hero-title .long{
  font-size: clamp(1.2rem, 3.2vw, 1.6rem);
  letter-spacing: .02em;
  opacity: .9;
}
.home .logo-wrap{
  width: min(420px, 52vw);
  border-radius: 18px;
  box-shadow: 0 16px 28px rgba(0,0,0,.32);
}

/* Safety: if footer is hidden on some viewports, avoid over-centering */
@media (max-width: 700px){
  :root{ --footer-h: 96px; } /* slightly smaller on mobile */
  .home .logo-wrap{ width: min(360px, 64vw); }
}



/* === Equalize Projects cards (Datapacks & 3D Printing) === */
.itemgrid { align-items: stretch; }

/* Force the cards to the same height */
.card.dp-card {
  height: 120px;
  min-height: 120px;
}

/* Make right-side meta a vertical stack so elements land in the same positions */
.card.dp-card .meta {
  display: flex;
  flex-direction: column;
}

/* Keep title to one line for alignment */
.card.dp-card .meta .title {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

/* Keep chips on one line to prevent card height wobble */
.card.dp-card .meta .chips {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keep description to one line and lock it to the bottom for identical placement */
.card.dp-card .meta .quick {
  margin-top: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}



/* === Projects: normalize Datapack & 3D print cards === */

/* Unified sizing tokens for project cards */
:root {
  --proj-card-thumb: 92px;
  --proj-card-radius: 16px;
  --proj-card-gap: 1rem;
  --proj-grid-gap: 1.1rem;
  --proj-card-pad: 1rem;
  --proj-card-body-gap: 0.45rem;
  --proj-desc-lines: 2;
  /* Increased height by ~10% to give each card more breathing room */
  --proj-card-height: 132px;
  --proj-grid-cols: 3;
}

.itemgrid > .card.dp-card,
.itemgrid > .card.pr-card {
  position: relative;
  display: grid;
  grid-template-columns: var(--proj-card-thumb) 1fr;
  gap: var(--proj-card-gap);
  align-items: start;
  padding: var(--proj-card-pad);
  border-radius: var(--proj-card-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  height: var(--proj-card-height);
  box-sizing: border-box;
  transition: transform .12s ease, box-shadow .15s ease;
  overflow: hidden;
}

.itemgrid > .card.dp-card:hover,
.itemgrid > .card.pr-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(0,0,0,.28);
}

.itemgrid > .card.dp-card:focus-visible,
.itemgrid > .card.pr-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  box-shadow: var(--accent-glow);
}

.itemgrid > .card.dp-card .thumb,
.itemgrid > .card.pr-card .thumb {
  width: var(--proj-card-thumb);
  height: var(--proj-card-thumb);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(200px 120px at 30% 20%, rgba(26,77,255,.18), transparent 60%), #0b0b0f;
}

.itemgrid > .card.dp-card .thumb img,
.itemgrid > .card.pr-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.itemgrid > .card.dp-card .meta,
.itemgrid > .card.pr-card .meta {
  display: grid;
  gap: var(--proj-card-body-gap);
  min-width: 0;
}

.itemgrid > .card.dp-card .meta .title,
.itemgrid > .card.pr-card .meta .title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.itemgrid > .card.dp-card .chips,
.itemgrid > .card.pr-card .chips {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
  margin: 0;
}

.itemgrid > .card.dp-card .meta .quick,
.itemgrid > .card.pr-card .meta .quick,
.itemgrid > .card.pr-card .meta .muted {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--proj-desc-lines);
}

.itemgrid > .card.pr-card .meta .muted {
  font-size: .88rem;
}

.itemgrid { align-items: stretch; }
.itemgrid > * { width: 100%; box-sizing: border-box; }

/* Responsive layout for project cards */
.projects-page .itemgrid {
  display: grid;
  gap: var(--proj-grid-gap);
  grid-template-columns: repeat(var(--proj-grid-cols), minmax(0, 1fr));
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  justify-content: stretch;
  align-content: start;
}

@media (max-width: 960px) {
  .projects-page .itemgrid {
    --proj-grid-cols: 2;
  }
}

@media (max-width: 640px) {
  .projects-page .itemgrid {
    --proj-grid-cols: 1;
  }
}

.projects-page .itemgrid > .item {
  display: grid;
  grid-template-columns: var(--proj-card-thumb) 1fr;
  gap: var(--proj-card-gap);
  padding: var(--proj-card-pad);
  border-radius: var(--proj-card-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: start;
  height: var(--proj-card-height);
  transition: transform .12s ease, box-shadow .15s ease;
}

.projects-page .itemgrid > .item:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(0,0,0,.28);
}

.projects-page .itemgrid > .item .thumb {
  width: var(--proj-card-thumb);
  height: var(--proj-card-thumb);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(200px 120px at 30% 20%, rgba(26,77,255,.18), transparent 60%), #0b0b0f;
  border: 1px solid var(--border);
}

.projects-page .itemgrid > .item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.projects-page .itemgrid > .item > div:last-child {
  display: grid;
  gap: var(--proj-card-body-gap);
  min-width: 0;
}

.projects-page .itemgrid > .item .title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.projects-page .itemgrid > .item .muted {
  color: var(--muted);
  font-size: .92rem;
}

.projects-page .itemgrid > .item .actions {
  margin-top: 0.35rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.modal .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.modal .gallery img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}


/* === Added by release helper === */

/* === Language toggle === */
.lang-toggle {
  position: fixed; top: 12px; right: 12px; z-index: 1000;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px;
  padding: .4rem .7rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.lang-toggle:hover { box-shadow: 0 4px 18px rgba(0,0,0,.28); }

/* === Consent modal === */
.consent-modal { position: fixed; inset: 0; display: none; z-index: 10001; }
.consent-modal.show { display:block; }
.consent-backdrop { position:absolute; inset:0; background: rgba(0,0,0,.4); }
.consent-dialog { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  background: var(--surface); color: var(--text); border:1px solid var(--border); border-radius: 12px; width:min(560px, 90vw); box-shadow: 0 10px 40px rgba(0,0,0,.4);
}
.consent-head { display:flex; align-items:center; justify-content:space-between; gap:.5rem; padding: .9rem 1rem; border-bottom:1px solid var(--border); }
.consent-title { font-weight:700; font-size: 1.1rem; }
.consent-body { padding: 1rem; }
.consent-actions { display:flex; gap:.5rem; justify-content:flex-end; padding: .75rem 1rem 1rem; }
.consent-x { background: transparent; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }
.consent-remember { display:flex; align-items:center; gap:.5rem; margin-top:.75rem; }
.btn { background: var(--panel); color: var(--text); border:1px solid var(--border); border-radius: .6rem; padding: .5rem .8rem; cursor: pointer; }
.btn-primary { background: var(--accent); border-color: var(--accent-strong); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); }


/* === Footer layout === */
:root { --footer-h: 92px; } /* default; can be updated at runtime */

.btn-mini { background: var(--panel); color: var(--text); border:1px solid var(--border); border-radius: .5rem; padding:.3rem .55rem; cursor:pointer; font-size: .8rem; }
.btn-mini:hover { box-shadow: var(--accent-glow); border-color: var(--accent); }

footer#pageend {
  position: relative;
  margin-top: auto !important;
  z-index: 100;
}

footer#pageend .footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .75rem;
  padding: clamp(1rem, 1.8vw, 1.35rem) 0;
  border-top: 1px solid var(--border);
  font-size: clamp(.78rem, 1.6vw, .85rem);
  line-height: 1.35;
}

footer#pageend .f-left,
footer#pageend .f-right {
  color: var(--muted);
  font-weight: 500;
}
footer#pageend .f-left { justify-self: start; }
footer#pageend .f-center {
  justify-self: center;
  text-align: center;
  color: var(--muted);
  max-width: min(780px, 92vw);
  margin: 0 auto;
}
footer#pageend .f-right {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
footer#pageend .footer-note {
  margin: 0;
  color: inherit;
}

footer#pageend a { color: var(--muted); text-decoration: none; font-weight: 500; letter-spacing: .02em; }
footer#pageend a:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 720px) {
  footer#pageend .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: .9rem;
  }
  footer#pageend .f-left,
  footer#pageend .f-center,
  footer#pageend .f-right {
    justify-self: center;
  }
  footer#pageend .f-right {
    flex-direction: column;
    gap: .4rem;
  }
}

/* Support sticky footer layout */
html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > .viewport {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body > .viewport > main {
  flex: 1 1 auto;
}

footer#pageend {
  position: relative;
  margin-top: auto;
}

/* Hide any legacy bottom notice UI if present */
#bottomNotice { display: none !important; }

/* --- Legal pages: allow footer to follow full document height --- */
body.legal-page {
  min-height: 100vh;
}

body.legal-page > .viewport {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h, 68px));
}

body.legal-page > .viewport > main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}


/* === Legal pages === */
body.legal-page > .viewport {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  overflow: visible;
  min-height: calc(100vh - var(--header-h, 68px));
  padding: 0;
}
body.legal-page > .viewport > main {
  width: min(880px, 92%);
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 3.5rem) 0 clamp(3rem, 8vh, 4.6rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.8rem, 4vw, 2.6rem);
}
body.legal-page main section { padding: 0; }
.legal-panel {
  background: rgba(14, 20, 33, .88);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(1.6rem, 3.6vw, 2.4rem);
  box-shadow: 0 16px 32px rgba(0, 0, 0, .28);
  line-height: 1.48;
}
.legal-header {
  display: grid;
  gap: .75rem;
}
.legal-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 2.7rem);
}
.legal-lead {
  font-size: 1rem;
  color: var(--muted);
  margin: 0;
  max-width: 60ch;
}
.legal-meta,
.legal-updated {
  font-size: .92rem;
  color: var(--muted);
}
.legal-section {
  display: grid;
  gap: 1.2rem;
}
.legal-section > h2,
.legal-section > h3 {
  margin: 0;
  font-size: clamp(1.3rem, 2.3vw, 1.55rem);
}
.legal-columns {
  display: grid;
  gap: 1.1rem;
  align-items: start;
}
.legal-definition {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .8rem;
}
.legal-definition div {
  display: grid;
  gap: .25rem;
}
.legal-definition dt {
  margin: 0;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.legal-definition dd {
  margin: 0;
  font-size: 1.02rem;
  color: var(--text);
  overflow-wrap: anywhere;
  hyphens: auto;
}
.legal-section p {
  margin: 0 0 .85rem;
  line-height: 1.52;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.legal-section p:last-child,
.legal-definition div:last-child dd:last-child {
  margin-bottom: 0;
}
.legal-placeholder {
  color: var(--muted);
  font-style: italic;
}
.legal-note {
  margin: .4rem 0 0;
  padding: .9rem 1.1rem;
  border-radius: 14px;
  border: 1px dashed var(--border);
  background: rgba(255,255,255,.03);
  color: var(--muted);
}
.legal-points {
  margin: 0;
  padding-left: 1.3rem;
  display: grid;
  gap: .5rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.legal-points li {
  overflow-wrap: anywhere;
  hyphens: auto;
}
.legal-columns .legal-points {
  padding-left: 1.2rem;
}
body.legal-page .navbar {
  flex-wrap: wrap;
  justify-content: center;
  gap: .8rem;
}
body.legal-page footer#pageend .footer-grid {
  gap: .75rem;
}
body.legal-page footer#pageend,
body.legal-page footer#pageend * {
  font-family: "MIRL-Minecraft", monospace !important;
  letter-spacing: .02em;
}
body.legal-page footer#pageend a[aria-current="page"] {
  pointer-events: none;
  color: rgba(148, 163, 184, 0.9);
  text-decoration: none;
}
body.legal-page header.nav-min,
body.legal-page header.nav {
  position: sticky !important;
  top: 0;
  left: 0;
  right: 0;
  border-bottom: 1px solid var(--border);
  z-index: 18;
}
body.legal-page header.nav-min.see-through {
  background: transparent !important;
  backdrop-filter: none !important;
}
body.legal-page .viewport::before,
body.legal-page .viewport::after {
  display: none;
}
body.legal-page footer#pageend {
  position: static;
  margin-top: auto;
  background: transparent;
  backdrop-filter: none;
}
@media (min-width: 640px) {
  .legal-columns {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}
@media (min-width: 960px) {
  body.legal-page footer#pageend .footer-grid {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  body.legal-page footer#pageend .f-left {
    text-align: left;
  }
  body.legal-page footer#pageend .f-right {
    text-align: right;
  }
}