/* Irsaliev Hub — local preview styles */
:root {
  --bg: #0c0d10;
  --bg-elevated: #14151a;
  --bg-card: #181a21;
  --border: #2a2d36;
  --border-subtle: #1e2129;
  --text: #e8e9ed;
  --text-muted: #9a9eab;
  --text-faint: #6b6f7c;
  --accent: #7c9cff;
  --accent-soft: rgba(124, 156, 255, 0.12);
  --accent-hover: #9bb3ff;
  --draft: #e8a54b;
  --draft-bg: rgba(232, 165, 75, 0.12);
  --ribbon: #c45c26;
  --font-sans: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --font-serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --max: 680px;
  --max-wide: 920px;
  --radius: 10px;
  --shadow: 0 1px 0 rgba(255,255,255,0.04), 0 8px 24px rgba(0,0,0,0.35);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 156, 255, 0.08), transparent);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent-hover); }

/* Preview ribbon */
.preview-ribbon {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ribbon);
  color: #fff;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
}

/* Nav */
.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(12, 13, 16, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 1.7rem;
  z-index: 50;
}

.nav-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo:hover { color: var(--accent-hover); }
.logo span { color: var(--text-faint); font-weight: 500; }

.nav-links {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  background: var(--accent-soft);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
}

/* Main */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.narrow { max-width: var(--max); margin-left: auto; margin-right: auto; }

/* Hero */
.hero {
  padding: 2.5rem 0 3rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2.5rem;
}

.hero-name {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  font-weight: 450;
  letter-spacing: -0.01em;
}

.hero-light {
  padding-bottom: 1.25rem;
  margin-bottom: 0.5rem;
}
.hero-light .hero-tagline {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto 1rem;
}

.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.topic {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(124, 156, 255, 0.2);
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.875rem;
}
.social-row a { color: var(--text-muted); }
.social-row a:hover { color: var(--accent); }

/* Sections */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin: 0 0 1rem;
}

/* Post cards */
.post-grid {
  display: grid;
  gap: 1rem;
}

.post-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
  color: inherit;
}
.post-card:hover {
  border-color: rgba(124, 156, 255, 0.35);
  transform: translateY(-1px);
  color: inherit;
}

.post-card .meta {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-bottom: 0.4rem;
}

.post-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text);
}

.post-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Page titles */
.page-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.page-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 2rem;
}

/* Prose */
.prose {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
}
.prose p { margin: 0 0 1.25rem; }
.prose h2 {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 2.25rem 0 0.85rem;
  line-height: 1.3;
}
.prose h3 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.65rem;
}
.prose ul, .prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}
.prose li { margin-bottom: 0.4rem; }
.prose strong { font-weight: 650; color: #f0f1f5; }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-elevated);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

/* Draft badge */
.draft-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--draft-bg);
  color: var(--draft);
  border: 1px solid rgba(232, 165, 75, 0.35);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.post-meta {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-faint);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* Blog list */
.blog-list { list-style: none; margin: 0; padding: 0; }
.blog-list li {
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 0;
}
.blog-list li:first-child { padding-top: 0; }
.blog-list a {
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.015em;
}
.blog-list a:hover { color: var(--accent); }
.blog-list .meta {
  display: block;
  font-size: 0.8rem;
  color: var(--text-faint);
  font-weight: 400;
  margin-top: 0.35rem;
}
.blog-list .excerpt {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 0.45rem;
  line-height: 1.5;
}

/* Now / Contact / pages */
.bio p, .now-list p, .contact-block p {
  color: var(--text-muted);
  margin: 0 0 1.1rem;
  font-size: 1.02rem;
  line-height: 1.7;
}
.bio .aside {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  color: var(--text-faint);
}

.now-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.now-list li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.55;
}
.now-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.25rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}
.now-list li strong { color: var(--text); font-weight: 600; }

.contact-email {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: inline-block;
  margin-bottom: 1.75rem;
}

.contact-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-links li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
}
.contact-links span {
  display: inline-block;
  width: 5.5rem;
  color: var(--text-faint);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
}
.site-footer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-faint);
}
.site-footer a {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.site-footer a:hover { color: var(--accent); }
.footer-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.footer-inner > * { margin: 0; }

/* Mobile */
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem;
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 0.75rem 1rem;
    border-radius: 6px;
  }
  .site-header { position: relative; top: 0; }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  main { padding-top: 1.75rem; }
  .hero { padding-top: 1.5rem; }
}
