/* ============================================
   TOKENS — change fonts and colors here only
   ============================================ */

@font-face {
  font-family: 'Departure Mono';
  src: url('/fonts/DepartureMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-primary: 'Departure Mono', 'Geist Mono', monospace;

  --color-fg: #2C1A0E;
  --color-bg: #ffffff;
  --color-fg-muted: rgba(44, 26, 14, 0.38);
  --color-fg-mid: rgba(44, 26, 14, 0.60);
  --color-timeline: rgba(44, 26, 14, 0.12);
}

/* ============================================
   RESET
   ============================================ */

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

/* ============================================
   BASE
   ============================================ */

html, body {
  height: 100%;
}

html {
  font-size: 12px;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-fg);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--color-fg);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============================================
   LAYOUT
   ============================================ */

.site {
  padding: 28px 28px 0;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

main {
  flex: 1;
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
  margin-bottom: 24px;
}

.site-name {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  cursor: default;
  pointer-events: none;
}

/* ============================================
   HOME — TWO COLUMN
   ============================================ */

.columns {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 0;
}

.col-l {
  padding-right: 28px;
}

.col-r {
  padding-left: 28px;
}

.col-head {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-fg-muted);
  margin-bottom: 16px;
}

/* ============================================
   WRITING LIST
   ============================================ */

.post-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
}

.post-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

.post-meta {
  color: var(--color-fg-muted);
  margin-bottom: 2px;
}

.post-title {
  font-weight: 400;
  margin-bottom: 4px;
}

.post-desc {
  color: var(--color-fg-mid);
  line-height: 1.55;
}

/* ============================================
   PROJECTS TIMELINE
   ============================================ */

.proj-row {
  display: flex;
}

.proj-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 12px;
  padding-top: 5px;
  flex-shrink: 0;
}

.proj-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-fg);
  opacity: 0.4;
}

.proj-dot.active {
  opacity: 0.9;
}

.proj-stem {
  width: 1px;
  background: var(--color-timeline);
  flex: 1;
  min-height: 32px;
  margin-top: 4px;
}

.proj-body {
  flex: 1;
  padding-bottom: 18px;
}

.proj-row:last-child .proj-body {
  padding-bottom: 0;
}

.proj-meta {
  color: var(--color-fg-muted);
  margin-bottom: 2px;
}

.proj-title {
  font-weight: 400;
}

/* ============================================
   INNER PAGES (blog post + project)
   ============================================ */

.inner-page {
  max-width: 860px;
}

.back-link {
  display: inline-block;
  color: var(--color-fg-muted);
  margin-bottom: 24px;
}

.back-link:hover {
  color: var(--color-fg);
  text-decoration: none;
}

.page-title {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.page-meta {
  color: var(--color-fg-muted);
  margin-bottom: 28px;
}

.page-body {
  color: var(--color-fg-mid);
  line-height: 1.8;
}

.page-body p {
  margin-bottom: 16px;
}

.page-body p:last-child {
  margin-bottom: 0;
}

.proj-link {
  display: inline-block;
  margin-top: 28px;
  color: var(--color-fg);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  padding: 24px 0;
  color: var(--color-fg-muted);
  display: flex;
  gap: 16px;
  margin-top: auto;
  background: var(--color-bg);
  position: sticky;
  bottom: 0;
}

.site-footer a {
  color: var(--color-fg-muted);
}

.site-footer a:hover {
  color: var(--color-fg);
  text-decoration: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */

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

  .col-l {
    padding-right: 0;
    margin-bottom: 36px;
  }

  .col-r {
    padding-left: 0;
  }
}