/* ── Reset & Base ── */

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

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial,
    sans-serif;
  color: #2b2b2b;
  background: #fdfdfd;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Navigation ── */

header {
  border-bottom: 1px solid #e8e8e8;
}

nav {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #2b2b2b;
  text-decoration: none;
}

.site-title:hover {
  color: #555;
}

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

.nav-links a {
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-links a:hover {
  color: #2b2b2b;
}

/* ── Main Content ── */

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex: 1;
  width: 100%;
}

/* ── Typography ── */

h1 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  color: #1a1a1a;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
  color: #1a1a1a;
}

p {
  margin-bottom: 1rem;
}

a {
  color: #1a6fa5;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

li {
  margin-bottom: 0.3rem;
}

strong {
  font-weight: 600;
}

blockquote {
  border-left: 3px solid #ddd;
  padding-left: 1rem;
  margin: 1.2rem 0;
  color: #555;
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 2rem 0;
}

/* ── Code ── */

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 0.85rem;
  background: #f4f4f4;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

pre {
  background: #f4f4f4;
  border-radius: 4px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

/* ── Blog Post List ── */

.post-list {
  list-style: none;
  padding-left: 0;
}

.post-list li {
  margin-bottom: 1.2rem;
}

.post-date {
  font-size: 0.85rem;
  color: #888;
  display: block;
  margin-bottom: 0.1rem;
}

/* ── Footer ── */

footer {
  border-top: 1px solid #e8e8e8;
  margin-top: auto;
}

footer p {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
  font-size: 0.8rem;
  color: #999;
}

/* ── Projects ── */

.project-meta {
  margin-bottom: 1.2rem;
}

.project-repo {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  background: #24292e;
  color: #fff;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: background 0.2s;
}

.project-repo:hover {
  background: #444d56;
  color: #fff;
  text-decoration: none;
}

.project-gallery {
  margin: 1rem 0 1.5rem;
}

.project-gallery img {
  max-width: 480px;
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
  margin-bottom: 0.8rem;
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin: 1rem 0 1.5rem;
  border-radius: 6px;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

/* ── Responsive ── */

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

  h1 {
    font-size: 1.5rem;
  }
}
