/*
 * MIT License
 * Minimal CSS for Piyush Acharya's personal site
 * Sophisticated, barebones design
 */

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
  font-size: 16px;
}

/* Container */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  padding: 2rem 0 1rem;
  border-bottom: 1px solid #eee;
  margin-bottom: 3rem;
}

nav {
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: #666;
  font-size: 14px;
  text-transform: lowercase;
}

nav a:hover {
  color: #000;
}

/* Main content */
main {
  margin-bottom: 4rem;
}

/* Name on homepage */
.name {
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: 1rem;
  color: #000;
  letter-spacing: -0.02em;
}

/* Hero */
.hero {
  font-size: 1rem;
  line-height: 1.7;
  color: #555;
  margin-bottom: 3rem;
}

.hero strong {
  font-weight: 500;
  color: #000;
}

/* Section content */
.section-content h1 {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 2rem;
  color: #000;
}

.section-content h2 {
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: #000;
  margin-top: 2rem;
}

.section-content h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #000;
}

.section-content p {
  margin-bottom: 1rem;
  color: #555;
}

/* Research panels */
.research-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.research-panel {
  border: 1px solid #eee;
  padding: 1.5rem;
  position: relative;
}

.research-panel h3 {
  margin-bottom: 1rem;
}

.research-hash {
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 0.7rem;
  color: #ccc;
}

/* Community grid */
.community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.community-item {
  padding: 1.5rem;
  border: 1px solid #eee;
}

.community-item h3 {
  margin-bottom: 0.5rem;
}

.community-item .stats {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.75rem;
}

/* Teaching list */
.teach-list {
  list-style: none;
  margin: 2rem 0;
}

.teach-list li {
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  position: relative;
}

.teach-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: #ccc;
}

.teach-list strong {
  font-weight: 500;
}

/* Books */
.books-grid {
  margin: 2rem 0;
}

.book-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f5f5f5;
}

.book-item:last-child {
  border-bottom: none;
}

.book-item h3 {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.book-author {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* Blog posts */
.post-list {
  list-style: none;
  margin: 2rem 0;
}

.post-list li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f5f5f5;
}

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

.post-date {
  color: #999;
  font-size: 0.85rem;
  min-width: 80px;
  font-variant-numeric: tabular-nums;
}

.post-title {
  font-weight: 400;
  color: #000;
}

.post-title:hover {
  text-decoration: underline;
}

/* Code */
pre {
  background: #f8f8f8;
  color: #333;
  padding: 1rem;
  border: 1px solid #eee;
  overflow-x: auto;
  margin: 1rem 0;
  font-size: 0.85rem;
}

code {
  font-family: 'SF Mono', Consolas, monospace;
}

p code, li code {
  background: #f0f0f0;
  padding: 0.2rem 0.4rem;
  font-size: 0.85rem;
  color: #666;
}

/* Links */
a {
  color: #000;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  border-top: 1px solid #eee;
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.footer-links a {
  color: #999;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: #000;
}

/* Email obfuscation */
.email-link {
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  
  nav {
    justify-content: center;
    gap: 1.5rem;
  }
  
  .name {
    font-size: 1.75rem;
  }
  
  .research-grid,
  .community-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .post-list li {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .post-date {
    min-width: auto;
  }
}