/* --- Variables --- */
:root {
  --bg: #f5f0e6;
  --bg-elevated: #ebe5d8;
  --text: #2a2722;
  --text-muted: #5c564d;
  --accent: #c45c26;
  --accent-hover: #a84d1e;
  --h1-color: #c45c26;
  --border: darkgoldenrod;
  --radius: 6px;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-sans: "Outfit", system-ui, sans-serif;
  --space: 1.25rem;
  --container: min(90vw, 720px);
  --header-h: 4rem;
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
ul { list-style: none; margin: 0; padding: 0; }

/* --- Layout --- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--space); }
.section { padding: 2.5rem 0; }
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 400;
  color: var(--h1-color);
  margin: 0 0 1.25rem;
}

/* --- Header & nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 230, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-weight: 600;
  color: var(--text);
  font-size: 1.1rem;
}
.nav-logo:hover { color: var(--accent); text-decoration: none; }
.nav-menu {
  display: flex;
  gap: 1.5rem;
}
.nav-menu a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-menu a:hover { color: var(--text); text-decoration: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
}

/* --- Hero --- */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem var(--space) 2rem;
  max-width: var(--container);
  margin: 0 auto;
}
.hero-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--h1-color);
  margin: 0 0 1.25rem;
}
.hero-title em { font-style: italic; color: var(--accent-hover); }
.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 32ch;
  margin: 0 0 1.5rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-elevated); color: var(--accent); text-decoration: none; border-color: var(--accent); }

/* --- About --- */
.about { background: var(--bg-elevated); }
.about-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 600px) {
  .about-grid { grid-template-columns: 1fr 240px; }
}
.about-lead { font-size: 1.15rem; color: var(--text); margin-top: 0; }
.about-content p { margin: 0 0 1rem; color: var(--text-muted); }
.about-content p:last-of-type { margin-bottom: 0; }
.about-list {
  font-size: 0.95rem;
  color: var(--text-muted);
}
.about-list li { margin-bottom: 0.5rem; }
.about-list strong { color: var(--text); }

/* --- Skills --- */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.skills-list li {
  position: relative;
  padding-left: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.skills-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

/* --- Forms (2-up) --- */
.forms { background: var(--bg-elevated); }
.forms-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.form-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-width: 0; /* lets card shrink on narrow viewports */
}
.form-card:hover { border-color: var(--accent); }
.form-card-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  margin: 0 0 1rem;
  color: var(--text);
}
.form-card-image {
  aspect-ratio: 16 / 10;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px dashed var(--border);
  overflow: hidden;
  min-width: 0;
}
.form-card-image img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.form-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  flex-grow: 1;
}
.form-card-link {
  font-size: 0.95rem;
  font-weight: 600;
}
.form-card-link:hover { text-decoration: none; }

@media (max-width: 599px) {
  .forms-list { grid-template-columns: 1fr; }
}

/* --- Sites (other non-form work, 2-up) --- */
.sites { background: var(--bg); }
.sites-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
  color: var(--text);
  display: flex;
  flex-direction: column;
}
.site-card:hover { border-color: var(--accent); }
.site-card-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  margin: 0 0 1rem;
  color: var(--text);
}
.site-card-image {
  aspect-ratio: 16 / 10;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px dashed var(--border);
}
.site-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.site-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  flex-grow: 1;
}
.site-card-link {
  font-size: 0.95rem;
  font-weight: 600;
}
.site-card-link:hover { text-decoration: none; }

@media (max-width: 599px) {
  .sites-list { grid-template-columns: 1fr; }
}

/* --- Contact --- */
.contact { background: #ebe5d8; }
.contact-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  font-size: 1.05rem;
}
.contact-links a { font-weight: 500; }

/* --- Footer --- */
.site-footer {
  padding: 1.5rem var(--space);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

/* --- Mobile nav --- */
@media (max-width: 599px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s, opacity 0.2s, visibility 0.2s;
  }
  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav-menu li { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
  .nav-menu li:last-child { border-bottom: none; }
  .nav-menu a { font-size: 1rem; }
}
