/* Self-hosted fonts */
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 300; font-display: swap; src: url(/fonts/dm-mono-300.woff2) format('woff2'); }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/dm-mono-400.woff2) format('woff2'); }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/dm-mono-500.woff2) format('woff2'); }
@font-face { font-family: 'DM Mono'; font-style: italic; font-weight: 300; font-display: swap; src: url(/fonts/dm-mono-300-italic.woff2) format('woff2'); }
@font-face { font-family: 'DM Mono'; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/dm-mono-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 300 500; font-display: swap; src: url(/fonts/dm-sans-300-500.woff2) format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: italic; font-weight: 300 500; font-display: swap; src: url(/fonts/dm-sans-300-italic.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif-400.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif-400-italic.woff2) format('woff2'); }

:root {
  --fg: #1a1a1a;
  --fg-muted: #4b4b4b;
  --fg-subtle: #676767;
  --bg: #f5f2ed;
  --bg-card: #eae6df;
  --accent: #8e3418;
  --accent-hover: #7a2d15;
  --border: #d4d0c8;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'DM Mono', 'Courier New', monospace;
  --sans: 'DM Sans', -apple-system, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.25rem 2.5rem;
  display: flex; justify-content: space-between; align-items: center;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  background: rgba(245, 242, 237, 0.85);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--mono); font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: lowercase;
}
.nav-logo a { color: var(--fg); text-decoration: none; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-family: var(--mono); font-size: 0.75rem; text-decoration: none;
  color: var(--fg-muted); letter-spacing: 0.05em; transition: color 0.2s;
}
.nav-links a:hover, .nav-links .active { color: var(--accent); }

/* BUTTONS */
.btn-primary {
  display: inline-block; font-family: var(--mono); font-size: 0.78rem;
  letter-spacing: 0.05em; padding: 0.85rem 2rem; background: var(--fg);
  color: var(--bg); text-decoration: none; border: none; cursor: pointer;
  transition: background 0.25s, transform 0.2s;
}
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); }
.btn-ghost {
  display: inline-block; font-family: var(--mono); font-size: 0.78rem;
  letter-spacing: 0.05em; padding: 0.85rem 2rem; background: transparent;
  color: var(--fg); text-decoration: none; border: 1px solid var(--border);
  cursor: pointer; transition: border-color 0.25s, color 0.25s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* SECTIONS */
section { padding: 6rem 2.5rem; max-width: 1100px; margin: 0 auto; }
.section-label {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-subtle); margin-bottom: 1rem;
}
.section-label::before { content: '— '; color: var(--accent); }
.section-title {
  font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 400;
  line-height: 1.15; letter-spacing: -0.015em; margin-bottom: 3rem;
}
.divider { max-width: 1100px; margin: 0 auto; padding: 0 2.5rem; }
.divider hr { border: none; border-top: 1px solid var(--border); }

/* FOOTER */
footer {
  padding: 2rem 2.5rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1100px; margin: 0 auto;
}
footer span { font-family: var(--mono); font-size: 0.7rem; color: var(--fg-muted); letter-spacing: 0.04em; }
footer a { color: var(--fg-muted); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--accent); }

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* HERO */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 8rem 2.5rem 6rem; max-width: 1100px; margin: 0 auto;
}
.hero-label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 2rem;
  opacity: 0; animation: fadeUp 0.6s ease forwards 0.2s;
}
.hero h1 {
  font-family: var(--serif); font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 400;
  line-height: 1.1; letter-spacing: -0.02em; max-width: 900px;
  opacity: 0; animation: fadeUp 0.8s ease forwards 0.4s;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-family: var(--sans); font-size: 1.1rem; color: var(--fg-muted);
  margin-top: 2rem; max-width: 560px; line-height: 1.7;
  opacity: 0; animation: fadeUp 0.8s ease forwards 0.6s;
}
.hero-cta {
  margin-top: 3rem; display: flex; gap: 1rem; align-items: center;
  opacity: 0; animation: fadeUp 0.8s ease forwards 0.8s;
}

