/* Reset and base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}
:root {
  /* Pensi Brand Colors */
  --color-primary: #012F71;        /* Sharp Blue - main brand color */
  --color-primary-dark: #011d47;   /* Darker shade for hover states */
  --color-accent: #0279BE;         /* Lighter Blue - accent/secondary */
  --color-text: #1f2937;
  --color-text-light: #6b7280;
  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fa;
  --color-border: #E0E0E0;         /* Light Gray - brand secondary */
  /* Montserrat font stack */
  --font-sans: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
  --max-width: 48rem;
  --spacing: 1.5rem;
}
html {
  font-size: 16px;
  line-height: 1.6;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
}
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}
img {
  max-width: 100%;
  height: auto;
}
/* Site header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 0.5rem var(--spacing);
}
.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-brand img {
  width: auto;
  height: 60px;

  /* Modern CSS to lock in the 784x1168 ratio */
  aspect-ratio: 1168 / 784; 
  
  /* Ensures the logo doesn't distort if the container changes */
  -o-object-fit: contain;
     object-fit: contain;   
}
.nav-brand:hover {
  text-decoration: none;
  opacity: 0.9;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--color-text-light);
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover {
  color: var(--color-accent);
  text-decoration: none;
}
/* Main content */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem var(--spacing);
}
/* Site footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem var(--spacing);
  text-align: center;
  color: var(--color-text-light);
  font-size: 0.875rem;
}
/* Hero section */
.hero {
  text-align: center;
  padding: 4rem 0;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 1rem;
}
.hero p {
  font-size: 1.25rem;
  color: var(--color-text-light);
  margin: 0 0 2rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}
.cta-button {
  display: inline-block;
  background-color: var(--color-primary);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: background-color 0.2s ease;
}
.cta-button:hover {
  background-color: var(--color-accent);
  text-decoration: none;
}
/* Posts list page */
.posts-header {
  margin-bottom: 2rem;
}
.posts-header h1 {
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 0.5rem;
}
.posts-description {
  color: var(--color-text-light);
  margin: 0;
}
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.post-card {
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.post-card:hover {
  box-shadow: 0 4px 12px rgba(1, 47, 113, 0.1);
  transform: translateY(-2px);
}
.post-card-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  -o-object-fit: cover;
     object-fit: cover;
}
.post-card-content {
  padding: 1.5rem;
}
.post-card-title {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}
.post-card-title a {
  color: var(--color-text);
  transition: color 0.2s ease;
}
.post-card-title a:hover {
  color: var(--color-accent);
  text-decoration: none;
}
.post-card-meta {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
}
.post-card-meta span::before {
  content: '·';
  margin: 0 0.5rem;
}
.post-card-excerpt {
  color: var(--color-text-light);
  margin: 0 0 1rem;
}
.post-card-link {
  font-weight: 600;
  color: var(--color-primary);
}
.post-card-link:hover {
  color: var(--color-accent);
}
/* Single post */
.post-header {
  margin-bottom: 2rem;
}
.post-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}
.post-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 0.75rem;
}
.post-meta {
  font-size: 0.875rem;
  color: var(--color-text-light);
}
.post-meta span::before {
  content: '·';
  margin: 0 0.5rem;
}
.post-content {
  line-height: 1.75;
}
.post-content h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.post-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.post-content h3 {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.post-content h4 {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.post-content p {
  margin: 0 0 1.25rem;
}
.post-content img {
  border-radius: 0.5rem;
}
.post-content pre {
  background-color: var(--color-bg-alt);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
}
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}
.post-content :not(pre) > code {
  background-color: var(--color-bg-alt);
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
}
.post-content blockquote {
  border-left: 4px solid var(--color-accent);
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  color: var(--color-text-light);
  font-style: italic;
}
/* Post navigation */
.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.post-nav-prev,
.post-nav-next {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 45%;
}
.post-nav-prev span:first-child,
.post-nav-next span:first-child {
  font-size: 0.875rem;
  color: var(--color-text-light);
}
.post-nav-next {
  text-align: right;
  margin-left: auto;
}
/* Responsive */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 2rem;
  }

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

  .post-title {
    font-size: 1.5rem;
  }

  .post-nav {
    flex-direction: column;
  }

  .post-nav-prev,
  .post-nav-next {
    max-width: 100%;
  }

  .post-nav-next {
    text-align: left;
    margin-left: 0;
  }
}
