/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Base */
:root {
  --text:    #1a1a1a;
  --muted:   #666;
  --border:  #ddd;
  --bg:      #fff;
  --max-w:   720px;
}

html { font-size: 16px; }

body {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  padding: 0 1rem;
}

/* Links */
a { color: var(--text); }
a:hover { text-decoration: none; }

/* Header */
header {
  max-width: var(--max-w);
  margin: 2rem auto 0;
  display: flex;
  align-items: baseline;
  gap: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.site-name {
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
}

nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
}

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

nav a:hover,
nav a.active {
  color: var(--text);
}

/* Main */
main {
  max-width: var(--max-w);
  margin: 2.5rem auto 4rem;
}

/* Headings */
h1 {
  font-size: 1.5rem;
  font-weight: normal;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1rem;
  font-family: system-ui, sans-serif;
  font-weight: bold;
  color: var(--muted);
  margin: 2rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p { margin-bottom: 1rem; }

/* Year switcher */
.year-nav {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
}

.year-nav a { color: var(--muted); text-decoration: none; }
.year-nav a:hover { color: var(--text); }
.year-active { color: var(--text); font-weight: bold; }

/* Item list (goals, books, projects) */
ul.item-list {
  list-style: none;
  border-top: 1px solid var(--border);
}

ul.item-list li {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.meta {
  min-width: 3rem;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  padding-top: 0.1rem;
  flex-shrink: 0;
}

.item-body { flex: 1; }

/* Progress tracker */
.tracker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.6rem;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  vertical-align: middle;
}

.tracker-count {
  white-space: nowrap;
}

.tracker-bar {
  display: inline-block;
  width: 80px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.tracker-fill {
  display: block;
  height: 100%;
  background: var(--text);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Best time */
.best-time {
  margin-left: 0.6rem;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
}

.best-time--empty {
  font-style: italic;
}

li.done .item-body {
  color: var(--muted);
  text-decoration: line-through;
}

/* Rating stars */
.rating {
  color: var(--muted);
  font-size: 0.8rem;
}

/* Table (races) */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  font-family: system-ui, sans-serif;
}

thead th {
  text-align: left;
  padding: 0.4rem 0.75rem 0.4rem 0;
  border-bottom: 1px solid var(--text);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tbody tr {
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  vertical-align: top;
}

tbody tr:hover {
  background: #f9f9f9;
}

/* Intro */
.intro h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.intro p   { color: var(--muted); }

/* Footer */
footer {
  max-width: var(--max-w);
  margin: 0 auto 2rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
}