/* SERVICES */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.service-card {
  background: var(--bg-card); border: 1px solid var(--border); padding: 2.5rem;
  transition: border-color 0.3s, transform 0.25s; position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 0;
  background: var(--accent); transition: height 0.4s ease;
}
.service-card:hover::before { height: 100%; }
.service-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.service-num { font-family: var(--mono); font-size: 0.68rem; color: var(--accent); letter-spacing: 0.08em; margin-bottom: 1rem; }
.service-card h3 { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; margin-bottom: 0.75rem; }
.service-card p { font-size: 0.9rem; color: var(--fg-muted); line-height: 1.65; }
.service-tag {
  display: inline-block; font-family: var(--mono); font-size: 0.65rem;
  letter-spacing: 0.06em; color: var(--fg-subtle); border: 1px solid var(--border);
  padding: 0.25rem 0.6rem; margin-top: 1.25rem; margin-right: 0.35rem;
}

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.about-intro { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.25rem; }
.avatar {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: top;
  filter: grayscale(100%); transition: filter 0.4s ease;
  border: 1px solid var(--border); flex-shrink: 0;
}
.avatar:hover { filter: grayscale(0%); }
.about-intro p { font-size: 1.05rem; line-height: 1.4; color: var(--fg-muted); }
.about-intro strong { color: var(--fg); font-weight: 500; }
.about-text { font-size: 1.05rem; line-height: 1.75; color: var(--fg-muted); }
.about-text strong { color: var(--fg); font-weight: 500; }
.credentials { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 6rem; }
.credential-item { border-left: 2px solid var(--border); padding-left: 1.25rem; transition: border-color 0.3s; }
.credential-item:hover { border-color: var(--accent); }
.credential-item h3 { font-family: var(--mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; color: var(--fg); margin-bottom: 0.2rem; }
.credential-item span { font-size: 0.82rem; color: var(--fg-subtle); }

/* APPROACH */
.approach-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2rem; }
.step { position: relative; padding-top: 2rem; }
.step::before { content: ''; position: absolute; top: 0; left: 0; width: 40px; height: 1px; background: var(--accent); }
.step h3 { font-family: var(--mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.step p { font-size: 0.88rem; color: var(--fg-muted); line-height: 1.6; }

/* BLOG CARDS (homepage preview) */
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.blog-card {
  background: var(--bg-card); border: 1px solid var(--border); padding: 2.25rem;
  text-decoration: none; color: inherit; display: block;
  transition: border-color 0.3s, transform 0.25s;
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.blog-meta {
  font-family: var(--mono); font-size: 0.68rem; color: var(--fg-subtle);
  letter-spacing: 0.06em; margin-bottom: 0.75rem;
  display: flex; gap: 1rem; align-items: center;
}
.blog-meta .tag {
  color: var(--accent); border: 1px solid var(--accent); padding: 0.15rem 0.5rem;
  font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.blog-card h3 {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 400;
  line-height: 1.3; margin-bottom: 0.6rem;
}
.blog-card p { font-size: 0.88rem; color: var(--fg-muted); line-height: 1.6; }
.blog-card .read-more {
  display: inline-block; margin-top: 1.25rem; font-family: var(--mono);
  font-size: 0.72rem; color: var(--accent); letter-spacing: 0.05em;
  transition: opacity 0.2s;
}
.blog-card:hover .read-more { opacity: 0.7; }
.blog-all { margin-top: 2.5rem; text-align: center; }

/* CONTACT */
.contact-section { padding: 6rem 2.5rem 4rem; max-width: 1100px; margin: 0 auto; }
.contact-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 3rem; }
.contact-inner .section-title { margin-bottom: 1rem; }
.contact-detail { font-family: var(--mono); font-size: 0.82rem; color: var(--fg-muted); line-height: 2; }
.contact-detail a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--border); transition: border-color 0.2s, color 0.2s; }
.contact-detail a:hover { border-color: var(--accent); color: var(--accent); }

/* BLOG INDEX (listing page) */
.page-header { padding: 10rem 2.5rem 4rem; max-width: 1100px; margin: 0 auto; }
.page-header h1 {
  font-family: var(--serif); font-size: clamp(2.2rem, 4.5vw, 3.5rem); font-weight: 400;
  line-height: 1.15; letter-spacing: -0.015em;
}
.page-header p { font-size: 1.05rem; color: var(--fg-muted); margin-top: 1.25rem; max-width: 600px; line-height: 1.7; }
.blog-list {
  padding: 0 2.5rem 6rem; max-width: 1100px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 1px;
}
.blog-list-item {
  display: grid; grid-template-columns: 140px 1fr auto; align-items: baseline;
  gap: 2rem; padding: 2rem 0; border-top: 1px solid var(--border);
  text-decoration: none; color: inherit; transition: background 0.2s;
}
.blog-list-item:last-child { border-bottom: 1px solid var(--border); }
.blog-list-item:hover { background: var(--bg-card); margin: 0 -1.5rem; padding: 2rem 1.5rem; }
.blog-list-date {
  font-family: var(--mono); font-size: 0.75rem; color: var(--fg-subtle); letter-spacing: 0.04em;
  white-space: nowrap;
}
.blog-list-content h2 {
  font-family: var(--serif); font-size: 1.4rem; font-weight: 400; line-height: 1.3; margin-bottom: 0.4rem;
}
.blog-list-content p { font-size: 0.88rem; color: var(--fg-muted); line-height: 1.55; }
.blog-list-tag {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent);
  padding: 0.2rem 0.55rem; white-space: nowrap; align-self: center;
}

