:root {
  --bg: #050505;
  --bg-alt: #101010;
  --bg-card: #151515;
  --text: #f5f5f5;
  --muted: #aaaaaa;
  --accent: #a84300;
  --accent-soft: rgba(168, 67, 0, 0.5);
  --border: #222222;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.7);
  --radius-lg: 12px;
  --radius-xl: 18px;
  --transition-fast: 0.2s ease-out;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body.site {
  background: radial-gradient(circle at top, #111 0, #050505 45%, #000 100%);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
}

/* Layout */

.site-header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, #050505, #111111);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */

.logo a {
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.logo-mark {
  color: var(--accent);
  font-size: 1.1rem;
}

.logo-text {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.logo-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-subtitle {
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 1;
  margin-top: 0.15rem;
}

/* Navigation */

.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
}

.main-nav a {
  position: relative;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 0.3rem;
  transition: color var(--transition-fast);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width var(--transition-fast);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

/* Body layout */

.site-body {
  max-width: 1100px;
  margin: 2rem auto 3rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  gap: 2rem;
}

.site-main { }

.site-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
}

/* Cards */

.post-card,
.post-single,
.page-single,
.archive-year {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 1.6rem 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.02);
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.4rem;
}

.post-card:hover {
  border-color: var(--accent-soft);
  transform: translateY(-2px);
  transition: transform var(--transition-fast),
              border-color var(--transition-fast),
              box-shadow var(--transition-fast);
}

/* Typography */

h1, h2, h3, h4, h5 {
  color: #ffffff;
  margin-top: 0;
}

.post-title a,
.page-title {
  text-decoration: none;
  color: #ffffff;
}

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

/* Meta & tags */

.post-meta,
.post-tags,
.post-nav,
.archive-date {
  font-size: 0.85rem;
  color: var(--muted);
}

.meta-sep {
  margin: 0 0.5rem;
}

.post-tags a {
  color: var(--accent);
  text-decoration: none;
}

.post-tags a:hover {
  text-decoration: underline;
}

/* Excerpt */

.post-excerpt {
  margin: 0.8rem 0 1.1rem;
  color: #dddddd;
  font-size: 0.95rem;
}

/* Read more button */

.read-more {
  display: inline-block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  transition: background var(--transition-fast),
              color var(--transition-fast),
              transform var(--transition-fast),
              box-shadow var(--transition-fast);
}

.read-more:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.6);
}

/* Post content */

.post-content,
.page-content {
  margin-top: 1.3rem;
}

.post-content a,
.page-content a {
  color: var(--accent);
}

.post-content a:hover,
.page-content a:hover {
  text-decoration: underline;
}

.post-content pre,
.post-content code {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.post-content pre {
  background: #000;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  border: 1px solid #222;
}

/* Sidebar */

.sidebar-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-soft);
  margin-bottom: 1rem;
}

.sidebar-section h3 {
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.sidebar-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-section li {
  margin-bottom: 0.4rem;
}

.sidebar-section a {
  color: #f0f0f0;
  text-decoration: none;
  font-size: 0.9rem;
}

.sidebar-section a:hover {
  color: var(--accent);
}

/* Archive */

.archive h1 {
  margin-bottom: 1.2rem;
}

.archive-year h2 {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin-bottom: 0.8rem;
}

.archive-year ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.archive-year li {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
}

.archive-date {
  min-width: 3rem;
  color: var(--muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: #050505;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem 1.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-right a {
  color: var(--accent);
  text-decoration: none;
  margin-left: 0.8rem;
}

.footer-right a:hover {
  text-decoration: underline;
}

/* Utility */

a {
  color: var(--accent);
}

a:hover {
  color: #ff414d;
}

/* Responsive */

@media (max-width: 800px) {
  .site-body {
    grid-template-columns: 1fr;
  }

  .site-sidebar {
    position: static;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .main-nav ul {
    flex-wrap: wrap;
  }
}
