@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,700;9..40,800;9..40,900&family=DM+Serif+Display&display=swap');

:root {
  --bg: #faf6f1;
  --surface: #ffffff;
  --surface-2: #f5f0ea;
  --text: #1a1410;
  --text-2: #5c5248;
  --muted: #8a7e72;
  --accent: #e8614a;
  --accent-dark: #c8452f;
  --accent-2: #3a7d74;
  --accent-3: #d4a853;
  --border: #e8e0d6;
  --border-2: #d6ccc0;
  --shadow: 0 2px 12px rgba(26,20,16,0.06);
  --shadow-lg: 0 8px 32px rgba(26,20,16,0.10);
  --radius: 16px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: rgba(232,97,74,0.15); color: var(--accent-dark); }

.container {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.narrow { max-width: 860px; }

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 72px;
  background: rgba(250,246,241,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 8px;
}

.brand-text {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--text);
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-link, .nav-main-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.nav-link:hover, .nav-main-link:hover {
  color: var(--accent);
  background: rgba(232,97,74,0.06);
}

.nav-dropdown {
  height: 72px;
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-arrow {
  margin-left: 5px;
  font-size: 10px;
  color: var(--muted);
}

.nav-menu {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  min-width: 200px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
}

.nav-dropdown:hover .nav-menu {
  display: grid;
  gap: 2px;
}

.nav-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.nav-menu a:hover {
  background: rgba(232,97,74,0.06);
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.contact-button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

/* ─── Hero ─── */
.hero {
  padding: 100px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 10% 30%, rgba(232,97,74,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 90% 70%, rgba(58,125,116,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-single {
  max-width: 800px;
  text-align: center;
  position: relative;
}

.hero-text {
  position: relative;
}

.welcome-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 16px;
  font-family: 'DM Serif Display', serif;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 400;
  letter-spacing: -0.04em;
  color: var(--text);
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 36px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 32px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(232,97,74,0.3);
}

.primary-button:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232,97,74,0.35);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 32px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.secondary-button:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ─── Section ─── */
.section {
  padding: 64px 0;
}

.page-top {
  padding-top: 72px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 32px;
}

.section-heading-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 400;
  color: var(--text);
}

.section-heading a {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.section-heading a:hover {
  opacity: 0.7;
}

/* ─── Post Grid ─── */
.post-grid,
.project-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.post-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.post-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.post-cover {
  height: 160px;
  flex: 0 0 160px;
  overflow: hidden;
  position: relative;
}

.post-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(250,246,241,0.15));
}

.post-cover-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-cover-image img {
  transform: scale(1.08);
}

.post-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 10px;
}

.post-category {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-body h3 {
  margin: 0;
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--text);
  transition: color 0.2s;
}

.post-card:hover .post-body h3 {
  color: var(--accent);
}

.post-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-footer {
  margin-top: auto;
  padding: 8px 22px 18px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.post-footer span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ─── Project Card ─── */
.project-card {
  border-radius: var(--radius);
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-2);
  box-shadow: var(--shadow-lg);
}

.project-card h3 {
  margin: 0 0 10px;
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--text);
}

.project-card p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

/* ─── Category Card ─── */
.category-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-2);
  box-shadow: var(--shadow-lg);
}

.category-cover {
  height: 160px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card:hover .category-cover img {
  transform: scale(1.08);
}

.category-card-body {
  padding: 20px 22px 22px;
}

.category-card-body span {
  display: inline-block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.category-card-body h3 {
  margin: 0;
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--text);
}

/* ─── Page Headers ─── */
.page-header {
  padding-top: 72px;
  padding-bottom: 16px;
}

.page-header h1 {
  margin: 8px 0 12px;
  font-family: 'DM Serif Display', serif;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.04;
  font-weight: 400;
  letter-spacing: -0.04em;
  color: var(--text);
}

.page-header p {
  color: var(--text-2);
  font-size: 16px;
  max-width: 600px;
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-kicker::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--accent-2);
  border-radius: 2px;
}

/* ─── Article ─── */
.article-page {
  padding-bottom: 64px;
}

.back-link {
  display: block;
  text-align: right;
  margin-top: 40px;
}
.back-link span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  transition: all 0.2s ease;
}
.back-link:hover span {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(232,97,74,0.08);
}

.article-header h1 {
  margin: 12px 0 16px;
  font-family: 'DM Serif Display', serif;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.article-header p {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.7;
  max-width: 640px;
}

.post-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.article-content {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text-2);
  margin-top: 36px;
}

.article-content h2 {
  margin: 40px 0 14px;
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--text);
}

.article-content h2:first-child { margin-top: 0; }
.article-content h3 {
  margin: 28px 0 10px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}

.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { margin: 12px 0; padding-left: 24px; }
.article-content li { margin-bottom: 6px; }

.article-content a {
  color: var(--accent);
  border-bottom: 1px solid rgba(232,97,74,0.2);
  transition: border-color 0.15s;
}

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

.article-content pre {
  overflow-x: auto;
  margin: 24px 0;
  padding: 24px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13.5px;
  line-height: 1.6;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.03);
}

.article-content code {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 13px;
  color: var(--accent-dark);
  background: rgba(232,97,74,0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

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

.article-content blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--accent-2);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  color: var(--text-2);
  font-style: italic;
}

/* ─── Search ─── */
.posts-toolbar {
  margin: 16px 0 32px;
  max-width: 560px;
}

.posts-toolbar input {
  width: 100%;
  height: 50px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
}

.posts-toolbar input::placeholder { color: var(--muted); }

.posts-toolbar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,97,74,0.1);
}

/* ─── Empty State ─── */
.empty-state {
  grid-column: 1 / -1;
  padding: 40px 24px;
  text-align: center;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 15px;
}

/* ─── Footer ─── */
.site-footer {
  margin-top: 80px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-links a {
  font-weight: 600;
  color: var(--text-2);
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--accent);
}

/* ─── Decorative Divider ─── */
.section-divider {
  width: 40px;
  height: 3px;
  background: var(--accent-3);
  border-radius: 3px;
  margin: 0 auto 32px;
}

/* ─── Responsive ─── */
@media (max-width: 950px) {
  .mobile-menu-button {
    display: flex;
  }

  .header-actions {
    display: none;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 24px;
    right: 24px;
    height: auto;
    margin: 0;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-dropdown {
    height: auto;
    display: block;
  }

  .nav-link, .nav-main-link {
    width: 100%;
    height: 44px;
    justify-content: space-between;
  }

  .nav-menu {
    position: static;
    display: grid;
    min-width: 0;
    margin: 2px 0 8px;
    box-shadow: none;
    background: transparent;
    border: none;
    padding: 0 0 0 14px;
  }

  .nav-dropdown:hover .nav-menu {
    display: grid;
  }

  .hero-grid { grid-template-columns: 1fr; }
  .post-grid, .project-grid, .category-grid { grid-template-columns: 1fr; }
  .section-heading { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 560px) {
  .container { width: calc(100% - 28px); }
  .brand-text { font-size: 18px; }
  .hero { padding: 60px 0 40px; }
  .hero h1 { font-size: 36px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .primary-button, .secondary-button { width: 100%; justify-content: center; }
  .post-cover { height: 140px; flex-basis: 140px; }
  .section-heading h2 { font-size: 28px; }
}