/* BLOG POST */
.post-header { padding: 10rem 2.5rem 3rem; max-width: 740px; margin: 0 auto; }
.post-back {
  display: inline-block; font-family: var(--mono); font-size: 0.72rem;
  color: var(--fg-subtle); text-decoration: none; letter-spacing: 0.05em;
  margin-bottom: 2.5rem; transition: color 0.2s;
}
.post-back:hover { color: var(--accent); }
.post-meta {
  font-family: var(--mono); font-size: 0.72rem; color: var(--fg-subtle);
  letter-spacing: 0.06em; margin-bottom: 1.25rem;
  display: flex; gap: 1.25rem; align-items: center;
}
.post-meta .tag {
  color: var(--accent); border: 1px solid var(--accent);
  padding: 0.15rem 0.55rem; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.post-header h1 {
  font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 400;
  line-height: 1.15; letter-spacing: -0.015em;
}
.post-header .lead { font-size: 1.1rem; color: var(--fg-muted); margin-top: 1.5rem; line-height: 1.7; }
.post-body { padding: 2rem 2.5rem 5rem; max-width: 740px; margin: 0 auto; }
.post-body p { font-size: 1.02rem; line-height: 1.82; color: var(--fg); margin-bottom: 1.6rem; }
.post-body h2 {
  font-family: var(--serif); font-size: 1.6rem; font-weight: 400;
  margin-top: 3rem; margin-bottom: 1rem; line-height: 1.25;
}
.post-body blockquote {
  border-left: 3px solid var(--accent); margin: 2rem 0;
  padding: 0.75rem 0 0.75rem 1.5rem;
  font-family: var(--serif); font-size: 1.15rem; font-style: italic;
  color: var(--fg-muted); line-height: 1.6;
}
.post-body code {
  font-family: var(--mono); font-size: 0.88rem; background: var(--bg-card);
  padding: 0.15rem 0.4rem; border: 1px solid var(--border);
}
.post-body em { color: var(--fg); }
.post-divider { max-width: 740px; margin: 0 auto; padding: 0 2.5rem; }
.post-divider hr { border: none; border-top: 1px solid var(--border); }
.post-footer {
  max-width: 740px; margin: 0 auto; padding: 3rem 2.5rem 5rem;
  display: flex; justify-content: space-between; align-items: center;
}
.post-footer-cta { font-family: var(--sans); font-size: 0.95rem; color: var(--fg-muted); line-height: 1.6; }
.post-footer-cta a {
  color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent);
  transition: opacity 0.2s;
}
.post-footer-cta a:hover { opacity: 0.7; }

/* LEGAL */
.legal-body { padding: 2rem 2.5rem 5rem; max-width: 740px; margin: 0 auto; }
.legal-body h2 {
  font-family: var(--serif); font-size: 1.4rem; font-weight: 400;
  margin-top: 2.5rem; margin-bottom: 0.75rem; line-height: 1.25;
}
.legal-body p { font-size: 0.95rem; line-height: 1.75; color: var(--fg); margin-bottom: 1rem; }
.legal-body a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent); }
.legal-body a:hover { opacity: 0.7; }

/* 404 */
.error-page {
  min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; align-items: center; padding: 2.5rem; text-align: center;
}
.error-page h1 {
  font-family: var(--serif); font-size: clamp(3rem, 8vw, 6rem); font-weight: 400;
  color: var(--accent); margin-bottom: 1rem;
}
.error-page p { font-size: 1.05rem; color: var(--fg-muted); margin-bottom: 2rem; }

/* RESPONSIVE */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1.25rem; }
  .hero { padding: 7rem 1.5rem 4rem; }
  section { padding: 4rem 1.5rem; }
  .services-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .credentials { margin-top: 0; }
  .approach-steps { grid-template-columns: 1fr; }
  .contact-inner { flex-direction: column; align-items: flex-start; }
  .contact-section { padding: 4rem 1.5rem 3rem; }
  footer { padding: 1.5rem; flex-wrap: wrap; gap: 0.5rem; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .page-header { padding: 8rem 1.5rem 3rem; }
  .blog-list { padding: 0 1.5rem 4rem; }
  .blog-list-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .blog-list-tag { justify-self: start; }
  .post-header { padding: 8rem 1.5rem 2rem; }
  .post-body { padding: 1.5rem 1.5rem 4rem; }
  .post-footer { padding: 2rem 1.5rem 4rem; flex-direction: column; gap: 1rem; align-items: flex-start; }
  .legal-body { padding: 1.5rem 1.5rem 4rem; }
}
@media (max-width: 480px) { .nav-links { display: none; } }
