/* ============================================================
   The Early Years — javaBin History
   Documentary-style single-page site
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: Georgia, "Times New Roman", Times, serif;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.3em;
}

h3 {
  font-size: 1.25rem;
  margin-top: 2.2em;
  margin-bottom: 0.5em;
  color: #333;
}

p {
  margin-bottom: 1.2em;
}

a {
  color: #7C4DFF;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

a:hover {
  border-bottom-color: #7C4DFF;
}

strong {
  font-weight: 700;
}

/* --- Layout --- */
.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Navigation --- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #eee;
  padding: 0.6rem 0;
}

nav .container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

nav .container::-webkit-scrollbar {
  display: none;
}

nav .nav-brand {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: #1a1a1a;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

nav a {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  color: #666;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: none;
  transition: color 0.2s;
}

nav a:hover {
  color: #7C4DFF;
  border-bottom: none;
}

/* --- Hero --- */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.hero-logo {
  display: block;
  margin: 0 auto 2rem;
  image-rendering: pixelated;
  opacity: 0.85;
}

.hero-overline {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #7C4DFF;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 3.2rem;
  margin-bottom: 0.4em;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.hero .subtitle {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  color: #555;
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.6;
  font-style: italic;
}

.hero-meta {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  color: #999;
  letter-spacing: 0.06em;
}

.hero-meta span {
  margin: 0 0.4em;
}

/* --- Sections --- */
section {
  padding: 4rem 0;
  border-bottom: 1px solid #eee;
}

section:last-of-type {
  border-bottom: none;
}

.section-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #7C4DFF;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.section-label::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #7C4DFF;
  border-radius: 50%;
  flex-shrink: 0;
}

/* --- Timeline elements --- */
.timeline {
  border-left: 2px solid #e0e0e0;
  padding-left: 1.8rem;
  margin: 2rem 0;
  position: relative;
}

.timeline-entry {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  left: -2.05rem;
  top: 0.35em;
  width: 10px;
  height: 10px;
  background: #7C4DFF;
  border-radius: 50%;
  border: 2px solid #fff;
}

.timeline-year {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #7C4DFF;
  letter-spacing: 0.04em;
  margin-bottom: 0.3em;
}

.timeline-entry p {
  margin-bottom: 0.6em;
}

/* --- Pull-quote --- */
.pull-quote {
  border-left: 4px solid #7C4DFF;
  padding: 1.2rem 0 1.2rem 1.5rem;
  margin: 2rem 0;
  font-size: 1.15rem;
  line-height: 1.6;
  color: #333;
  font-style: italic;
}

.pull-quote .attribution {
  display: block;
  font-style: normal;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.8rem;
  letter-spacing: 0.02em;
}

/* --- People cards --- */
.people-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 2rem 0;
}

.person-card {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 1.2rem 1rem;
}

.person-card .person-name {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.15em;
  color: #1a1a1a;
}

.person-card .person-role {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  color: #7C4DFF;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4em;
}

.person-card .person-detail {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 0;
}

.person-card.featured {
  grid-column: 1 / -1;
  background: #f8f5ff;
  border-color: #e8deff;
}

/* --- Data table --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9rem;
}

.data-table thead {
  font-family: system-ui, -apple-system, sans-serif;
}

.data-table th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  padding: 0.6rem 0.8rem;
  border-bottom: 2px solid #1a1a1a;
  font-weight: 600;
}

.data-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.data-table tbody tr:hover {
  background: #fafafa;
}

.data-table .highlight-row {
  background: #f8f5ff;
}

.data-table .year-cell {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 700;
  color: #7C4DFF;
  white-space: nowrap;
}

/* --- Nav evolution --- */
.nav-snapshot {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.8;
  color: #555;
  overflow-x: auto;
}

.nav-snapshot .snapshot-year {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7C4DFF;
  display: block;
  margin-bottom: 0.3em;
}

.nav-snapshot .new-item {
  color: #7C4DFF;
  font-weight: 700;
}

/* --- Stat callout --- */
.stat-row {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  flex: 1;
  min-width: 120px;
}

.stat-number {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stat-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  margin-top: 0.3em;
}

/* --- Source list --- */
.source-list {
  list-style: none;
  margin: 1.5rem 0;
}

.source-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.source-list li:last-child {
  border-bottom: none;
}

.source-type {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  margin-right: 0.5em;
}

/* --- Footer --- */
footer {
  padding: 3rem 0;
  text-align: center;
  background: #fafafa;
  border-top: 1px solid #eee;
}

footer p {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 0.4em;
}

footer a {
  color: #7C4DFF;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  .hero {
    padding: 4rem 0 3rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  section {
    padding: 3rem 0;
  }

  .people-grid {
    grid-template-columns: 1fr;
  }

  .stat-row {
    gap: 1rem;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .data-table {
    font-size: 0.8rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.4rem 0.5rem;
  }

  nav .container {
    gap: 1rem;
  }

  .pull-quote {
    font-size: 1.05rem;
    padding-left: 1rem;
  }
}

@media (max-width: 400px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .stat-row {
    flex-direction: column;
    align-items: center;
  }
}

/* --- Print --- */
@media print {
  nav {
    display: none;
  }

  .hero {
    padding: 2rem 0;
  }

  section {
    padding: 2rem 0;
    break-inside: avoid;
  }

  a {
    color: #1a1a1a;
  }
}
