@font-face {
  font-family: 'Pricedown';
  src: url('https://cdn.jsdelivr.net/gh/StefanoMartella/pricedown-font@main/pricedown.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/StefanoMartella/pricedown-font@main/pricedown.woff') format('woff'),
       url('https://cdn.jsdelivr.net/gh/StefanoMartella/pricedown-font@main/pricedown.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #b9bdc3;
  --bg-2: #aeb2b9;
  --surface: #c9cdd2;
  --surface-2: #d2d6da;
  --surface-3: #dcdfe3;
  --border: #9ba0a7;
  --border-soft: #b0b5bb;
  --text: #1a1d20;
  --text-soft: #3f444a;
  --text-mute: #6a7077;
  --accent: #343a40;
  --accent-hover: #1d2126;
  --shadow-sm: 0 1px 2px rgba(20,22,25,.10);
  --shadow-md: 0 4px 14px rgba(20,22,25,.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               'Trebuchet MS', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 400;
  color: var(--text);
  background: #c2c6cc;
  background-image: linear-gradient(180deg, #c8ccd2 0%, #b8bcc3 100%);
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
  align-items: center;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

header {
  width: 100%;
  background: rgba(210, 214, 218, 0.85);
  border-bottom: 1px solid var(--border);
  padding: 24px 32px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

header h1 {
  font-family: 'Trebuchet MS', 'Inter', -apple-system, BlinkMacSystemFont,
               'Segoe UI', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: #14171a;
}

header h1 a {
  color: inherit;
  border-bottom: none;
}

header h1 a:hover {
  color: var(--accent-hover);
  border-bottom: none;
}

header h1 span {
  color: var(--text-mute);
  font-weight: 300;
}

header .subtitle {
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

.container {
  width: 100%;
  max-width: 900px;
  margin: 32px auto 48px;
  background: rgba(219, 222, 226, 0.82);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 40px 48px 48px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

nav {
  text-align: center;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 20px;
}

nav ul li a {
  font-family: 'Trebuchet MS', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  padding: 6px 16px;
  border-radius: 18px;
  background: var(--surface-3);
  border: 1px solid var(--border-soft);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  letter-spacing: -0.01em;
}

nav ul li a:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

nav ul li a.active {
  background: var(--accent);
  color: #eef0f2;
  border-color: var(--accent-hover);
}

nav ul li a.active:hover {
  background: var(--accent-hover);
  color: #fff;
}

h2 {
  font-family: 'Trebuchet MS', 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #14171a;
  margin: 36px 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
  text-align: center;
}

h2 .hash {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-mute);
  font-weight: 400;
  margin-right: 4px;
}

.section-title {
  font-family: 'Pricedown', 'Anton', 'Trebuchet MS', Impact, sans-serif;
  font-size: 54px;
  font-weight: normal;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: #14171a;
  margin: 0 0 24px;
  padding-bottom: 16px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  position: relative;
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
}

.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  height: 2px;
  width: 90px;
  background: var(--accent);
  border-radius: 1px;
}

.section-title .num {
  color: var(--text-mute);
  transition: color .2s ease;
}

.section-title .label {
  color: #14171a;
}

.section-block:hover .section-title .num {
  color: var(--accent);
}

.author {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 14px 18px;
  margin: 20px 0 16px;
  transition: box-shadow .2s ease, border-color .2s ease;
}

.author:hover {
  box-shadow: var(--shadow-sm);
  border-left-color: var(--accent-hover);
}

.author .avatar {
  width: 44px;
  height: 44px;
  background: #bfc3c9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Pricedown', 'Anton', sans-serif;
  font-size: 22px;
  color: #4a5158;
  flex-shrink: 0;
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.08);
}

.author .name {
  font-family: 'Trebuchet MS', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #14171a;
}

.author .role {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 1px;
}

.mono {
  font-family: 'JetBrains Mono', 'BlinkMacSystemFont', 'SF Mono',
               'Menlo', 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.7;
  background: var(--surface-3);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 16px 20px;
  white-space: pre-wrap;
  color: #1f2329;
  margin: 16px 0 12px;
  position: relative;
  transition: background .2s ease;
}

.mono::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #9096 9d;
  background: #90969d;
  border-radius: 4px 0 0 4px;
  transition: background .2s ease;
}

.mono:hover {
  background: var(--surface-2);
}

.mono:hover::before {
  background: var(--accent);
}

.mono .ts {
  color: var(--text-mute);
  font-weight: 500;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 28px 0 12px;
}

.card {
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 24px 26px;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
  color: var(--text);
  text-align: center;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
  color: var(--text);
}

.card .card-num {
  font-family: 'Pricedown', 'Anton', sans-serif;
  font-size: 38px;
  line-height: 1;
  color: var(--text-mute);
  display: block;
  margin-bottom: 8px;
  transition: color .2s ease;
}

.card:hover .card-num {
  color: var(--accent);
}

.card .card-title {
  font-family: 'Pricedown', 'Anton', sans-serif;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: #14171a;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.card .card-desc {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.6;
}

p {
  margin: 12px 0 16px;
  text-align: center;
}

.note {
  font-size: 12.5px;
  color: var(--text-mute);
  font-style: italic;
  text-align: center;
}

.back-link {
  display: block;
  width: fit-content;
  margin: 32px auto 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  border-bottom: none;
  padding: 7px 16px;
  border-radius: 18px;
  background: var(--surface-3);
  border: 1px solid var(--border-soft);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.back-link:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
  border-bottom: none;
}

footer {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-mute);
  padding: 16px 20px 40px;
  letter-spacing: 0.01em;
}

footer .sep {
  display: inline-block;
  margin: 0 8px;
  color: var(--border);
}

@media (max-width: 640px) {
  header { padding: 20px 20px 16px; }
  header h1 { font-size: 20px; }
  .container { padding: 28px 20px 32px; margin: 20px 12px 32px; }
  h2 { font-size: 18px; }
  .section-title { font-size: 34px; gap: 12px; }
  .section-title .num { font-size: 34px; }
  .card .card-title { font-size: 24px; }
  .card .card-num { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
