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

:root {
  --bg: #F5F2ED;
  --bg-card: #FDFCFA;
  --bg-hover: #EDEAE3;
  --border: #DDD9D2;
  --border-hover: #C8C4BC;
  --ink: #1A1814;
  --ink2: #6B6760;
  --ink3: #B0ADA8;
  --accent: #C4531A;
  --accent-light: #F0E4DC;
  --accent-border: #E8C4AF;
  --serif: 'DM Serif Display', Georgia, serif;
  --mono: 'DM Mono', monospace;
  --sans: 'DM Sans', sans-serif;
}

[data-theme="dark"] {
  --bg: #141210;
  --bg-card: #1C1A17;
  --bg-hover: #222018;
  --border: #2A2724;
  --border-hover: #3A3734;
  --ink: #E8E4DE;
  --ink2: #9C9890;
  --ink3: #5A5754;
  --accent: #D4673A;
  --accent-light: #2A1A10;
  --accent-border: #3A2218;
}

html { background: var(--bg); color: var(--ink); font-family: var(--sans); scroll-behavior: smooth; transition: background 0.2s, color 0.2s; }

/* NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 56px;
  transition: background 0.2s, border-color 0.2s;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink2);
  text-decoration: none;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.15s;
}

.nav-links a:hover { color: var(--ink); background: var(--bg-hover); }
.nav-links a.active { color: var(--accent); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink2);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}

.nav-btn:hover { border-color: var(--border-hover); color: var(--ink); background: var(--bg-hover); }
.nav-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-theme { font-family: var(--mono); font-size: 10px; width: auto; padding: 0 10px; gap: 5px; letter-spacing: 0.04em; }

/* PAGE WRAPPER */
.page { padding-top: 56px; min-height: 100vh; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 48px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 48px; }

/* SECTION LABEL */
.section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 80px;
}
.footer p { font-family: var(--mono); font-size: 11px; color: var(--ink3); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-family: var(--mono); font-size: 11px; color: var(--ink3); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--ink); }

/* BUTTONS */
.btn-primary { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; background: var(--ink); color: var(--bg); padding: 11px 22px; border-radius: 4px; text-decoration: none; transition: all 0.2s; display: inline-block; }
.btn-primary:hover { background: var(--accent); }
.btn-secondary { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; background: transparent; color: var(--ink2); padding: 11px 22px; border-radius: 4px; border: 1px solid var(--border); text-decoration: none; transition: all 0.2s; display: inline-block; }
.btn-secondary:hover { border-color: var(--ink2); color: var(--ink); }

/* POST CARD */
.post-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: padding-left 0.15s;
}
.post-item:first-child { border-top: 1px solid var(--border); }
.post-item:hover { padding-left: 8px; }
.post-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.post-series { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--accent); text-transform: uppercase; }
.post-divider { width: 1px; height: 10px; background: var(--border-hover); }
.post-platform { font-family: var(--mono); font-size: 10px; color: var(--ink3); }
.post-title { font-size: 15px; font-weight: 400; color: var(--ink); line-height: 1.4; margin-bottom: 6px; transition: color 0.15s; }
.post-item:hover .post-title { color: var(--accent); }
.post-excerpt { font-size: 13px; color: var(--ink2); line-height: 1.5; font-weight: 300; }
.post-date { font-family: var(--mono); font-size: 11px; color: var(--ink3); white-space: nowrap; margin-top: 4px; }

/* PROJECT CARD */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
  display: block;
}
.project-card:hover { border-color: var(--ink3); transform: translateY(-2px); }
.project-icon { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 0.06em; margin-bottom: 12px; }
.project-name { font-family: var(--serif); font-size: 17px; color: var(--ink); margin-bottom: 8px; line-height: 1.3; }
.project-desc { font-size: 13px; color: var(--ink2); line-height: 1.6; font-weight: 300; margin-bottom: 16px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.project-tag { font-family: var(--mono); font-size: 10px; color: var(--ink3); background: var(--bg); padding: 3px 8px; border-radius: 2px; letter-spacing: 0.02em; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .container, .container-narrow { padding: 0 20px; }
  .footer { padding: 32px 20px; flex-direction: column; gap: 16px; align-items: flex-start; }
}
