/* Cosy Crochet Life
   Warm and earthy, Bergman & Co.'s big-photo calm, a Bake Off wink. */

:root {
  --cream: #f6efe3;
  --linen: #ece2d0;
  --ink: #3b2f27;
  --muted: #7a6a5c;
  --clay: #c98a6b;
  --rose: #d98b84;
  --sage: #b7bf96;
  --butter: #ecd08f;
  --duck: #a9c6c2;

  --serif: "Lora", "Fraunces", Georgia, serif; /* Lora supplies only the j and f */
  --sans: "Instrument Sans", system-ui, sans-serif;
}

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Bunting */
.bunting { display: block; width: 100%; height: 48px; }

/* Nav */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px clamp(20px, 5vw, 64px) 24px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 30px;
  font-style: italic;
  font-weight: 400;
}
.nav nav { display: flex; gap: clamp(16px, 3vw, 36px); font-size: 15px; letter-spacing: .02em; }

/* Photo placeholders */
.photo-note {
  position: absolute;
  left: 16px;
  bottom: 12px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(59, 47, 39, .55);
}
.t-clay   { background: linear-gradient(160deg, #e2b79e, var(--clay)); }
.t-sage   { background: linear-gradient(160deg, #d3d8b9, var(--sage)); }
.t-butter { background: linear-gradient(160deg, #f4e3b8, var(--butter)); }
.t-duck   { background: linear-gradient(160deg, #cfe0dd, var(--duck)); }
.t-rose   { background: linear-gradient(160deg, #ecbcb6, var(--rose)); }

/* Hero */
.hero {
  position: relative;
  margin: 0 clamp(20px, 5vw, 64px);
}
.hero-photo {
  position: relative;
  height: min(72vh, 680px);
  border-radius: 4px;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(255, 240, 210, .55), transparent 60%),
    linear-gradient(165deg, #d9b08f 0%, #b07a5c 55%, #7d5440 100%);
}
.hero-photo .photo-note { color: rgba(255, 255, 255, .6); }
.hero h1 {
  position: absolute;
  left: clamp(24px, 5vw, 64px);
  right: clamp(24px, 5vw, 64px);
  bottom: clamp(64px, 10vh, 110px);
  max-width: 17ch;
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(36px, 5.6vw, 76px);
  line-height: 1.08;
  letter-spacing: -.01em;
  color: #fffaf1;
}
.hero h1 em { font-style: italic; font-weight: 300; }
.hero-link {
  position: absolute;
  left: clamp(24px, 5vw, 64px);
  bottom: clamp(28px, 5vh, 52px);
  color: #fffaf1;
  font-size: 15px;
}

/* Sections */
.section { padding: clamp(56px, 9vw, 112px) clamp(20px, 5vw, 64px) 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #d8c9b2;
  padding-bottom: 14px;
  margin-bottom: 32px;
}
h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 42px);
}
.section-head a { font-size: 15px; color: var(--muted); }

/* Diary entries */
.entries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 36px;
}
.thumb { position: relative; aspect-ratio: 4 / 5; border-radius: 4px; margin-bottom: 16px; }
.meta { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--clay); }
.entry h3 {
  font-family: var(--serif);
  font-weight: 450;
  font-size: 24px;
  line-height: 1.25;
  margin: 4px 0 8px;
}
.entry p:last-child { color: var(--muted); }

/* Gingham band — the Bake Off tablecloth */
.gingham {
  height: 36px;
  margin-top: clamp(56px, 9vw, 112px);
  background-color: var(--cream);
  background-image:
    repeating-linear-gradient(0deg, rgba(169, 198, 194, .55) 0 12px, transparent 12px 24px),
    repeating-linear-gradient(90deg, rgba(169, 198, 194, .55) 0 12px, transparent 12px 24px);
}

/* Projects */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 36px;
}
.project-photo { position: relative; aspect-ratio: 3 / 2; border-radius: 4px; }
.project-text { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; }
.project h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; }
.project p { color: var(--muted); font-size: 15px; }

/* About */
.about {
  display: grid;
  grid-template-columns: minmax(160px, 260px) 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  max-width: 1000px;
}
.portrait { position: relative; aspect-ratio: 1; border-radius: 50%; }
.portrait .photo-note { left: 50%; transform: translateX(-50%); bottom: 20px; }
.about p { margin: 14px 0 18px; max-width: 52ch; font-size: 18px; }
.about a { color: var(--clay); }

/* Footer */
.footer {
  position: relative;
  margin-top: clamp(72px, 10vw, 128px);
  padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 64px) 88px;
  background: var(--ink);
  color: var(--cream);
}
.footer .email {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(26px, 4vw, 52px);
  color: var(--butter);
}
.corners {
  position: absolute;
  left: clamp(20px, 5vw, 64px);
  right: clamp(20px, 5vw, 64px);
  bottom: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  opacity: .7;
}

@media (max-width: 640px) {
  .about { grid-template-columns: 1fr; }
  .portrait { max-width: 200px; }
  .nav nav { gap: 14px; font-size: 14px; }
}

/* Design options switcher (for choosing a look; remove once decided) */
.switcher {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(59, 47, 39, .92);
  font: 500 13px/1 var(--sans);
  z-index: 10;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}
.switcher a { padding: 9px 14px; border-radius: 999px; color: var(--cream); white-space: nowrap; }
.switcher a:hover { text-decoration: none; background: rgba(255, 255, 255, .12); }
.switcher a.on { background: var(--cream); color: var(--ink); }
