/* ============================================
   Hewett.cc - Dark Theme Stylesheet
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #0d1117;
  color: #e6edf3;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #58a6ff;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #79c0ff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-content {
  flex: 1;
  padding: 60px 0;
}

/* --- Navigation --- */
.navbar {
  background-color: #161b22;
  border-bottom: 1px solid #30363d;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 960px;
  margin: 0 auto;
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #e6edf3;
  letter-spacing: -0.5px;
}

.navbar-brand:hover {
  color: #58a6ff;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 24px;
}

.nav-links a {
  color: #8b949e;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #e6edf3;
}

/* Hamburger menu button */
.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #e6edf3;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- Hero Section (Home) --- */
.hero {
  text-align: center;
  padding: 80px 0 40px;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.hero .tagline {
  font-size: 1.2rem;
  color: #8b949e;
  max-width: 500px;
  margin: 0 auto;
}

/* --- Section Headings --- */
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #e6edf3;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid #30363d;
}

/* --- Project Cards (Home) --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.project-card {
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  border-color: #58a6ff;
  transform: translateY(-2px);
}

.project-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e6edf3;
  margin-bottom: 8px;
}

.project-card p {
  font-size: 0.9rem;
  color: #8b949e;
  margin-bottom: 16px;
  line-height: 1.5;
}

.project-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: #58a6ff;
}

.project-link:hover {
  text-decoration: underline;
}

/* --- Blog Post List (blog.html) --- */
.post-list {
  list-style: none;
}

.post-item {
  padding: 24px 0;
  border-bottom: 1px solid #21262d;
}

.post-item:last-child {
  border-bottom: none;
}

.post-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.post-title a {
  color: #e6edf3;
}

.post-title a:hover {
  color: #58a6ff;
}

.post-date {
  font-size: 0.8rem;
  color: #484f58;
  margin-bottom: 8px;
}

.post-excerpt {
  font-size: 0.9rem;
  color: #8b949e;
  line-height: 1.6;
}

/* --- Blog Post Page (posts/*.html) --- */
.post-header {
  margin-bottom: 32px;
}

.post-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.post-meta {
  font-size: 0.85rem;
  color: #484f58;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: #8b949e;
}

.back-link:hover {
  color: #58a6ff;
}

.post-body {
  font-size: 1rem;
  line-height: 1.75;
  color: #c9d1d9;
}

.post-body h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #e6edf3;
  margin-top: 40px;
  margin-bottom: 16px;
}

.post-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #e6edf3;
  margin-top: 32px;
  margin-bottom: 12px;
}

.post-body p {
  margin-bottom: 16px;
}

.post-body ul, .post-body ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.post-body li {
  margin-bottom: 8px;
}

.post-body code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  background-color: #161b22;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875rem;
  color: #f97583;
}

.post-body pre {
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 24px;
}

.post-body pre code {
  background-color: transparent;
  padding: 0;
  color: #c9d1d9;
  font-size: 0.85rem;
}

.post-body blockquote {
  border-left: 3px solid #30363d;
  padding-left: 16px;
  margin-bottom: 16px;
  color: #8b949e;
}

.post-body img {
  border-radius: 8px;
  margin: 24px 0;
}

/* --- About Page --- */
.about-header {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 40px;
}

.about-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: #161b22;
  border: 2px solid #30363d;
  flex-shrink: 0;
  overflow: hidden;
}

.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-bio p {
  margin-bottom: 16px;
  color: #c9d1d9;
}

.skills-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e6edf3;
  margin-bottom: 12px;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.skill-tag {
  background-color: #161b22;
  border: 1px solid #30363d;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #8b949e;
}

/* --- Contact Page --- */
.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-email {
  font-size: 1.25rem;
  margin-bottom: 32px;
}

.contact-email a {
  color: #58a6ff;
  font-weight: 500;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  list-style: none;
  margin-top: 32px;
}

.social-links a {
  color: #8b949e;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.social-links a:hover {
  color: #58a6ff;
}

/* --- Footer --- */
.footer {
  background-color: #161b22;
  border-top: 1px solid #30363d;
  padding: 24px;
  text-align: center;
  margin-top: auto;
}

.footer p {
  font-size: 0.8rem;
  color: #484f58;
}

/* --- Responsive (Mobile) --- */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #161b22;
    border-bottom: 1px solid #30363d;
    flex-direction: column;
    padding: 16px 24px;
    gap: 12px;
  }

  .nav-links.open {
    display: flex;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .tagline {
    font-size: 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .about-header {
    flex-direction: column;
    text-align: center;
  }

  .post-header h1 {
    font-size: 1.5rem;
  }
}
