/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --ghost-accent-color: #211b99;
  --background-color: #0a0a0a;
  --text-color: #ffffff;
  --secondary-text-color: #a0a0a0;
  --border-color: #2a2a2a;
  --gradient-start: #7c3aed;
  --gradient-end: #ec4899;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-color);
  background-color: var(--background-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Navigation */
.top-nav {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  backdrop-filter: blur(10px);
  padding: 20px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: none;
  transition: background 0.3s ease;
}

/* Transparent navbar on homepage */
.home-page .top-nav {
  background: transparent;
  backdrop-filter: none;
}

/* Add gradient when scrolled past hero */
.home-page .top-nav.scrolled {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-left {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-left a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.3s ease;
}

.nav-left a:hover {
  color: var(--secondary-text-color);
}


/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  padding: 150px 40px 180px;
  text-align: center;
  margin-top: 0;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 64px;
  font-weight: 700;
  margin-bottom: 20px;
  color: white;
  line-height: 1.1;
}

.hero-description {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
}

/* Main Content */
.site-main {
  padding: 0;
  max-width: 100%;
  margin: 0;
}

/* Post Feed */
.post-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 100%;
  margin: 0;
}

.post-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 500px;
  background: var(--background-color);
}

.post-card-reverse {
  direction: rtl;
}

.post-card-reverse > * {
  direction: ltr;
}

.post-card-image-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 60px;
}

.post-card-image {
  width: 80%;
  height: auto;
  max-width: 600px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.post-card-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 100px;
}

.post-card-content-link {
  text-decoration: none;
  color: inherit;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.post-card-header {
  margin-top: 10px;
  margin-bottom: 12px;
}

.post-card-title {
  font-size: 36px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: var(--text-color);
  transition: color 0.3s ease;
}

.post-card-content-link:hover .post-card-title {
  color: var(--gradient-start);
}

.post-card-excerpt {
  font-size: 16px;
  color: var(--secondary-text-color);
  margin: 0 0 12px 0;
  line-height: 1.6;
}

.post-card-meta {
  font-size: 11px;
  color: rgba(160, 160, 160, 0.7);
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0;
}

.reading-time {
  color: rgba(160, 160, 160, 0.7);
}

/* Single Post */
.post-content {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 100px;
}

.post-header {
  text-align: center;
  margin-bottom: 60px;
}

.post-title {
  font-size: 52px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.post-meta {
  font-size: 14px;
  color: var(--secondary-text-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-featured-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  margin-bottom: 60px;
  border-radius: 4px;
}

.post-body {
  font-size: 20px;
  line-height: 1.7;
}

.post-body h2 {
  font-size: 36px;
  font-weight: 700;
  margin: 60px 0 30px;
  line-height: 1.3;
}

.post-body h3 {
  font-size: 28px;
  font-weight: 600;
  margin: 40px 0 20px;
  line-height: 1.4;
}

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

.post-body a {
  color: var(--ghost-accent-color);
  text-decoration: none;
  border-bottom: 1px solid var(--ghost-accent-color);
  transition: opacity 0.3s ease;
}

.post-body a:hover {
  opacity: 0.7;
}

.post-body img {
  width: 100%;
  height: auto;
  margin: 40px 0;
  border-radius: 4px;
}

.post-body blockquote {
  border-left: 4px solid var(--ghost-accent-color);
  padding-left: 30px;
  margin: 40px 0;
  font-style: italic;
  color: var(--secondary-text-color);
}

.post-body ul,
.post-body ol {
  margin: 30px 0;
  padding-left: 40px;
}

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

.post-body code {
  background-color: #f4f4f4;
  padding: 3px 8px;
  border-radius: 3px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 16px;
}

.post-body pre {
  background-color: #f4f4f4;
  padding: 20px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 30px 0;
}

.post-body pre code {
  padding: 0;
  background-color: transparent;
}

/* Footer */
.site-footer {
  padding: 60px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--secondary-text-color);
  font-size: 14px;
  background: var(--background-color);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 60px;
}

.pagination a,
.pagination span {
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.pagination a:hover {
  border-color: var(--ghost-accent-color);
  color: var(--ghost-accent-color);
}

.pagination .current {
  background-color: var(--ghost-accent-color);
  color: white;
  border-color: var(--ghost-accent-color);
}

/* Post Navigation */
.post-navigation {
  max-width: 800px;
  margin: 80px auto 60px;
  padding: 0 20px;
}

.post-nav-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  border-top: 1px solid var(--border-color);
  padding-top: 60px;
}

.post-nav-item {
  text-decoration: none;
  color: inherit;
  padding: 30px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--ghost-accent-color);
  transform: translateY(-2px);
}

.post-nav-empty {
  background: transparent;
  border: none;
}

.post-nav-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--secondary-text-color);
  font-weight: 600;
}

.post-nav-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-color);
  margin: 0;
}

.post-nav-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--secondary-text-color);
  margin: 0;
}

.post-nav-prev {
  text-align: left;
}

.post-nav-next {
  text-align: right;
}

/* About Page */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 100px;
}

.about-content h1 {
  font-size: 52px;
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
}

.about-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  margin: 0 auto 40px;
  display: block;
  object-fit: cover;
}

.about-content h2 {
  font-size: 32px;
  font-weight: 700;
  margin: 60px 0 30px;
  line-height: 1.3;
}

.about-content p {
  font-size: 20px;
  line-height: 1.7;
  margin-bottom: 30px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 48px;
  }

  .post-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .post-card-reverse {
    direction: ltr;
  }

  .post-card-image-link {
    padding: 40px;
  }

  .post-card-content {
    padding: 100px;
  }

  .post-card-title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 20px;
  }

  .nav-left {
    gap: 20px;
  }

  .hero-section {
    padding: 140px 20px 120px;
  }

  .hero-title {
    font-size: 40px;
  }

  .hero-description {
    font-size: 18px;
  }

  .post-card-image-link {
    padding: 30px;
  }

  .post-card-content {
    padding: 30px;
  }

  .post-card-title {
    font-size: 28px;
  }

  .post-card-excerpt {
    font-size: 15px;
  }

  .post-card-image {
    max-width: 80%;
  }

  .post-title {
    font-size: 36px;
  }

  .post-body {
    font-size: 18px;
  }

  .post-body h2 {
    font-size: 28px;
  }

  .post-body h3 {
    font-size: 24px;
  }

  .about-content h1 {
    font-size: 36px;
  }

  .about-content h2 {
    font-size: 28px;
  }

  .about-image {
    max-width: 100%;
    margin-bottom: 30px;
  }

  .post-nav-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .post-nav-title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .hero-section {
    padding: 120px 20px 100px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-description {
    font-size: 16px;
  }

  .post-card-image-link {
    padding: 20px;
  }

  .post-card-content {
    padding: 20px;
  }

  .post-card-title {
    font-size: 24px;
  }

  .post-card-excerpt {
    font-size: 14px;
  }

  .post-title {
    font-size: 28px;
  }
}
