/* ============================================
   ilden.life — Premium Dark Theme
   ============================================ */

:root {
  --bg: #000;
  --bg-elevated: #0a0a0a;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.13);

  --text: #f5f5f7;
  --text-secondary: #98989d;
  --text-tertiary: #3a3a3c;

  --accent: #6e56cf;
  --accent-soft: rgba(110, 86, 207, 0.18);

  --max-width: 700px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-serif: "Lora", "Georgia", serif;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Container === */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* === Sticky Header === */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  background: rgba(0, 0, 0, 0.75);
  border-bottom: 1px solid var(--border);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.site-name {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-decoration: none;
  background: linear-gradient(120deg, #fff 40%, #888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity 0.2s var(--ease);
}
.site-name:hover { opacity: 0.65; }

.nav-count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

/* === Main === */
main { flex: 1; }

/* === Hero === */
.hero {
  padding: 5.5rem 0 3.5rem;
  animation: fadeUp 0.55s ease both;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.hero-tag::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--accent);
  display: block;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.06;
  margin-bottom: 1.25rem;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, #fff 20%, #6e56cf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 440px;
}

/* === Posts section === */
.posts-section {
  padding-bottom: 6rem;
  animation: fadeUp 0.55s 0.07s ease both;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

/* === Post List Items === */
.post-list { list-style: none; }

.post-item a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.05rem 0.875rem;
  margin: 0 -0.875rem;
  border-radius: 10px;
  text-decoration: none;
  transition:
    background 0.18s var(--ease),
    transform 0.18s var(--ease);
}
.post-item a:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(3px);
}

.post-item-title {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.4;
  transition: color 0.15s ease;
}
.post-item a:hover .post-item-title { color: #fff; }

.post-item-right {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.post-item-date {
  font-size: 0.76rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.post-item-chevron {
  color: var(--text-tertiary);
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  line-height: 1;
}
.post-item a:hover .post-item-chevron {
  opacity: 1;
  transform: translateX(0);
}

/* === Single Post === */
.post-page {
  padding: 3.5rem 0 6rem;
  animation: fadeUp 0.45s ease both;
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 3.5rem;
  transition: color 0.15s ease;
  letter-spacing: -0.01em;
}
.post-back:hover { color: var(--text); }
.post-back .arrow { transition: transform 0.15s ease; }
.post-back:hover .arrow { transform: translateX(-3px); }

.post-header {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.post-eyebrow {
  font-size: 0.76rem;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.025em;
  margin-bottom: 1rem;
}

.post-title {
  font-size: clamp(1.7rem, 5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.12;
  color: var(--text);
}

/* === Post Body === */
.post-body {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.88;
  color: #c0c0c5;
}

.post-body p { margin-bottom: 1.5em; }
.post-body p:last-child { margin-bottom: 0; }

.post-body h2 {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 2.5em 0 0.75em;
}

.post-body a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s ease;
}
.post-body a:hover { text-decoration-color: var(--text); }

.post-body strong { color: var(--text); font-weight: 600; }
.post-body em { font-style: italic; color: var(--text-secondary); }

.post-body blockquote {
  margin: 2em 0;
  padding: 1.25rem 1.5rem;
  background: var(--bg-elevated);
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-style: italic;
}

.post-body code {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.83em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.15em 0.45em;
  color: #a78bfa;
}

.post-body pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2em 0;
}
.post-body pre code {
  background: none; border: none; padding: 0;
  font-size: 0.875rem; color: var(--text);
}

.post-body ul, .post-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1.5em;
}
.post-body li { margin-bottom: 0.5em; }

.post-body hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 3em 0;
}

/* === Post Footer === */
.post-footer {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* === Footer === */
footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
}
footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-text {
  font-size: 0.76rem;
  color: var(--text-tertiary);
}

/* === Animations === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #333; }

/* === Selection === */
::selection { background: rgba(110, 86, 207, 0.28); color: #fff; }

/* === Responsive === */
@media (max-width: 600px) {
  .container { padding: 0 1.25rem; }
  .hero { padding: 3.5rem 0 2.5rem; }
  .post-item a { padding: 0.9rem 0.75rem; margin: 0 -0.75rem; }
  .post-item-chevron { display: none; }
}
