/* netrinomike.com — Michael Barr personal site */

:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-hover: #1c2128;
  --text: #e6edf3;
  --text-dim: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
  --accent-warm: #d2a8ff;
  --border: #30363d;
  --max-width: 900px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

/* -- Layout -- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--border); }

/* -- Hero -- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 100px 24px 72px;
  background: linear-gradient(180deg, #0d1117 0%, #131920 100%);
}

.hero-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  margin-bottom: 28px;
  background: var(--bg-card);
}

.hero-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 3px solid var(--border);
  margin-bottom: 28px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 3rem;
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.hero .tagline {
  font-size: 1.15rem;
  color: var(--text-dim);
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.social-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.social-links a {
  color: var(--text-dim);
  transition: color 0.2s, transform 0.15s;
  display: flex;
}

.social-links a:hover {
  color: var(--text);
  transform: translateY(-2px);
}

.social-links svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* -- Section headings -- */
section h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 32px;
  color: var(--text);
}

/* -- About -- */
.about p {
  max-width: 720px;
  margin-bottom: 16px;
  color: var(--text-dim);
  line-height: 1.8;
}

.about p strong { color: var(--text); }

.about .cv-link {
  margin-top: 8px;
}

/* -- Books grid -- */
.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 8px;
}

.book-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 20px;
  text-align: center;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.book-card:hover {
  background: var(--bg-hover);
  transform: translateY(-3px);
  border-color: var(--accent);
}

.book-card img {
  width: 140px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  margin-bottom: 16px;
}

.book-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}

.book-card .book-pub {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.book-card .book-link {
  font-size: 0.85rem;
  margin-top: auto;
}

/* -- Highlights -- */
.highlights-list {
  list-style: none;
  max-width: 720px;
}

.highlights-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: var(--text-dim);
  line-height: 1.6;
}

.highlights-list li:last-child { border-bottom: none; }

.highlights-list .hl-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--accent);
  fill: currentColor;
}

.highlights-list strong { color: var(--text); }

/* -- Connect -- */
.connect-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 600px;
}

.connect-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: background 0.2s, border-color 0.2s;
  color: var(--text);
}

.connect-link:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--text);
}

.connect-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: currentColor;
  color: var(--text-dim);
}

.connect-link:hover svg { color: var(--accent); }

.connect-label {
  font-size: 0.95rem;
  font-weight: 500;
}

.connect-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* -- Footer -- */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* -- Responsive -- */
@media (max-width: 700px) {
  .hero { padding: 72px 24px 56px; }
  .hero h1 { font-size: 2rem; }
  .books-grid { grid-template-columns: 1fr; max-width: 300px; margin: 8px auto 0; }
  .connect-grid { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
}
