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

:root {
  --text: #1a1a1a;
  --text-muted: #666;
  --bg: #fafaf8;
  --bg-card: #fff;
  --accent: #2d5a3d;
  --accent-hover: #1e3d2a;
  --border: #e0ddd8;
  --serif: 'EB Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
}

html { font-size: 18px; }

body {
  font-family: var(--serif);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Navigation === */
nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}

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

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

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

/* === Main Content === */
main {
  flex: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
}

.hero {
  padding: 2rem 0;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.hero .subtitle {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero p {
  margin-bottom: 1rem;
}

.content h1 {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.content p {
  margin-bottom: 1rem;
}

.content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

/* === Card Grid (Writing page) === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

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

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card h2 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--accent);
}

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

/* === Contact Form === */
.contact-form {
  margin-top: 2rem;
  max-width: 500px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: var(--serif);
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--text);
  transition: border-color 0.2s;
}

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

.contact-form button {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.65rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.contact-form button:hover {
  background: var(--accent-hover);
}

.form-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

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

/* === Responsive === */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .hero h1 { font-size: 2rem; }
  .nav-links { gap: 1rem; }
  .form-row { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
}
