/*
 * andrewchemis.dev
 * Minimal, fast-loading styles
 * Inspired by All Things Distributed
 */

:root {
  --text-color: #353535;
  --link-color: #1a5f7a;
  --link-hover: #0d3d4f;
  --bg-color: #fff;
  --border-color: #e0e0e0;
  --muted-color: #666;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
    sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  max-width: 70ch;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 2rem;
}
h2 {
  font-size: 1.5rem;
}
h3 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Header & Navigation */
header {
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

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

.site-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
}

.site-title:hover {
  color: var(--link-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

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

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

/* Main Content */
main {
  margin-bottom: 3rem;
}

section {
  margin-bottom: 3rem;
}

.intro {
  margin-bottom: 3rem;
}

.intro h1 {
  margin-top: 0;
}

/* Featured Article */
.featured article {
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 4px;
}

.featured time {
  display: block;
  font-size: 0.875rem;
  color: var(--muted-color);
  margin-bottom: 0.5rem;
}

.featured h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* Post & Project Lists */
.post-list,
.project-list {
  list-style: none;
  padding: 0;
}

.post-list li,
.project-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.post-list li:last-child,
.project-list li:last-child {
  border-bottom: none;
}

.post-list time {
  display: inline-block;
  width: 6rem;
  font-size: 0.875rem;
  color: var(--muted-color);
  font-family: ui-monospace, 'SF Mono', Menlo, Monaco, monospace;
}

/* Footer */
footer {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--muted-color);
}

footer p {
  margin-bottom: 0.5rem;
}

footer a {
  color: var(--muted-color);
}

footer a:hover {
  color: var(--text-color);
}

/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 1.5rem 1rem;
  }

  nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    gap: 1rem;
  }

  .post-list time {
    display: block;
    width: auto;
    margin-bottom: 0.25rem;
  }
}

/* Print styles */
@media print {
  body {
    max-width: none;
    padding: 0;
  }

  a {
    color: var(--text-color);
  }

  header,
  footer {
    border: none;
  }
}
