@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500&display=swap');

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

:root {
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --text: #1C1C1A;
  --muted: #6B6860;
  --accent: #3D7EAA;
  --accent-dark: #2E6089;
  --border: #E2DED8;
  --radius: 10px;
  --max: 1100px;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 300;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* NAV */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* HERO */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
}

.hero-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 680px;
  margin-bottom: 1.25rem;
}

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

.hero p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 2rem;
  font-weight: 300;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  text-decoration: none;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  margin-left: 0.75rem;
}

.btn-ghost:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* SECTION */
section { padding: 4rem 2rem; }

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 520px;
  margin-bottom: 2.5rem;
}

/* DIVIDER */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  max-width: var(--max);
  margin: 0 auto;
}

/* LATEST POSTS — homepage cards (small) */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.post-tag {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.post-card h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.post-card p {
  font-size: 0.88rem;
  color: var(--muted);
  flex: 1;
  margin-bottom: 1rem;
}

.post-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.post-meta::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1px;
  background: var(--border);
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.stat-box .num {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-box .label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 300;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); }

.contact-form textarea { resize: vertical; min-height: 120px; }

.contact-info p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.contact-detail strong { color: var(--text); }

/* BLOG PAGE — full list */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
  transition: border-color 0.2s;
}

.blog-card:hover { border-color: var(--accent); }

.blog-card-body h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.blog-card-body h2 a { color: var(--text); }
.blog-card-body h2 a:hover { color: var(--accent); text-decoration: none; }

.blog-card-body p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.blog-card-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  gap: 1rem;
}

.blog-card-aside {
  text-align: right;
  min-width: 100px;
}

.read-more {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
}

/* TOOLS PAGE */
.tools-intro {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 600px;
  margin-bottom: 2.5rem;
}

.tools-category {
  margin-bottom: 3rem;
}

.tools-category h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.tool-name {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.tool-desc {
  font-size: 0.83rem;
  color: var(--muted);
  flex: 1;
  margin-bottom: 0.75rem;
}

.tool-link {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
}

.affiliate-note {
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 2rem;
}

/* PAGE HERO (inner pages) */
.page-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 2rem 2.5rem;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: var(--muted);
  font-size: 1rem;
  max-width: 520px;
}

/* FOOTER */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--text);
}

.footer-logo span { color: var(--accent); }

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
  width: 100%;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

/* MOBILE */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    gap: 1.25rem;
  }

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

  nav { position: relative; }

  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }

  .blog-card { grid-template-columns: 1fr; }
  .blog-card-aside { text-align: left; }

  .hero { padding: 3rem 1.5rem 2.5rem; }
  section { padding: 3rem 1.5rem; }

  .btn-ghost { margin-left: 0; margin-top: 0.5rem; }
}
