/* style.css */
:root {
  --bg: #f2efe9;
  --surface: #e8e4db;
  --text: #2e3b2b;
  --text-soft: #4a5a44;
  --accent: #6f7e62;
  --border: #d1cbbc;
  --card: #faf8f3;
  --font: 'Iowan Old Style', 'Palatino', 'Times New Roman', serif;
  --mono: 'SF Mono', 'Fira Mono', 'Cascadia Code', monospace;
  --wrap: 1100px;
}

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

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

.wrapper {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* header */
header {
  padding: 2rem 0 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

header .wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

.logo svg {
  color: var(--accent);
  flex-shrink: 0;
}

nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: var(--text-soft);
  font-size: 1.05rem;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

nav a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

nav a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 500;
}

/* main */
main {
  flex: 1;
}

h1 {
  font-size: 2.6rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.2rem;
  max-width: 65ch;
}

a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-underline-offset: 0.15em;
}

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

/* hero */
.hero {
  padding: 1.5rem 0 2rem;
  max-width: 720px;
}

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

.hero p {
  font-size: 1.2rem;
  color: var(--text-soft);
  margin-bottom: 2rem;
}

/* buttons */
.btn {
  display: inline-block;
  background-color: var(--text);
  color: var(--bg);
  padding: 0.7rem 1.8rem;
  text-decoration: none;
  border-radius: 2px;
  font-size: 1rem;
  letter-spacing: 0.02em;
  border: 1px solid var(--text);
  transition: background 0.2s, color 0.2s;
}

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

/* grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin: 2rem 0;
}

article {
  background: var(--card);
  padding: 1.8rem;
  border-radius: 2px;
  border: 1px solid var(--border);
}

article h2 {
  font-size: 1.4rem;
}

/* page intro */
.page-intro {
  margin-bottom: 2.5rem;
  max-width: 750px;
}

.page-intro p {
  font-size: 1.2rem;
  color: var(--text-soft);
}

/* list */
ul {
  list-style: none;
  margin: 1rem 0;
}

ul li {
  margin-bottom: 0.6rem;
  padding-left: 0.2rem;
}

.quiet-list li {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
}

/* gallery */
.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

figure {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1rem 1rem 0.8rem;
}

.gallery-svg {
  width: 100%;
  height: auto;
  display: block;
  background: var(--surface);
  border-radius: 2px;
}

figcaption {
  font-size: 0.95rem;
  color: var(--text-soft);
  margin-top: 0.6rem;
  font-family: var(--mono);
}

/* footer */
footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 2rem 0;
  font-size: 0.95rem;
  color: var(--text-soft);
}

footer .wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

footer a {
  color: var(--text-soft);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}

footer a:hover {
  color: var(--text);
}

/* responsive */
@media (max-width: 650px) {
  .wrapper {
    padding: 0 1.2rem;
  }

  header .wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  nav {
    gap: 1.2rem;
  }

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

  h1 {
    font-size: 2rem;
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }

  footer .wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }
}