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

* {
  margin: 0;
}

:root {
  --bg: #f8f5f2;
  --bg-secondary: #fffffe;
  --text: #222525;
  --text-heading: #232323;
  --primary: #078080;
  --primary-hover: #066a6a;
  --muted: #5a5a5a;
  --border: #e0dcd8;
}

html {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.4rem 0.7rem;
  background: var(--primary);
  color: #ffffff;
  border-radius: 4px;
  font-size: 0.9rem;
  transform: translateY(-150%);
  transition: transform 0.15s ease-out;
  z-index: 1000;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  max-width: 65ch;
  padding: 2rem;
  margin: 0 auto;
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--primary-hover);
  text-decoration-thickness: 2px;
}

.nav-left a,
.nav-links a {
  text-decoration: none;
}

.nav-left a:hover,
.nav-links a:hover {
  text-decoration: underline;
}

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

a:visited {
  color: var(--primary);
}

header nav {
  margin-bottom: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-heading);
}

.nav-left a:not(.nav-name) {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
}

.nav-left a:not(.nav-name):hover {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  color: var(--muted);
}

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

.nav-links svg {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}

h1, h2, h3, h4 {
  color: var(--text-heading);
  line-height: 1.3;
  margin: 2rem 0 1rem;
  font-weight: 600;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.2rem; }

p {
  margin: 0 0 1.2rem;
}

ul, ol {
  margin: 0 0 1.2rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.3rem;
}

article h1,
section h1 {
  margin-top: 0;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 6px;
  margin-bottom: 1rem;
}

article time {
  color: var(--primary);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
}

article .post-description {
  color: var(--muted);
  font-size: 1rem;
  font-style: italic;
  margin-bottom: 2rem;
}

article img.cover {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 0 2rem;
  border-radius: 6px;
}

section h2 {
  margin-top: 2.5rem;
}

section ul {
  list-style: none;
  padding: 0;
}

section ul li {
  margin-bottom: 0.9rem;
}

section ul li a {
  font-weight: 500;
}

section ul time {
  color: var(--muted);
  font-size: 0.9rem;
  margin-right: 1rem;
  font-family: monospace;
}

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

blockquote p:last-child {
  margin-bottom: 0;
}

pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  margin: 0 0 1.2rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

code {
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.9em;
  line-height: 1.4;
}

p code {
  background: var(--bg-secondary);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  color: var(--text-heading);
}

footer {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
}

footer p {
  margin-bottom: 0.5rem;
}

footer p:last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  body {
    padding: 1rem;
  }

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

  header nav {
    margin-bottom: 2rem;
  }

  section ul li {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }

  section ul time {
    margin-right: 0;
  }

  footer {
    padding: 1rem;
  }
}
