/* blahh.us shared theme, aligned with ForeverFlip's palette and page shell. */
:root {
  color-scheme: dark;
  --bg: #111318;
  --panel: #1a1d25;
  --panel-raised: #222630;
  --ink: #f7f4ee;
  --muted: #b9bec9;
  --line: rgba(255, 255, 255, .12);
  --ember: #ff5a2f;
  --gold: #f4bd50;
  --blue: #50c8e9;
  --page-width: 1160px;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font: 16px/1.65 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 0, rgba(255, 90, 47, .10), transparent 32rem),
    radial-gradient(circle at 88% 8%, rgba(80, 200, 233, .07), transparent 28rem),
    linear-gradient(145deg, #181a21, #0d0f14 58%, #151015);
  background-color: var(--bg);
}
main { flex: 1; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.shell { width: min(var(--page-width), calc(100% - 40px)); margin-inline: auto; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--gold);
  color: #151515;
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #151515; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: #0d0f14;
}
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: var(--ink); font-size: 1.25rem; font-weight: 850; letter-spacing: -.03em; text-decoration: none; }
.brand span { color: var(--ember); }
.brand:hover { color: var(--ink); }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav-links a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--ink); background: rgba(255, 255, 255, .08); }
.nav-links .external::after { content: " ↗"; color: var(--gold); }

/* Type */
h1, h2, h3 { margin: 0; font-weight: 850; }
h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); line-height: 1.02; letter-spacing: -.055em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.15; letter-spacing: -.035em; }
h3 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -.02em; }
p { margin: 0 0 14px; }
.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.lead { max-width: 600px; margin: 22px 0 0; color: #e1ddd4; font-size: clamp(1.02rem, 1.8vw, 1.15rem); }
.small { color: var(--muted); font-size: .88rem; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .05);
  color: var(--ink);
  font-weight: 750;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}
.button:hover { transform: translateY(-2px); border-color: var(--gold); color: var(--ink); }
.button.primary { border-color: transparent; background: var(--ember); color: #111318; font-weight: 850; }
.button.primary:hover { background: #ff744f; color: #111318; }

/* Hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  margin-top: 34px;
  padding: 48px;
  overflow: hidden;
  border: 1px solid #4b4334;
  border-radius: 20px;
  background: linear-gradient(130deg, #23242b, #171b22 62%, #1b1618);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .3);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 8% 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ember), transparent);
}
.hero > * { min-width: 0; }
.hero-art {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
}
.hero-art img { width: 100%; }
.hero-mark {
  display: grid;
  place-items: center;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: radial-gradient(circle at center, rgba(80, 200, 233, .12), rgba(255, 255, 255, .02) 68%);
}
.monogram {
  font-size: clamp(6rem, 14vw, 10rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.1em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(247, 244, 238, .88);
  text-shadow: 14px 18px 0 rgba(255, 90, 47, .45);
}

/* Sections and panels */
.section { margin-top: 56px; }
[id] { scroll-margin-top: 100px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px 24px; margin-bottom: 22px; }
.section-heading p:last-child { margin: 0; color: var(--muted); }
.panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

/* Project cards */
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.projects.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease;
}
.project:hover { transform: translateY(-3px); border-color: rgba(244, 189, 80, .55); color: var(--ink); }
.project.featured { border-color: rgba(255, 90, 47, .55); background: linear-gradient(155deg, #2a2023, var(--panel) 60%); }
.project-label { margin-bottom: 22px; color: var(--gold); font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.project h3 { margin-bottom: 10px; font-size: 1.35rem; }
.project h3 + p { margin: 0; color: var(--muted); font-size: .95rem; }
.project-cta { margin-top: auto; padding-top: 24px; color: var(--blue); font-size: .9rem; font-weight: 750; }
.project:hover .project-cta { color: var(--ink); }

/* Footer */
.site-footer { margin-top: 64px; padding-block: 24px 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: .83rem; }
.site-footer .shell { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* Legacy "page moved" landing */
.legacy { max-width: 640px; margin: 80px auto 0; text-align: center; }
.legacy .lead { margin-inline: auto; }
.legacy .actions { justify-content: center; }

/* Palworld Atlas */
.palworld-page .hero { grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.badge {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  color: #dce1e9;
  font-size: .82rem;
  font-weight: 750;
}
.emblem-wrap {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: radial-gradient(circle, rgba(255, 90, 47, .18), rgba(255, 255, 255, .02) 64%);
}
.emblem { width: 76%; height: 76%; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .48)); }
.packages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.package { display: flex; flex-direction: column; min-height: 310px; }
.package.recommended { border-color: rgba(255, 90, 47, .6); background: linear-gradient(155deg, #2a2023, var(--panel) 60%); }
.package-top { display: flex; justify-content: space-between; align-items: start; gap: 14px; margin-bottom: 24px; }
.file-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #68604b;
  border-radius: 9px;
  background: rgba(211, 170, 68, .06);
  color: var(--gold);
  font-size: .8rem;
  font-weight: 850;
}
.pick { color: var(--gold); font-size: .72rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.package h3 { margin-bottom: 10px; }
.package p { margin: 0; color: var(--muted); font-size: .95rem; }
.package-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 24px; color: #d5dae2; font-size: .85rem; }
.package .button { margin-top: 16px; width: 100%; }
.details { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; margin-top: 16px; }
.details h3 { margin-bottom: 12px; font-size: 1.08rem; }
.details ul { margin: 0; padding-left: 20px; color: var(--muted); }
.details li { margin-block: 6px; }
.details p { color: var(--muted); }
.text-link { font-weight: 750; }
kbd {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--panel-raised);
  color: var(--ink);
  font: 600 .85em/1.4 ui-monospace, Consolas, monospace;
}

@media (max-width: 960px) {
  .hero, .palworld-page .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 32px; }
  .hero-art, .hero-mark, .emblem-wrap { order: -1; width: min(520px, 100%); }
  .emblem-wrap { width: min(300px, 70%); }
  .projects, .packages { grid-template-columns: minmax(0, 1fr); }
  .projects.two { grid-template-columns: minmax(0, 1fr); }
  .project, .package { min-height: 0; }
  .details { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .shell { width: calc(100% - 28px); }
  .nav { min-height: 0; flex-direction: column; align-items: flex-start; gap: 6px; padding-block: 12px; }
  .nav-links { margin-left: -9px; }
  .nav-links a { padding: 7px 9px; font-size: .86rem; }
  .hero, .palworld-page .hero { margin-top: 20px; padding: 22px; }
  .hero-mark { min-height: 200px; }
  .section { margin-top: 40px; }
  .section-heading { flex-direction: column; align-items: flex-start; }
  .panel, .project { padding: 20px; }
  .actions .button { width: 100%; }
  .legacy { margin-top: 48px; }
  .site-footer .shell { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .project { transition: none; }
  .button:hover, .project:hover { transform: none; }
}
