/* =========================================================
   justinbarak.com — stylesheet
   Design: timeless editorial, minimal, generous whitespace
   ========================================================= */

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

:root {
  --bg: #fafaf9;
  --bg-alt: #f4f3f1;
  --text: #1a1a18;
  --text-muted: #6b6b65;
  --accent: #4a6fa5;
  --accent-light: #e8eef6;
  --border: #e2e0db;
  --max-w: 680px;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-serif: 'Lora', Georgia, serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---- Layout ---- */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Hero ---- */

.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
}

.name {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.tagline {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.bio {
  font-size: 1.05rem;
  color: var(--text);
  max-width: 560px;
  line-height: 1.75;
}

/* ---- Sections ---- */

.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.section-intro {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.section-body {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 1.25rem;
  max-width: 600px;
}

.section-body:last-child {
  margin-bottom: 0;
}

/* ---- Projects ---- */

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.4rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(74, 111, 165, 0.08);
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  gap: 0.75rem;
}

.project-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.project-lang {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.2em 0.6em;
  border-radius: 3px;
  white-space: nowrap;
}

.project-desc {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.project-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
}

/* ---- Reading ---- */

.reading-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.reading-loading {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.reading-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.reading-cover {
  width: 52px;
  min-width: 52px;
  height: 78px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--border);
}

.reading-cover-placeholder {
  width: 52px;
  min-width: 52px;
  height: 78px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.reading-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.reading-shelf {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.reading-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.reading-title:hover {
  color: var(--accent);
}

.reading-author {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---- Contact ---- */

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 70px;
}

.contact-list a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.97rem;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.contact-list a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- Footer ---- */

.footer {
  padding: 2.5rem 0;
}

.footer p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---- Responsive ---- */

@media (max-width: 600px) {
  .hero {
    padding: 3rem 0 2.5rem;
  }

  .section {
    padding: 3rem 0;
  }

  .contact-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}
