/* Page layout for hamsterprojekt.github.io, on top of hamsterprojekt.css. */

body { font-size: 11pt; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.small { font-size: 0.9em; }

/* Header */
.hp-header { position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: var(--hp-space-3); color: var(--hp-text); }
.brand:hover { text-decoration: none; }
.hp-header nav { display: flex; flex-wrap: wrap; gap: var(--hp-space-4); margin-left: auto; }
.hp-header nav a { color: var(--hp-text); }
.hp-header nav a:hover { color: var(--hp-link); }
.theme { padding: 3px 9px; }

/* Hero */
.hero { background: var(--hp-surface); border-bottom: 1px solid var(--hp-border); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 48px;
  padding-bottom: 48px;
}
.hero h1 { font-size: 2.3em; margin-top: 0; }
.lead { font-size: 1.15em; }
.actions { display: flex; flex-wrap: wrap; gap: var(--hp-space-2); margin: var(--hp-space-5) 0; }
.actions .hp-button, p > .hp-button { padding: 8px 16px; }
.hp-button:hover { text-decoration: none; }

/* Mock widget popup */
.widget { padding: var(--hp-space-3); }
.widget-head { display: flex; justify-content: space-between; align-items: center; padding: 0 var(--hp-space-1) var(--hp-space-2); }
.elapsed { font-variant-numeric: tabular-nums; font-weight: 600; }
.fake-input {
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-s);
  padding: 5px 8px;
  margin-bottom: var(--hp-space-2);
  color: var(--hp-text-muted);
  background: var(--hp-surface-alt);
}
.widget .hp-totals { margin-top: var(--hp-space-3); }
.widget .hp-legend .total { margin-left: auto; font-weight: 600; }
.widget .hp-legend .total::before { display: none; }

/* Sections */
main > section { padding-top: 24px; padding-bottom: 24px; }
main > section.hero { padding: 0; }
.band { background: var(--hp-surface); border-top: 1px solid var(--hp-border); border-bottom: 1px solid var(--hp-border); margin: 24px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

pre {
  background: var(--hp-surface-alt);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-m);
  padding: var(--hp-space-3);
  overflow-x: auto;
  line-height: 1.5;
}
pre code { background: none; padding: 0; }
pre.file b { color: var(--hp-blue-strong); }
pre.file .c { color: var(--hp-text-muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--hp-space-4); margin: var(--hp-space-4) 0; }
.cards h3 { margin-top: 0; }
.repo { color: var(--hp-text); transition: border-color var(--hp-duration); }
.repo:hover { text-decoration: none; border-color: var(--hp-accent); }
.repo h3 { color: var(--hp-link); }

footer { border-top: 1px solid var(--hp-border); background: var(--hp-surface); margin-top: 24px; }
footer .hp-wordmark.small { font-size: 1em; }

@media (max-width: 780px) {
  .hero-grid, .two-col { grid-template-columns: 1fr; gap: 24px; }
  .hero h1 { font-size: 1.8em; }
  .hp-header nav { order: 3; width: 100%; margin-left: 0; gap: var(--hp-space-3); }
  .theme { margin-left: auto; }
}

pre.file { white-space: pre-wrap; font-size: 0.9em; }
