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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a1a;
  background: #f8f8f6;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Fade in */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

main {
  max-width: 740px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  animation: fadeIn 0.4s ease-out;
}

/* Layout */

nav {
  max-width: 740px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s;
}

nav a:hover {
  color: #0d9488;
}

.nav-name {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.88rem;
  color: #6b7280;
  letter-spacing: 0.01em;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover {
  color: #1a1a1a;
}

.nav-links a.active {
  color: #1a1a1a;
  border-bottom-color: #0d9488;
}

footer {
  max-width: 740px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
  border-top: 1px solid #e5e7eb;
}

footer .social {
  justify-content: center;
  margin-top: 0;
}

footer .social a {
  color: #9ca3af;
}

footer .social a:hover {
  color: #0d9488;
}

/* Typography */

h1, h2, h3 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #111;
}

h1 { font-size: 2.4rem; margin-bottom: 1rem; }
h2 { font-size: 1.4rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.15rem; margin-top: 2rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1.1rem; }

a {
  color: #0d9488;
  text-decoration: underline;
  text-decoration-color: rgba(13, 148, 136, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s, color 0.2s;
}

a:hover {
  text-decoration-color: #0d9488;
}

hr {
  border: none;
  height: 1px;
  background: #e5e7eb;
  margin: 2.5rem 0;
}

/* Hero */

.hero {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 0;
}

.hero .bio p:last-child {
  margin-bottom: 0;
}

.avatar {
  display: block;
  width: 264px;
  flex-shrink: 0;
}

/* Bio */

.bio {
  margin-bottom: 0;
}

.bio p {
  font-size: 1.2rem;
  line-height: 1.7;
  color: #374151;
}

.bio strong {
  color: #111;
}

/* Social icons */

.social {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: #9ca3af;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
}

.social a:hover {
  color: #0d9488;
  background: rgba(13, 148, 136, 0.06);
}

.social svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* Post lists */

.post-list {
  list-style: none;
}

.post-list li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 0.5rem 0.5rem;
  margin: 0 -0.5rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.post-list li:hover {
  background: rgba(13, 148, 136, 0.04);
}

.post-list a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s;
}

.post-list li:hover a {
  color: #0d9488;
}

.post-list time {
  color: #9ca3af;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 5.5rem;
}

.year-group {
  margin-bottom: 2.5rem;
}

.year-group h2 {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.read-time {
  color: #d1d5db;
  font-size: 0.8rem;
  margin-left: auto;
}

.all-posts {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: #0d9488;
  text-decoration: none;
  font-weight: 500;
  transition: gap 0.2s;
}

.all-posts:hover {
  gap: 0.6rem;
}

/* Post page */

.post-header {
  margin-bottom: 2.5rem;
}

.post-header h1 {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}

.post-meta {
  color: #9ca3af;
  font-size: 0.85rem;
}

.post-content h2 { margin-top: 3rem; }
.post-content h3 { margin-top: 2rem; }
.post-content p { color: #374151; }

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.post-content blockquote {
  border-left: 2px solid #0d9488;
  padding-left: 1.25rem;
  margin: 2rem 0;
  color: #6b7280;
  font-style: italic;
}

.post-content blockquote p {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.1rem;
}

.post-content ul, .post-content ol {
  margin: 1.25rem 0;
  padding-left: 1.5rem;
  color: #374151;
}

.post-content li {
  margin-bottom: 0.4rem;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.post-content th, .post-content td {
  padding: 0.6rem 0.75rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.post-content th {
  background: #f5f5f5;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

/* Code */

code {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', Menlo, monospace;
  font-size: 0.85em;
  background: #f0f0f0;
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre {
  background: #1a1a1a;
  color: #e5e7eb;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.highlight pre {
  background: #1a1a1a;
}

/* Rouge syntax highlighting — dark theme */
.highlight .k, .highlight .kd, .highlight .kn,
.highlight .kp, .highlight .kr, .highlight .kt { color: #c792ea; }
.highlight .s, .highlight .s1, .highlight .s2,
.highlight .sh, .highlight .si, .highlight .sx { color: #c3e88d; }
.highlight .sa { color: #89ddff; }
.highlight .nb, .highlight .bp { color: #82aaff; }
.highlight .nf, .highlight .nx { color: #82aaff; }
.highlight .nc, .highlight .nn { color: #ffcb6b; }
.highlight .o, .highlight .ow { color: #89ddff; }
.highlight .p { color: #e5e7eb; }
.highlight .c, .highlight .c1, .highlight .cm,
.highlight .ch, .highlight .cs { color: #697098; font-style: italic; }
.highlight .mi, .highlight .mf,
.highlight .mh, .highlight .mo { color: #f78c6c; }
.highlight .na { color: #ffcb6b; }

/* Responsive */

@media (max-width: 480px) {
  h1 { font-size: 1.8rem; }
  .post-header h1 { font-size: 1.8rem; }
  nav { padding: 1.5rem 1rem; }
  main { padding: 2rem 1rem 3rem; }
  .hero { flex-direction: column; gap: 1.25rem; }
  .avatar { width: 192px; }
  .bio p { font-size: 1.05rem; }
  .post-list li { flex-direction: column; gap: 0.15rem; }
  .read-time { margin-left: 0; }
}
