:root {
  --bg: #1a1814;
  --bg-2: #211f1b;
  --bg-3: #2a2720;
  --surface: #302d26;
  --surface-2: #3a362d;
  --border: #3f3b31;

  --text: #e8e0d0;
  --text-muted: #9a9080;
  --text-faint: #5c5549;

  --green: #7a9e7e;
  --green-soft: #a8c5ac;
  --green-dim: #4a6b4e;
  --beige: #d4c4a0;
  --beige-soft: #ede0c4;
  --beige-dim: #7a6e56;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --font-body: "DM Sans", sans-serif;
  --font-mono: "DM Mono", monospace;

  --transition: 0.18s ease;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}

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

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
img {
  display: block;
  max-width: 100%;
}

/* --- Layout --- */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header / Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 24, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--beige-soft);
  letter-spacing: 0.04em;
  transition: color var(--transition);
}
.nav-logo:hover {
  color: var(--green-soft);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--green);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* --- Hero (homepage) --- */
.hero {
  padding: 80px 24px 60px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 620px;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--beige-soft);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 36px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-decor {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0.12;
  pointer-events: none;
  user-select: none;
}

.hero-decor span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--green-soft);
  text-transform: uppercase;
  text-align: right;
}

/* --- Buttons --- */
.btn-primary {
  display: inline-block;
  background: var(--green-dim);
  color: var(--beige-soft);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--green);
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition);
}
.btn-primary:hover {
  background: var(--green);
  color: var(--bg);
}

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition:
    border-color var(--transition),
    color var(--transition);
}
.btn-ghost:hover {
  border-color: var(--beige-dim);
  color: var(--text);
}

/* --- Intro strip --- */
.intro-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  padding: 14px 24px;
  overflow: hidden;
}

.intro-strip-inner {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}

.intro-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
}

/* --- About snap --- */
.about-snap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
  padding-top: 64px;
  padding-bottom: 64px;
}

.about-snap-text h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--beige-soft);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.about-snap-text p {
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 300;
}

.about-snap-text .btn-ghost {
  margin-top: 8px;
  font-size: 13px;
}

.about-snap-stats {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 150px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--green-soft);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
}

/* --- Section header --- */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--beige-soft);
  letter-spacing: -0.01em;
}

.view-all {
  font-size: 13px;
  color: var(--green);
  transition: color var(--transition);
}
.view-all:hover {
  color: var(--green-soft);
}

/* --- Recent / Projects section --- */
.recent {
  padding-bottom: 80px;
}

/* --- Post list --- */
.post-list,
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.post-item:first-child {
  border-top: 1px solid var(--border);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.post-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  border: 1px solid currentColor;
}

.cat-mods {
  color: var(--green);
}
.cat-code {
  color: var(--beige);
}
.cat-other {
  color: var(--text-muted);
}

time {
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

.post-item h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--beige-soft);
  line-height: 1.3;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.post-item h3 a {
  transition: color var(--transition);
}
.post-item h3 a:hover {
  color: var(--green-soft);
}

.post-item p {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 14px;
  max-width: 600px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}

.post-read {
  font-size: 13px;
  color: var(--green);
  font-weight: 500;
  transition: color var(--transition);
}
.post-read:hover {
  color: var(--green-soft);
}

/* --- Page hero (inner pages) --- */
.page-hero {
  padding: 64px 24px 48px;
}

.page-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  color: var(--beige-soft);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  margin-top: 16px;
}

.page-hero-sub {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 300;
  max-width: 520px;
}

/* --- Filter bar --- */
.filter-bar {
  display: flex;
  gap: 8px;
  padding-bottom: 32px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  border-color: var(--green-dim);
  color: var(--text);
}

.filter-btn.active {
  background: var(--green-dim);
  border-color: var(--green);
  color: var(--beige-soft);
}

/* --- About page body --- */
.about-body {
  padding-bottom: 80px;
}

.about-block {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.about-block:last-child {
  border-bottom: none;
}

.about-block h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--beige-soft);
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.about-block p {
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 12px;
  max-width: 580px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.about-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition);
}
.about-card:hover {
  border-color: var(--green-dim);
}

.about-card-icon {
  font-size: 22px;
  display: block;
  margin-bottom: 12px;
}

.about-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--beige-soft);
  margin-bottom: 8px;
}

.about-card p {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.6;
}

.principles {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.principle {
  padding-left: 16px;
  border-left: 2px solid var(--green-dim);
}

.principle-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--green-soft);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.principle p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.contact-block .btn-primary {
  margin-top: 4px;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 40px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--beige-soft);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  display: block;
}

.footer-inner p {
  font-size: 13px;
  color: var(--text-faint);
}

.footer-inner a {
  color: var(--green);
  transition: color var(--transition);
}
.footer-inner a:hover {
  color: var(--green-soft);
}

.footer-copy {
  font-size: 12px !important;
  color: var(--text-faint) !important;
  margin-top: 4px;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .about-snap {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-snap-stats {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px 32px;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .hero-decor {
    display: none;
  }
  .nav-links {
    gap: 20px;
  }
}

.btn-games {
  display: inline-block;
  background: #0d1b2a;
  color: #007acc;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid #007acc;
  transition:
    background var(--transition),
    color var(--transition);
}

.btn-games:hover {
  background: #007acc;
  color: #fff;
}
