/* ============================================
   Craig Dsouza — minimalist blog
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&family=Inter:wght@400;500&display=swap');

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

/* --- Variables --- */
:root {
  --bg:        #FAF7ED;
  --text:      #1a1a1a;
  --muted:     #6b6b6b;
  --accent:    #8a4a0f;
  --border:    #e2ddd3;
  --max-width: 640px;
  --font-body: 'Newsreader', Georgia, serif;
  --font-ui:   'Inter', system-ui, sans-serif;
}

/* --- Layout --- */
html {
  font-size: 18px;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-body);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

main {
  flex: 1;
  padding: 0rem 0 5rem;
}

/* --- Nav --- */
header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 2rem;
}

.nav-home {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* --- Typography --- */
h1 {
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.25rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

strong { font-weight: 500; }
em { font-style: italic; }

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

li { margin-bottom: 0.35rem; }

blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--muted);
  font-style: italic;
}

code {
  font-family: 'Courier New', monospace;
  font-size: 0.875em;
  background: var(--border);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

pre {
  background: #f0ece0;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

hr + h2 {
  margin-top: 1rem;
}

img {
  max-width: 100%;
  border-radius: 4px;
}

/* --- Home page --- */
.home-intro {
  padding: 0rem 0 0rem;
}

.home-intro h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.home-intro p {
  color: var(--muted);
  font-size: 1.05rem;
}

.home-nav-list {
  list-style: none;
  padding: 0;
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.home-nav-list li a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.home-nav-list li a:hover {
  color: var(--accent);
}

.home-nav-list li a span {
  color: var(--muted);
  font-size: 0.82rem;
}

/* --- Post list --- */
.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  border-bottom: 1px solid var(--border);
}


.post-list-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  text-decoration: none;
  color: var(--text);
  transition: color 0.15s ease;
}

.post-list-link:hover {
  color: var(--accent);
}

.post-list-link:hover .post-thumb {
  opacity: 0.7;
}

.post-thumb {
  flex-shrink: 0;
  width: 120px;
  height: 80px;
  object-fit: contain;
  border-radius: 3px;
  transition: opacity 0.15s ease;
}

.post-list-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.post-list-title {
  font-size: 1rem;
  line-height: 1.4;
}

.post-description {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.post-meta {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.post-tags {
  display: inline-flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.tag {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.1em 0.5em;
}

/* --- Post page --- */
.post-header {
  margin-bottom: 2.5rem;
}

.post-header h1 {
  margin-bottom: 0.6rem;
}

.post-header .post-meta {
  font-size: 0.85rem;
}

.post-body {
  font-size: 1.05rem;
}

/* --- Page header --- */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin-bottom: 0.4rem;
}

.page-header p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* --- Resume page --- */
.resume-body {
  font-size: 1.05rem;
}

.resume-body .email-link {
  font-family: var(--font-ui);
  font-size: 0.9rem;
}

/* --- Empty state --- */
.empty-state {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  padding: 2rem 0;
}

/* --- Responsive --- */
@media (min-width: 1100px) {
  :root { --max-width: 800px; }
}

@media (max-width: 480px) {
  html { font-size: 17px; }
  h1 { font-size: 1.5rem; }
  .home-intro h1 { font-size: 1.6rem; }
}
