:root {
  --fg: #111418;
  --muted: #6a7280;
  --bg: #ffffff;
  --accent: #1a4ed8;
  --rule: #e6e8ec;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #eaecef;
    --muted: #8b93a0;
    --bg: #0f1114;
    --accent: #7ea8ff;
    --rule: #23262b;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

/* ── Page container ───────────────────────────────────────── */

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

/* ── Header / nav ─────────────────────────────────────────── */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fg);
}

.site-title:hover { text-decoration: none; }

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 1rem;
}

.site-nav a {
  color: var(--muted);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--fg);
  text-decoration: none;
}

.socials {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.socials a {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
}

.socials a:hover { color: var(--fg); text-decoration: none; }

.socials svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
}

/* ── Content ──────────────────────────────────────────────── */

main { padding-top: 2rem; }

.squirrel-track {
  width: 100%;
  overflow: hidden;
  margin-top: 3rem;
  padding-bottom: 1rem;
}

.squirrel-runner {
  display: inline-block;
  white-space: nowrap;
  animation: walk 14s linear infinite;
  will-change: transform;
}

@keyframes walk {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100vw); }
}

.squirrel-window {
  display: inline-block;
  overflow: hidden;
  height: 9.2em;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.15;
  color: var(--muted);
}

.squirrel-window pre {
  margin: 0;
  font: inherit;
  color: inherit;
  white-space: pre;
  animation: tennis 0.35s step-end infinite;
}

@keyframes tennis {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .squirrel-runner,
  .squirrel-window pre { animation: none; }
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.profile-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule);
}

.profile-header h1 { margin: 0; }
.profile-header .tagline { margin: 0; }

@media (max-width: 520px) {
  .profile-photo {
    width: 140px;
    height: 140px;
  }
}

h1 {
  font-size: 2.25rem;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.25rem;
  margin: 2.25rem 0 0.5rem;
  font-weight: 700;
}

.tagline {
  color: var(--muted);
  margin: 0 0 2rem;
  font-size: 1.05rem;
}

.tagline-flags {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.35rem;
  vertical-align: -0.15em;
}

.tagline-flags svg {
  height: 0.95em;
  width: auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  display: block;
}

p { margin: 0.75rem 0; }

ul { padding-left: 1.25rem; margin: 0.5rem 0; }

.links {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

/* ── Entry list (observations + projects) ─────────────────── */

.entry-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 3rem;
}

.entry {
  display: grid;
  gap: 0.5rem;
}

.entry-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.entry-title {
  font-size: 1.9rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}

.entry-title a { color: var(--fg); }
.entry-title a:hover { color: var(--accent); text-decoration: none; }

.entry-summary {
  color: var(--fg);
  margin: 0.25rem 0 0;
}

.entry-tags {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.empty-state {
  color: var(--muted);
  font-style: italic;
  padding: 2rem 0;
}

/* ── Footer ───────────────────────────────────────────────── */

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Mobile tweaks ────────────────────────────────────────── */

@media (max-width: 480px) {
  h1 { font-size: 1.9rem; }
  .entry-title { font-size: 1.5rem; }
  .site-nav { gap: 1rem; }
}
