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

:root {
  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --c-bg: #f6f8f0;
  --c-surface: #ffffff;
  --c-text: #1a2a1e;
  --c-text-muted: #5a6e52;
  --c-primary: #336644;
  --c-primary-hover: #264e34;
  --c-primary-light: #e8f0e4;
  --c-lime: #9ab848;
  --c-lime-light: #f0f6e0;
  --c-accent: #b86a3a;
  --c-accent-light: #faf0e8;
  --c-leaf: #6a9a50;
  --c-border: #d4dcc8;
  --c-border-light: #e8eee0;

  --max-w: 720px;
  --nav-max-w: 1040px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3.5rem;
  --space-xl: 5rem;
  --radius: 8px;
}

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

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

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

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

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

/* --- Top accent bar --- */
.top-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-lime) 50%, var(--c-accent) 100%);
}

/* --- Header --- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border-light);
}

.site-header__inner {
  max-width: var(--nav-max-w);
  margin: 0 auto;
  padding: 1.25rem var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-icon {
  width: 28px;
  height: 28px;
  background: var(--c-primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.02em;
}
.site-title:hover { color: var(--c-primary); text-decoration: none; }

.site-nav { display: flex; gap: 0.25rem; }

.site-nav a {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--c-text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  transition: all 0.2s;
}
.site-nav a:hover {
  color: var(--c-primary);
  background: var(--c-primary-light);
  text-decoration: none;
}
.site-nav a.active {
  color: var(--c-primary);
  background: var(--c-primary-light);
  font-weight: 600;
}

/* --- Main content --- */
.content-wrap {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md) var(--space-xl);
  flex: 1;
}

/* --- Page header --- */
.page-header {
  margin-bottom: var(--space-lg);
}

.page-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--c-lime);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.page-label::before {
  content: '';
  width: 12px;
  height: 2px;
  background: var(--c-lime);
  display: inline-block;
}

.page-title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--c-text);
}

.page-subtitle {
  font-size: 1rem;
  color: var(--c-text-muted);
  margin-top: 0.75rem;
  line-height: 1.6;
}

/* --- Geometric divider --- */
.geo-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: var(--space-md) 0 var(--space-lg);
}
.geo-divider::before {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--c-border), transparent);
}
.geo-divider__dots {
  display: flex;
  gap: 4px;
}
.geo-divider__dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  display: block;
}
.geo-divider__dots i:nth-child(1) { background: var(--c-primary); }
.geo-divider__dots i:nth-child(2) { background: var(--c-lime); }
.geo-divider__dots i:nth-child(3) { background: var(--c-accent); }
.geo-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(270deg, var(--c-border), transparent);
}

/* --- Post list --- */
.post-list { list-style: none; display: flex; flex-direction: column; gap: 1px; }

.post-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 var(--space-md);
  padding: 1.5rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius);
  transition: all 0.25s ease;
}
.post-card:hover {
  text-decoration: none;
  border-color: var(--c-primary);
  box-shadow: 0 4px 24px rgba(51, 102, 68, 0.08);
  transform: translateY(-1px);
}

.post-card__indicator {
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--c-primary), var(--c-lime));
  grid-row: 1 / 4;
}

.post-card__meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--c-text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
}

.post-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--c-text);
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
  transition: color 0.2s;
}
.post-card:hover .post-card__title { color: var(--c-primary); }

.post-card__excerpt {
  color: var(--c-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- Article (single post) --- */
.post-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--c-border-light);
}

.post-header__title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-sm);
  color: var(--c-text);
}

.post-header__meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--c-text-muted);
  letter-spacing: 0.02em;
}

.post-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3em 0.75em;
  border: 1px solid var(--c-primary);
  color: var(--c-primary);
  border-radius: 4px;
  margin-bottom: var(--space-sm);
}

.post-hero {
  border-radius: var(--radius);
  margin-bottom: var(--space-lg);
  border: 1px solid var(--c-border-light);
}

