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

:root {
  --color-bg: #0f0f0f;
  --color-surface: #1a1a1a;
  --color-text: #e0e0e0;
  --color-text-muted: #888888;
  --color-accent: #ff9900;
  --color-accent-hover: #ffad33;
  --color-border: #2a2a2a;
  --color-bg-alt: #141414;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 960px;
  --max-width-narrow: 640px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: var(--max-width-narrow);
}

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; }

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.1rem;
}

.site-logo:hover {
  color: var(--color-accent);
}

.logo-img {
  height: 2rem;
  width: auto;
}

.nav-menu ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-menu a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* Hero */
.hero {
  text-align: center;
  padding: 5rem 1.5rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.hero-logo {
  margin: 0 auto 2rem;
  max-width: 200px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section h1 {
  margin-bottom: 1.5rem;
}

/* Content */
.content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.content p {
  margin-bottom: 1.25rem;
}

.content a {
  border-bottom: 1px solid var(--color-accent);
}

.content a:hover {
  border-bottom-color: var(--color-accent-hover);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  color: var(--color-text);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: var(--color-accent);
  color: var(--color-text);
}

.card h3 {
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.card time {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 0.75rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.post-date {
  display: block;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.empty-state {
  color: var(--color-text-muted);
  font-style: italic;
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-inner p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.back-to-top {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.back-to-top:hover {
  color: var(--color-accent);
}

/* Mobile */
@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
  }

  .nav-menu.open {
    display: block;
  }

  .nav-menu ul {
    flex-direction: column;
    gap: 0;
  }

  .nav-menu li {
    border-bottom: 1px solid var(--color-border);
  }

  .nav-menu li:last-child {
    border-bottom: none;
  }

  .nav-menu a {
    display: block;
    padding: 0.75rem 0;
  }

  .hero {
    padding: 3rem 1.5rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

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

  .section {
    padding: 2.5rem 0;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
