/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #faf8f5;
  --bg-card: #ffffff;
  --text: #2d2a26;
  --text-muted: #6b6560;
  --accent: #3d7a8a;
  --accent-hover: #2e5f6d;
  --border: #e8e3dd;
  --shadow: 0 2px 8px rgba(45, 42, 38, 0.08);
  --radius: 8px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Lora', Georgia, serif;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 600;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.15rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

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

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.35rem;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ===== Header / Nav ===== */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
  max-width: 900px;
}

.site-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.site-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

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

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

/* ===== Main Content ===== */
main {
  padding: 3rem 0 4rem;
  min-height: calc(100vh - 160px);
}

/* ===== Homepage ===== */
.hero {
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
}

.hero .subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero .intro {
  font-size: 1.05rem;
  max-width: 600px;
}

.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.home-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: var(--text);
  display: block;
}

.home-card:hover {
  box-shadow: 0 4px 16px rgba(45, 42, 38, 0.12);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}

.home-card h3 {
  margin-top: 0;
  font-size: 1.05rem;
  color: var(--accent);
}

.home-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ===== Page Content ===== */
.page-content h1:first-child {
  margin-bottom: 0.5rem;
}

.page-content .page-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* ===== Projects ===== */
.project-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: box-shadow 0.2s, transform 0.2s;
}

.project-card:hover {
  box-shadow: 0 4px 16px rgba(45, 42, 38, 0.12);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}

.project-card h3 {
  margin-top: 0;
  color: var(--accent);
}

.project-card p {
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 0.95rem;
}

.project-card .tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(61, 122, 138, 0.1);
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  margin-right: 0.35rem;
  margin-bottom: 0.5rem;
}

/* ===== Blog ===== */
.post-list {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
}

.post-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list a {
  font-weight: 500;
  font-size: 1.05rem;
}

.post-date {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.post-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ===== Contact ===== */
.contact-links {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
}

.contact-links li {
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.contact-links .label {
  font-weight: 600;
  display: inline-block;
  min-width: 100px;
}

/* ===== Services ===== */
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.service-card h3 {
  margin-top: 0;
  color: var(--accent);
}

.service-card p:last-child {
  margin-bottom: 0;
}

.cta-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.65rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s;
}

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

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  .nav-toggle {
    display: flex;
  }

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

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

  .site-header {
    position: relative;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .home-cards {
    grid-template-columns: 1fr;
  }
}