/* --- Article body prose --- */
.post-body h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin: var(--space-lg) 0 var(--space-sm);
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--c-text);
}

.post-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin: var(--space-md) 0 var(--space-xs);
  color: var(--c-text);
}

.post-body p { margin-bottom: var(--space-sm); }

.post-body ul, .post-body ol {
  margin: 0 0 var(--space-sm) var(--space-md);
}
.post-body li { margin-bottom: 0.4rem; }

.post-body blockquote {
  border-left: 3px solid var(--c-accent);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-md) 0;
  font-size: 1.05rem;
  color: var(--c-text-muted);
  background: var(--c-accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-body img {
  border-radius: var(--radius);
  margin: var(--space-md) 0;
}

.post-body strong { font-weight: 600; }

.post-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--c-primary-light);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

/* --- About page --- */
.about-profile {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--c-border);
  margin-bottom: var(--space-md);
}

.page-body p { margin-bottom: var(--space-sm); }
.page-body h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin: var(--space-lg) 0 var(--space-sm);
  color: var(--c-text);
  letter-spacing: -0.02em;
}
.page-body h3, .page-body h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: var(--space-md) 0 var(--space-xs);
}
.page-body h3 { font-size: 1.2rem; }
.page-body h4 { font-size: 1.05rem; color: var(--c-leaf); }

.page-body a { text-decoration: underline; text-underline-offset: 3px; }
.page-body a:hover { text-decoration-color: var(--c-lime); }

/* --- Timeline (Experience) --- */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 2.4rem;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--c-primary), var(--c-border-light));
}

.timeline__section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--c-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-md);
  padding-left: 0;
  position: relative;
  left: -28px;
}

.timeline__group {
  position: relative;
  padding-bottom: 1.75rem;
}
.timeline__group:last-child { padding-bottom: 0; }

.timeline__marker {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--c-surface);
  border: 2px solid var(--c-primary);
  z-index: 1;
}
.timeline__marker--sm {
  width: 7px;
  height: 7px;
  left: -26px;
  top: 6px;
  border-color: var(--c-leaf);
}

.timeline__content {}

.timeline__role {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.timeline__company {
  font-size: 0.88rem;
  color: var(--c-text-muted);
  margin-top: 0.15rem;
}

.timeline__tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--c-accent);
  background: var(--c-accent-light);
  padding: 0.15em 0.5em;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 0.25rem;
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--c-leaf);
  margin-top: 0.2rem;
  letter-spacing: 0.01em;
}

.timeline__desc {
  font-size: 0.88rem;
  color: var(--c-text-muted);
  margin-top: 0.5rem;
  line-height: 1.6;
}

.timeline__list {
  margin: 0.5rem 0 0 1.2rem;
  font-size: 0.85rem;
  color: var(--c-text-muted);
  line-height: 1.6;
}
.timeline__list li { margin-bottom: 0.25rem; }
.timeline__list li::marker { color: var(--c-lime); }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--c-border-light);
  background: var(--c-surface);
}

.footer-inner {
  max-width: var(--nav-max-w);
  margin: 0 auto;
  padding: 1.5rem var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--c-text-muted);
}

.footer-left {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.footer-right {
  display: flex;
  gap: 6px;
  align-items: center;
}
.footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* --- Bottom accent bar --- */
.bottom-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--c-accent) 0%, var(--c-lime) 50%, var(--c-primary) 100%);
}

/* --- Responsive --- */
@media (max-width: 640px) {
  html { font-size: 16px; }
  .site-header__inner { flex-direction: column; gap: var(--space-sm); }
  .site-nav { gap: 0; }
  .page-title { font-size: 2.1rem; }
  .post-header__title { font-size: 2.1rem; }
  .content-wrap { padding: var(--space-md) 1rem var(--space-lg); }
  .post-card { padding: var(--space-sm); gap: 0 var(--space-sm); }
  .footer-inner { flex-direction: column; gap: 0.75rem; }
}
