:root {
  --ink: #1a1a1a;
  --ink-soft: #6b6b6b;
  --paper: #ffffff;
  --americana-red: #ff6b6b;
  --americana-blue: #6b9fff;
}

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

html, body {
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
}

/* ── Logo ── */
header {
  position: fixed;
  top: 28px;
  left: 32px;
  z-index: 100;
  pointer-events: none;
}
.logo-link {
  display: block;
  width: 44px;
  height: 44px;
  pointer-events: auto;
}
#logoShape {
  display: block;
  width: 100%;
  height: 100%;
}
#logoShape polygon {
  fill: #f0f0f0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

/* ── Panels ── */
.panels {
  display: flex;
  width: 100vw;
  height: 100vh;
}

.panel {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  background-color: var(--panel-color);
  transition: flex 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              background-color 0.55s ease,
              filter 0.55s ease;
  overflow: hidden;
  cursor: pointer;
}

/* subtle top-to-bottom shade for depth */
.panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(0,0,0,0.12) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ── Hover behaviour ──
   Hovered panel grows; all others become darker shades of the
   colour currently being hovered (via --dimmed-color set in JS) */
.panels:has(.panel:hover) .panel:not(:hover) {
  background-color: var(--dimmed-color, var(--panel-color));
  filter: brightness(0.22) saturate(0.7);
}

.panels:has(.panel:hover) .panel:hover {
  flex: 1.7;
}

/* ── Panel content ── */
.panel-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 92%;
  transform: translateY(0);
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.panel:hover .panel-content {
  transform: translateY(-8px);
}

.panel .index {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.panel h1 {
  font-weight: 500;
  font-size: clamp(1.5rem, 2.6vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #ffffff;
  margin-bottom: 22px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.25);
  transition: color 0.35s ease, letter-spacing 0.35s ease;
}

/* ── Details card ── */
.panel .details {
  background: rgba(8, 8, 8, 0.9);
  padding: 18px 22px;
  max-width: 340px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease 0.08s, transform 0.45s ease 0.08s;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.06);
}

.panel:hover .details {
  opacity: 1;
  transform: translateY(0);
}

.panel .blurb {
  font-size: 0.84rem;
  line-height: 1.6;
  color: #dcdcdc;
  margin: 0;
}

.panel .read {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  color: #ffffff;
  text-transform: uppercase;
}

/* ── Special article effects ── */

/* Americana flicker */
@keyframes flagFlicker {
  0%, 45%   { color: var(--americana-red); }
  50%, 95%  { color: var(--americana-blue); }
  100%      { color: var(--americana-red); }
}
.panel.americana:hover h1 {
  animation: flagFlicker 0.9s steps(1, end) infinite;
}

/* Insanity shake */
@keyframes titleShake {
  0%   { transform: translate(0,0) rotate(0deg); }
  20%  { transform: translate(-1.5px,1px) rotate(-0.6deg); }
  40%  { transform: translate(1.5px,-1px) rotate(0.6deg); }
  60%  { transform: translate(-1px,1.5px) rotate(-0.5deg); }
  80%  { transform: translate(1px,-1px) rotate(0.5deg); }
  100% { transform: translate(0,0) rotate(0deg); }
}
.panel.insanity:hover h1 {
  display: inline-block;
  animation: titleShake 1.4s ease-in-out infinite;
  text-shadow: 0 0 14px rgba(0,0,0,0.6);
}