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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background: #fafafa;
}

a {
  color: #0366d6;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header ===== */
.site-header {
  background: #24292e;
  color: #fff;
  padding: 16px 0;
  border-bottom: 3px solid #0366d6;
}

.site-header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
}

.header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
  transition: border-color 0.2s ease;
}

.site-logo:hover .header-avatar {
  border-color: rgba(255,255,255,0.7);
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none !important;
}

.site-nav a {
  color: rgba(255,255,255,0.8);
  margin-left: 20px;
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: #fff;
  text-decoration: none;
}

/* ===== Main Content ===== */
main {
  min-height: 70vh;
  padding: 0 0 60px;
}

/* ===== Page Sections (About, Post) ===== */
.about.wrapper,
.post.wrapper {
  padding-top: 40px;
  padding-bottom: 40px;
  overflow-x: hidden;
}

/* ===== Hero Banner ===== */
.hero-banner {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  min-height: 520px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../cover.png') center/cover no-repeat;
  opacity: 0.25;
  z-index: 1;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 60px 20px;
}

.hero-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  color: #fff;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.3);
  object-fit: cover;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.hero-content h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.hero-tagline {
  font-size: 1.15rem;
  color: #64ffda;
  margin-bottom: 16px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-links {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #64ffda;
  color: #1a1a2e;
}

.btn-primary:hover {
  background: #45e0be;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(100,255,218,0.35);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.35);
}

.btn-outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.08);
  transform: translateY(-1px);
}

/* ===== Section Title ===== */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 3px solid #64ffda;
  display: inline-block;
}

/* ===== Post Cards ===== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e8eaed;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.post-card-image-link {
  display: block;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

.post-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.post-card:hover .post-card-image {
  transform: scale(1.04);
}

.post-card-body {
  padding: 24px;
}

.post-card-date {
  font-size: 0.8rem;
  color: #64b5f6;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-card h3 {
  margin: 8px 0;
  font-size: 1.2rem;
}

.post-card h3 a {
  color: #1a1a2e;
  text-decoration: none;
}

.post-card h3 a:hover {
  color: #0366d6;
}

.post-card p {
  color: #586069;
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.read-more {
  color: #0366d6;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.read-more:hover {
  text-decoration: underline;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  background: #fff;
  border-radius: 12px;
  border: 2px dashed #e1e4e8;
  color: #586069;
  font-size: 1.1rem;
}

/* ===== Post Page ===== */
.post-header {
  margin-bottom: 30px;
}

.post-header h1 {
  font-size: 2rem;
  color: #24292e;
  margin-bottom: 8px;
}

.post-meta {
  color: #586069;
  font-size: 0.9rem;
}

.post-content h2 {
  font-size: 1.4rem;
  margin: 24px 0 12px;
  color: #24292e;
}

.post-content h3 {
  font-size: 1.15rem;
  margin: 20px 0 10px;
  color: #24292e;
}

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

.post-content ul, .post-content ol {
  margin: 0 0 16px 24px;
}

.post-content li {
  margin-bottom: 6px;
}

.post-content code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

.post-content strong {
  font-weight: 600;
}

.post-content img {
  max-width: min(600px, 100%);
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 24px auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  box-sizing: border-box;
}

/* ===== About Page ===== */
.about h1 {
  font-size: 2rem;
  margin-bottom: 16px;
  color: #24292e;
}

.about h2 {
  font-size: 1.3rem;
  margin: 28px 0 12px;
  color: #24292e;
}

.about p {
  margin-bottom: 12px;
  color: #444;
}

.about ul {
  margin-left: 20px;
  margin-bottom: 16px;
}

.about li {
  margin-bottom: 8px;
}

.about code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

/* ===== Footer ===== */
.site-footer {
  background: #24292e;
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 24px 0;
  font-size: 0.9rem;
}

.site-footer a {
  color: rgba(255,255,255,0.9);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 16px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8) !important;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.social-icon:hover {
  background: rgba(255,255,255,0.2);
  color: #fff !important;
  transform: translateY(-2px);
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .hero-banner {
    min-height: 460px;
  }

  .hero-content h1 {
    font-size: 1.7rem;
  }

  .hero-tagline {
    font-size: 0.9rem;
    letter-spacing: 1px;
  }

  .hero-avatar {
    width: 90px;
    height: 90px;
  }

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

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

  .site-header .wrapper {
    flex-direction: column;
    gap: 8px;
  }

  .site-nav a {
    margin: 0 10px;
  }
}
