@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Lora:ital,wght@0,400;0,500;1,400&family=Outfit:wght@700;800&family=Space+Mono&display=swap');

* {
  box-sizing: border-box;
}

img,
video,
iframe,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

* {
  font-family: inherit;
}

:root {
  /* Premium Dark Color Palette */
  --bg-body: #0f172a;
  /* Slate 900 */
  --bg-card: #1e293b;
  /* Slate 800 */
  --text-main: #e2e8f0;
  /* Slate 200 */
  --text-muted: #94a3b8;
  /* Slate 400 */
  --accent-primary: #10b981;
  /* Emerald 500 */
  --accent-hover: #34d399;
  /* Emerald 400 */
  --border-light: #334155;
  /* Slate 700 */

  /* Shadows - Adjusted for dark mode */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);

  /* Spacing */
  --container-width: 1000px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  background-color: var(--bg-body) !important;
  color: var(--text-main) !important;
  line-height: 1.75;
  letter-spacing: -0.01em;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

/* Layout */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header / Hero */
.hero {
  background: var(--bg-card);
  padding: 2rem 1rem;
  border-bottom: 1px solid var(--border-light);
}


.hero-content {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
}

.site-branding {
  text-align: left;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  /* Geeky/Backend Gradient: Cyan to Blue/Purple */
  background: linear-gradient(135deg, #22d3ee 0%, #818cf8 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.04em;
  overflow-wrap: break-word;
}

.site-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 400;
  margin: 0;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.social-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.social-link {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  background-color: transparent;
  transition: all 0.2s ease;
  line-height: 0;
}

.social-link:hover {
  background-color: var(--bg-card);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

/* Main Content */
.main-content {
  flex: 1;
  max-width: var(--container-width);
  margin: 4rem auto;
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* Post List */
.post-list {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

.post-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.5rem 0;
  border-bottom: 1px dashed var(--border-light);
  transition: all 0.2s ease;
}

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

.post-row .post-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin: 0;
  padding: 0;
  font-family: 'Space Mono', monospace;
}

/* Post list hover effect - disabled on mobile */
@media (min-width: 641px) {
  .post-row:hover {
    transform: translateX(10px);
  }
}

@media (max-width: 640px) {
  .post-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1.25rem 0;
  }

  .post-row .post-title {
    font-size: 1.15rem;
    padding-right: 0;
  }

  .post-row .post-meta {
    font-size: 0.8rem;
  }
}


.post-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.post-title a {
  color: var(--text-main);
}

.post-title a:hover {
  color: var(--accent-primary);
}

.post-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 1rem;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg-card);
}

/* Responsive */
/* Responsive Header */
@media (max-width: 640px) {
  .hero {
    padding: 2rem 1rem;
  }

  .hero-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .site-title {
    font-size: 2rem;
  }

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

  .social-nav {
    gap: 0.75rem;
  }

  .main-content {
    margin: 2rem auto;
  }
}


/* Single Post */
.post-single {
  background: transparent;
  padding: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.post-header {
  margin-bottom: 2rem;
  text-align: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

.post-header .post-title {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
  .post-header .post-title {
    font-size: 1.75rem;
  }

  .post-content {
    font-size: 1.1rem;
  }
}

.post-content {
  font-family: 'Lora', Georgia, serif !important;
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-main);
  font-weight: 400;
  overflow-wrap: break-word;
  word-wrap: break-word;
}


.post-content p,
.post-content li,
.post-content blockquote {
  font-family: 'Lora', Georgia, serif !important;
  margin-bottom: 1.5rem;
}

.post-content blockquote {
  border-left: 4px solid var(--accent-primary);
  padding-left: 1.5rem;
  font-style: italic;
  color: var(--text-muted);
}

.post-content h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.post-content h3 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-content code {
  font-family: 'Space Mono', monospace;
  background: var(--bg-card);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent-hover);
  border: 1px solid var(--border-light);
}

.post-content pre {
  background: var(--bg-card);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid var(--border-light);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.post-content pre code {
  font-family: 'Space Mono', monospace;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: var(--text-main);
  display: block;
}

/* Aggressively remove first/last empty line in code blocks */
.post-content pre code::before,
.post-content pre code::after {
  content: none !important;
}

.post-content pre br:first-child,
.post-content pre br:last-child {
  display: none !important;
}

/* Premium Tables */
.post-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  display: table;
  /* Switched back to table display */
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

/* For mobile responsiveness without display: block on the table itself */
@media (max-width: 640px) {
  .post-content table {
    display: block;
    overflow-x: auto;
  }
}

.post-content th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent-primary);
  text-align: left;
  padding: 1.25rem 1rem;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-light);
}

.post-content td {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-light);
  font-family: 'Inter', sans-serif !important;
  font-size: 1rem;
}

.post-content tr:last-child td {
  border-bottom: none;
}

.post-content tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}

.post-content tr:hover td {
  background: rgba(16, 185, 129, 0.03);
  transition: background 0.2s ease;
}

.site-header-compact {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 0;
  margin-bottom: 3rem;
}

.header-content {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-content .logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
}