/* Becoming an Engineer - minimal theme. Light, readable, mobile friendly. */

:root {
  --bg: #ffffff;
  --text: #262626;
  --muted: #737373;
  --line: #e8e8e8;
  --accent: #1d4ed8;
  --code-bg: #f4f4f4;
  --badge-bg: #fef3c7;
  --badge-text: #92400e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */

header.site {
  border-bottom: 1px solid var(--line);
  padding: 1.4rem 0 1.2rem;
  margin-bottom: 2.5rem;
}

header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.site-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

nav a {
  margin-right: 1.1rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
}

nav a:last-child {
  margin-right: 0;
}

nav a:hover,
.site-title:hover {
  color: var(--accent);
}

/* Body text */

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

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

h1, h2, h3 {
  line-height: 1.3;
  margin: 1.8em 0 0.6em;
}

h1 {
  font-size: 1.9rem;
  margin-top: 0.4em;
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1.2rem;
}

.tagline {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

time {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Post list on the home page */

.post-list article {
  margin-bottom: 2.2rem;
}

.post-list h2 {
  margin: 0 0 0.15rem;
  font-size: 1.35rem;
}

.post-list h2 a {
  color: var(--text);
  text-decoration: none;
}

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

.post-list p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

/* Single post */

.post h1 {
  margin-bottom: 0.2rem;
}

.post time {
  display: block;
  margin-bottom: 1.6rem;
}

/* Placeholder badge */

.badge {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--badge-bg);
  color: var(--badge-text);
  padding: 0.15em 0.65em;
  border-radius: 999px;
  white-space: nowrap;
}

/* Code, quotes, images */

pre {
  background: var(--code-bg);
  padding: 1rem 1.1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.92rem;
  line-height: 1.6;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

p code,
li code {
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

blockquote {
  border-left: 3px solid var(--line);
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  color: var(--muted);
}

blockquote p {
  margin: 0.5rem 0;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

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

ul, ol {
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.35rem;
}

/* Footer */

footer.site {
  border-top: 1px solid var(--line);
  margin-top: 3.5rem;
  padding: 1.4rem 0 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Small screens */

@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.6rem;
  }
}
