:root {
  --bg: #ffffff;
  --surface: #fcf9f6;
  --text: #333333;
  --muted: #777777;
  --border: #cccccc;
  --link: #0b42a8;
}

body.dark {
  --bg: #121212;
  --surface: #1b1b1b;
  --text: #e8e8e8;
  --muted: #b0b0b0;
  --border: #3a3a3a;
  --link: #7fb0ff;
}

body {
  font-family: Monospace;
  line-height: 1.6;
  background-color: var(--bg);
  margin: 0;
  padding: 0;
  color: var(--text);
}

.container {
  max-width: 600px;
  margin: auto;
  padding: 4rem;
  background: var(--surface);
}

header {
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.header-flex {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  text-align: left;
}

.header-text {
  flex: 1;
  min-width: 200px;
}

.quote-box {
  text-align: center;
  margin: 0.5rem auto 0.5rem;
  max-width: 600px;
  color: var(--muted);
}

.quote {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.2;
}

.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

nav a {
  margin: 0 0.5rem;
  text-decoration: none;
  color: var(--link);
}

nav a:hover {
  text-decoration: underline;
}

nav button {
  margin-left: 0.75rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-family: Monospace;
  font-size: 0.8rem;
  cursor: pointer;
}

nav button:hover {
  border-color: var(--link);
}

section {
  margin-top: 2rem;
}

.cv-list {
  display: grid;
  grid-template-columns: 120px 120px 1fr;
  column-gap: 1.0rem;
  row-gap: 0.35rem;
}

.cv-year {
  font-weight: bold;
}

.cv-location {
  font-weight: left;
}

.cv-item {
  text-align: left;
}

h1, h2 {
  color: var(--link);
  font-family: "Quantico", sans-serif;
}

footer {
  position: relative;
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 2px solid var(--border);
}

/* Lane constrained to the footer divider width */
.runner-lane {
  --run-duration: 15s;
  --runner-size: 30px;
  --runner-overshoot: 60px;
  position: absolute;
  left: 0;
  right: 0;
  top: -28px;
  height: 38px;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.runner-gif,
.frisbee-gif {
  height: auto;
  position: absolute;
}

.runner-gif {
  --sprite-size: var(--runner-size);
  width: var(--runner-size);
  left: calc(-1 * (var(--sprite-size) + var(--runner-overshoot)));
  animation: run-runner var(--run-duration) linear infinite;
}

.frisbee-gif {
  --frisbee-size: 15px;
  --sprite-size: var(--frisbee-size);
  --lead-start: 40px;
  --lead-end: 15px;
  width: var(--frisbee-size);
  top: 5px;
  left: calc(-1 * (var(--sprite-size) + var(--runner-overshoot)) + var(--lead-start));
  animation: run-frisbee var(--run-duration) linear infinite;
  z-index: 3;
}

@keyframes run-runner {
  from {
    left: calc(-1 * (var(--sprite-size) + var(--runner-overshoot)));
  }
  to {
    left: calc(100% + var(--runner-overshoot));
  }
}

@keyframes run-frisbee {
  from {
    left: calc(-1 * (var(--sprite-size) + var(--runner-overshoot)) + var(--lead-start));
  }
  to {
    left: calc(100% + var(--runner-overshoot) + var(--lead-end));
  }
}
