@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #0d0d0d;
  --bg-secondary: #141414;
  --bg-tertiary: #1a1a1a;
  --text-primary: #f5f5f5;
  --text-secondary: #a3a3a3;
  --accent: #d97757;
  --accent-hover: #e89070;
  --border: #262626;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Grid background pattern */
.grid-pattern {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Ambient glow */
.glow-top {
  position: fixed;
  top: 0;
  left: 25%;
  width: 400px;
  height: 400px;
  background: var(--accent);
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.03;
  pointer-events: none;
}

.glow-bottom {
  position: fixed;
  bottom: 0;
  right: 25%;
  width: 400px;
  height: 400px;
  background: var(--accent);
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.03;
  pointer-events: none;
}

/* Layout */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

/* Header */
header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
  position: relative;
  z-index: 10;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-text {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.logo-text span:first-child {
  color: var(--text-primary);
}

.logo-text span:last-child {
  color: var(--accent);
}

nav {
  display: flex;
  gap: 32px;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

nav a:hover {
  color: var(--text-primary);
}

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

nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

/* Hero */
.hero {
  text-align: center;
  padding: 60px 0;
  margin-bottom: 48px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Sections */
.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title .number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent);
}

.section-title h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-title .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* Cards */
.card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  transition: border-color 0.2s, background 0.2s;
}

.card:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

/* Post List */
.post-list {
  margin-bottom: 16px;
}

.post-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

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

.post-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  width: 110px;
}

.post-title {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

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

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.more-link:hover {
  color: var(--accent-hover);
}

/* Article Page */
article {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 32px;
}

article header {
  border-bottom: none;
  margin-bottom: 24px;
  padding-bottom: 0;
}

article h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

article time {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

article .content {
  margin-top: 0;
}

article .content p {
  margin-bottom: 20px;
  color: var(--text-secondary);
}

article .content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

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

article .content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 32px 0 16px;
  color: var(--text-primary);
}

article .content ul,
article .content ol {
  margin: 16px 0;
  padding-left: 24px;
}

article .content li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

article .content blockquote {
  background: rgba(217, 119, 87, 0.1);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
}

article .content blockquote p {
  margin: 0;
  color: var(--text-primary);
}

article .content code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-secondary);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent);
  border: 1px solid var(--border);
}

article .content pre {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border);
}

article .content pre code {
  background: none;
  padding: 0;
  border: none;
  color: var(--text-secondary);
}

/* Footer */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  margin-top: 48px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  position: relative;
  z-index: 10;
}

/* Tags */
.tags {
  margin-top: 32px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.tag:hover {
  background: rgba(217, 119, 87, 0.1);
  color: var(--accent);
  border-color: var(--accent);
}

/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 0;
  }
  
  header {
    padding: 20px 0;
  }
  
  header .container {
    flex-direction: column;
    gap: 16px;
  }
  
  nav {
    gap: 20px;
  }
  
  .hero {
    padding: 40px 0;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .card, article {
    padding: 20px;
  }
  
  .post-item {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }
  
  .post-date {
    width: auto;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #333;
}
